Advertisement
Guest User

Untitled

a guest
May 27th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. -----------------------------------
  2. -- Area: Selbina
  3. -- NPC: Graegham
  4. -- Guild Merchant NPC: Fishing Guild
  5. -- @zone 248
  6. -----------------------------------
  7.  
  8. require("scripts/globals/shop");
  9. package.loaded["scripts/zones/Selbina/TextIDs"] = nil;
  10. require("scripts/zones/Selbina/TextIDs");
  11.  
  12. -----------------------------------
  13. -- onTrade Action
  14. -----------------------------------
  15.  
  16. function onTrade(player,npc,trade)
  17. end;
  18.  
  19. -----------------------------------
  20. -- onTrigger Action
  21. -----------------------------------
  22.  
  23. function onTrigger(player,npc)
  24.  
  25. player:showText(npc,MATOAKA_SHOP_DIALOG);
  26. local shopvar = player:getVar("shopvar");
  27.  
  28. if(shopvar == 0)then
  29. player:setVar("shopvar",1);
  30. end
  31.  
  32. if(shopvar == 1)then
  33. printToPlayer("Showing Page 1 of 2. Click again to get to page 2.")
  34. player:setVar("shopvar",2);
  35. stock = {4354,309, -- Shining trout
  36. 4480,1500, -- Gugru Tuna
  37. 4483,120, -- Tiger Cod
  38. 631,200, -- Horo Flour
  39. 4461,6000, -- Bastore Bream
  40. 4514,120, -- Quus
  41. 4485,2170, -- Noble Lady
  42. 4399,2520, -- Bluetail
  43. 4383,3500, -- Gold Lobster
  44. 4360,153, -- bastore sardine
  45. 5448,500, --Kalamar
  46. 4443,750, -- Cobalt jellyfish
  47. 4403,800, -- yellow globe
  48. 5457,800, -- Dil
  49. 4384,800, -- black sole
  50. 4478,3000,} -- 3 eyed fish
  51. showShop(player, STATIC, stock);
  52. elseif (shopvar >= 2)then
  53. printToPlayer("Showing Page 2 of 2. Click again to get to page 1.")
  54. player:setVar("shopvar",1);
  55. stock = {4479,1358, -- Bhefhel Marlin
  56. 4481,320, -- Ogre Eel
  57. 624,58, -- Pamtam Kelp
  58. 4385,261, -- Zafnlug Bass
  59. 4402,3456, -- Red Terrapin
  60. 4426,195, -- Tricolored Carp
  61. 4428,136, -- Dark Bass
  62. 4451,3400, -- Silver Shark
  63. 4470,1790, -- Icefish
  64. 4472,79, -- Crayfish
  65. 4484,1350, -- Shall Shell
  66. 4500,24, -- Greedie
  67. 5818,1000, -- Aurora Bass
  68. 4515,132} -- Copper Frog
  69. showShop(player, STATIC, stock);
  70. end;
  71. end;
  72.  
  73. -----------------------------------
  74. -- onEventUpdate
  75. -----------------------------------
  76.  
  77. function onEventUpdate(player,csid,option)
  78. --printf("CSID: %u",csid);
  79. --printf("RESULT: %u",option);
  80. end;
  81.  
  82. -----------------------------------
  83. -- onEventFinish
  84. -----------------------------------
  85.  
  86. function onEventFinish(player,csid,option)
  87. --printf("CSID: %u",csid);
  88. --printf("RESULT: %u",option);
  89. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement