Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. -----------------------------------
  2. -- Area: Chocobo_Circuit
  3. -- NPC: Hypnosheep
  4. -- Sheeplove Vendor / Savior
  5. -----------------------------------
  6. package.loaded["scripts/zones/Chocobo_Circuit/TextIDs"] = nil;
  7. -----------------------------------
  8.  
  9. require("scripts/zones/Chocobo_Circuit/TextIDs");
  10. require("scripts/globals/shop");
  11. require("scripts/globals/settings");
  12.  
  13. -----------------------------------
  14. -- onTrade Action
  15. -----------------------------------
  16.  
  17. function onTrade(player,npc,trade)
  18. if (head == 13916 or head ==13917)
  19. if(player:getFreeSlotsCount() > 0) then
  20. if(trade:hasItemQty(874,1) and trade:getItemCount() == 1) then
  21. player:PrintToPlayer(string.format("Yep thats the item! Here's your prize!"))
  22. player:tradeComplete();
  23. player:addItem(13917); -- horror head
  24. player:messageSpecial(ITEM_OBTAINED,13917);
  25. else
  26. player:PrintToPlayer(string.format("Wrong item."))
  27. player:addStatusEffect(EFFECT_DOOM,10,1,10)
  28. end
  29. else
  30. player:PrintToPlayer("Clear your inventory.")
  31. end
  32. end
  33. end;
  34.  
  35. -----------------------------------
  36. -- onTrigger Action
  37. -----------------------------------
  38.  
  39. function onTrigger(player,npc)
  40. player:PrintToPlayer("You found one of the ten Halloween spirits! Here's your clue!");
  41. player:PrintToPlayer("");
  42. player:PrintToPlayer("");
  43. end;
  44.  
  45. -----------------------------------
  46. -- onEventUpdate
  47. -----------------------------------
  48.  
  49. function onEventUpdate(player,csid,option)
  50. --printf("CSID: %u",csid);
  51. --printf("RESULT: %u",option);
  52. end;
  53.  
  54. -----------------------------------
  55. -- onEventFinish
  56. -----------------------------------
  57.  
  58. function onEventFinish(player,csid,option)
  59. --printf("CSID: %u",csid);
  60. --printf("RESULT: %u",option);
  61. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement