Guest User

Untitled

a guest
May 27th, 2019
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --------------------------
  2. -- BY NIXO AKA GUMIS --
  3. --------------------------
  4.  
  5. quest nixo_kd begin
  6. state start begin
  7. function get_input(function_game)
  8. cmdchat("getinputbegin")
  9. local input = input(cmdchat(function_game))
  10. cmdchat("getinputend")
  11. return input
  12. end
  13. when login begin
  14. cmdchat("KD_QUEST "..q.getcurrentquestindex())
  15. end
  16. when button or info begin
  17. if not pc.can_warp() then
  18. syschat("Odczekaj 10 sekund oraz zamknij sklep/handel.")
  19. return
  20. end
  21. if pc.count_item(25100) >= 1 then
  22. info = nixo_kd.get_input("KD_SEND")
  23. splited = string.split(info, '|')
  24. if item.select_cell(tonumber(splited[1])) then
  25. if item.vnum == tonumber(splited[2]) then
  26. if item.get_type() == 1 or item.get_type() == 2 and item.get_sub_type() == 0 then
  27. for i = 0, 2 do
  28. if item.get_socket(i) == tonumber(splited[3]) then
  29. if item.get_socket(i) > 20000 and item.get_socket(i) != 28960 then
  30. item.set_socket(i, 1)
  31. pc.give_item2(tonumber(splited[3]))
  32. pc.remove_item(30316, 1)
  33. break
  34. end
  35. end
  36. end
  37. end
  38. end
  39. end
  40. end
  41. end
  42. end
  43. end
RAW Paste Data