Esempio n. 1
0
	def onTalk (Self,npc,player):
		st = player.getQuestState(qn)
		if not st: return
		npcId = npc.getNpcId()
		EMC = st.getQuestItemsCount(Exalted_Mercenary_Certificate)
		npcId = npc.getNpcId()
		if EMC :
			L2Multisell.getInstance().separateAndSend(npcId*10000+3, player, npc.getNpcId(), False, 0.0);
			htmltext = ""
		else :
			htmltext = "<html><body>你要拿給我看的資格證在哪裡?你是瞧不起我嗎?</body></html>"
		return htmltext
Esempio n. 2
0
 def onAdvEvent(self, event, npc, player):
     if not NEWBIE_COUPONS_ENABLED: return
     st = player.getQuestState(qn)
     newbie = player.getNewbie()
     level = player.getLevel()
     occupation_level = player.getClassId().level()
     pkkills = player.getPkKills()
     if event == "newbie_give_weapon_coupon":
         #@TODO: check if this is the very first character for this account
         #would need a bit of SQL, or a core method to determine it.
         #This condition should be stored by the core in the account_data table
         #upon character creation.
         if 6 <= level <= 39 and not pkkills and occupation_level == 0:
             # check the player state against this quest newbie rewarding mark.
             if newbie | NEWBIE_WEAPON != newbie:
                 player.setNewbie(newbie | NEWBIE_WEAPON)
                 st.giveItems(COUPON_ONE, 5)
                 return "30598-2.htm"  #here's the coupon you requested
             else:
                 return "30598-1.htm"  #you got a coupon already!
         else:
             return "30598-3.htm"  #you're not eligible to get a coupon (level caps, pkkills or already changed class)
     elif event == "newbie_give_armor_coupon":
         if 6 <= level <= 39 and not pkkills and occupation_level == 1:
             # check the player state against this quest newbie rewarding mark.
             if newbie | NEWBIE_ACCESORY != newbie:
                 player.setNewbie(newbie | NEWBIE_ACCESORY)
                 st.giveItems(COUPON_TWO, 1)
                 return "30598-5.htm"  #here's the coupon you requested
             else:
                 return "30598-4.htm"  #you got a coupon already!
         else:
             return "30598-6.htm"  #you're not eligible to get a coupon (level caps, pkkills or didnt change class yet)
     elif event == "newbie_show_weapon":
         if 6 <= level <= 39 and not pkkills and occupation_level == 0:
             L2Multisell.getInstance().separateAndSend(
                 WEAPON_MULTISELL, player, npc.getNpcId(), False, 0.0)
         else:
             return "30598-7.htm"  #you're not eligible to use warehouse
     elif event == "newbie_show_armor":
         if 6 <= level <= 39 and not pkkills and occupation_level > 0:
             L2Multisell.getInstance().separateAndSend(
                 ACCESORIES_MULTISELL, player, npc.getNpcId(), False, 0.0)
         else:
             return "30598-8.htm"  #you're not eligible to use warehouse
Esempio n. 3
0
 def onAdvEvent (self,event,npc,player) :
    if not NEWBIE_COUPONS_ENABLED : return
    st = player.getQuestState(qn)
    newbie = player.getNewbie()
    level = player.getLevel()
    occupation_level = player.getClassId().level()
    pkkills = player.getPkKills()
    if event == "newbie_give_weapon_coupon" :
       #@TODO: check if this is the very first character for this account
       #would need a bit of SQL, or a core method to determine it.
       #This condition should be stored by the core in the account_data table
       #upon character creation.
       if 6 <= level <= 19 and not pkkills and occupation_level == 0 :                # rocknow ­×¥¿
          # check the player state against this quest newbie rewarding mark.
          if newbie | NEWBIE_WEAPON != newbie :
             player.setNewbie(newbie|NEWBIE_WEAPON)
             st.giveItems(COUPON_ONE,5)
             return "30598-2.htm" #here's the coupon you requested
          else :
             return "30598-1.htm" #you got a coupon already!
       else :
          return "30598-3.htm" #you're not eligible to get a coupon (level caps, pkkills or already changed class)
    elif event == "newbie_give_armor_coupon" :
       if 20 <= level <= 39 and not pkkills and occupation_level == 1 :               # rocknow ­×¥¿
          # check the player state against this quest newbie rewarding mark.
          if newbie | NEWBIE_ACCESORY != newbie :
             player.setNewbie(newbie|NEWBIE_ACCESORY)
             st.giveItems(COUPON_TWO,1)
             return "30598-5.htm" #here's the coupon you requested
          else :
             return "30598-4.htm" #you got a coupon already!
       else :
          return "30598-6.htm" #you're not eligible to get a coupon (level caps, pkkills or didnt change class yet)
    elif event == "newbie_show_weapon" :
       if 6 <= level <= 19 and not pkkills and occupation_level == 0 :                # rocknow ­×¥¿
          L2Multisell.getInstance().separateAndSend(WEAPON_MULTISELL, player, npc.getNpcId(), False, 0.0);
       else :
          return "30598-7.htm" #you're not eligible to use warehouse
    elif event == "newbie_show_armor" :
       if 20 <= level <= 39 and not pkkills and occupation_level == 1 :               # rocknow ­×¥¿
          L2Multisell.getInstance().separateAndSend(ACCESORIES_MULTISELL, player, npc.getNpcId(), False, 0.0);
       else :
          return "30598-8.htm" #you're not eligible to use warehouse
Esempio n. 4
0
 def onTalk(Self, npc, player):
     st = player.getQuestState(qn)
     npcId = npc.getNpcId()
     L2Multisell.getInstance().separateAndSend(npcId * 10000 + 1, player,
                                               npc.getNpcId(), False, 0.0)
     return