[Question]Auto Trade script problem

      [Question]Auto Trade script problem

      Neu

      Ok. Now have some edited code. Now if i uncomment line after if statment code wont run:

      Quellcode

      1. ​import ui,app,chat,chr,net,player,item,skill,time,game,shop,chrmgr,thread,event,exchange
      2. SWITCH_RARE_VNUM = 30270
      3. start = 0
      4. end = 3000000
      5. SzamVID = 0
      6. exslot = 1
      7. for vid in range(start, end):
      8. if chr.GetInstanceType(vid) != 6:
      9. continue
      10. if chr.GetNameByVID(vid) == "DajSeNaLuz":
      11. SzamVID = vid
      12. break
      13. net.SendExchangeStartPacket(SzamVID)
      14. for i in range(0,90*2):
      15. attachedSlotType = player.INVENTORY
      16. attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
      17. itemVnum = player.GetItemIndex(attachedInvenType, i)
      18. if itemVnum == SWITCH_RARE_VNUM:
      19. #net.SendExchangeItemAddPacket(i,0)
      20. #net.SendExchangeItemAddPacket(i,exslot,1)
      21. chat.AppendChat(chat.CHAT_TYPE_INFO, "Odłamek znaleziony")
      22. exslot=exslot+1
      23. net.SendExchangeAcceptPacket()


      Where is the problem, I dont have any idea..

      Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „MrMuniez“ ()

      Neu

      MrMuniez schrieb:

      Ok. Now have some edited code. Now if i uncomment line after if statment code wont run:

      Quellcode

      1. ​import ui,app,chat,chr,net,player,item,skill,time,game,shop,chrmgr,thread,event,exchange
      2. SWITCH_RARE_VNUM = 30270
      3. start = 0
      4. end = 3000000
      5. SzamVID = 0
      6. exslot = 1
      7. for vid in range(start, end):
      8. if chr.GetInstanceType(vid) != 6:
      9. continue
      10. if chr.GetNameByVID(vid) == "DajSeNaLuz":
      11. SzamVID = vid
      12. break
      13. net.SendExchangeStartPacket(SzamVID)
      14. for i in range(0,90*2):
      15. attachedSlotType = player.INVENTORY
      16. attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
      17. itemVnum = player.GetItemIndex(attachedInvenType, i)
      18. if itemVnum == SWITCH_RARE_VNUM:
      19. #net.SendExchangeItemAddPacket(i,0)
      20. #net.SendExchangeItemAddPacket(i,exslot,1)
      21. chat.AppendChat(chat.CHAT_TYPE_INFO, "Odłamek znaleziony")
      22. exslot=exslot+1
      23. net.SendExchangeAcceptPacket()


      Where is the problem, I dont have any idea..


      it is net.SendExchangeItemAddPacket(1,i,exslot)