Esempio n. 1
0
def getCertified(player, itemId, var):
  st = player.getQuestState(qn)
  qvar = st.getGlobalQuestVar(var)
  if qvar != "" and qvar != "0" :
    return ""
  item = player.getInventory().addItem("Quest", itemId, 1, player, player.getTarget())
  st.saveGlobalQuestVar(var,str(item.getObjectId()))
  smsg = SystemMessage(SystemMessageId.EARNED_ITEM)
  smsg.addItemName(item)
  player.sendPacket(smsg)
  return
Esempio n. 2
0
def getCertified(player, itemId, var):
    st = player.getQuestState(qn)
    qvar = st.getGlobalQuestVar(var)
    if qvar != "" and qvar != "0":
        return ""
    item = player.getInventory().addItem("Quest", itemId, 1, player,
                                         player.getTarget())
    st.saveGlobalQuestVar(var, str(item.getObjectId()))
    smsg = SystemMessage(SystemMessageId.EARNED_ITEM)
    smsg.addItemName(item)
    player.sendPacket(smsg)
    return
Esempio n. 3
0
def EvolvePet(player,item,striderControlItem) :
   con = L2DatabaseFactory.getInstance().getConnection()
   statement = con.prepareStatement("UPDATE items SET item_id =? WHERE object_id=? AND owner_id=?")
   statement.setInt(1, striderControlItem)
   statement.setInt(2, item.getObjectId())
   statement.setInt(3, player.getObjectId())
   statement.execute()
   statement.close()
   con.close()
   sm1 = SystemMessage(SystemMessageId.S2_S1_DISAPPEARED)
   sm1.addItemName(item.getItemId())
   sm1.addNumber(1)
   sm2 = SystemMessage(SystemMessageId.YOU_PICKED_UP_A_S1_S2)
   sm2.addNumber(item.getEnchantLevel())
   sm2.addItemName(striderControlItem)
   player.sendPacket(sm1)
   player.sendPacket(sm2)
   player.sendPacket(ItemList(player, False))
   return
def EvolvePet(player, item, striderControlItem):
    con = L2DatabaseFactory.getInstance().getConnection()
    statement = con.prepareStatement(
        "UPDATE items SET item_id =? WHERE object_id=? AND owner_id=?")
    statement.setInt(1, striderControlItem)
    statement.setInt(2, item.getObjectId())
    statement.setInt(3, player.getObjectId())
    statement.execute()
    statement.close()
    con.close()
    sm1 = SystemMessage(SystemMessageId.S2_S1_DISAPPEARED)
    sm1.addItemName(item.getItemId())
    sm1.addNumber(1)
    sm2 = SystemMessage(SystemMessageId.YOU_PICKED_UP_A_S1_S2)
    sm2.addNumber(item.getEnchantLevel())
    sm2.addItemName(striderControlItem)
    player.sendPacket(sm1)
    player.sendPacket(sm2)
    player.sendPacket(ItemList(player, False))
    return