Advertisement
WIXXZI

Untitled

Sep 28th, 2022
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. local NPC_ID = 60021
  2. local GOLD_STALLION = 500
  3. local GOLD_STEED = 1000
  4. local GOLD_CHESTNUTMARE = 300000
  5. local GOLD_MECHANOSTRIDER = 500000
  6.  
  7. local MOUNT1 = 2402
  8. local MOUNT2 = 14338
  9. local MOUNT3 = 5655
  10. local MOUNT4 = 13322
  11.  
  12.  
  13.  
  14. function On_Gossip(event, player, unit)
  15. player:GossipMenuAddItem(0, "Rent me a Black Stallion - 10 minutes", 0 , 1)
  16. player:GossipMenuAddItem(0, "Rent me a Swift White Steed", 0 , 2)
  17. player:GossipMenuAddItem(0, "Buy Chestnut Mare", 0, 3)
  18. player:GossipMenuAddItem(0, "Buy Unpainted Mechanostrider", 0, 4)
  19. player:GossipMenuAddItem(0, "Nevermind..", 0, 5)
  20. player:GossipSendMenu(1, unit)
  21. end
  22.  
  23. function On_Select(event, player, unit, sender, intid, code)
  24. if (intid == 1) then
  25. if player:GetCoinage() >= GOLD_STALLION then
  26. else
  27. player:SendAreaTriggerMessage("You need 5 silver to be able to rent this mount.")
  28. player:GossipComplete()
  29. return false
  30. end
  31. player:Mount(MOUNT1)
  32. player:ModifyMoney(-500)
  33. player:GossipComplete()
  34. end
  35.  
  36. if (intid == 2) then
  37. if player:GetCoinage() >= GOLD_STEED then
  38. else
  39. player:SendAreaTriggerMessage("You need 10 silver to be able to rent this mount.")
  40. player:GossipComplete()
  41. return false
  42. end
  43. player:Mount(MOUNT2)
  44. player:ModifyMoney(-1000)
  45. player:GossipComplete()
  46. end
  47.  
  48. if (intid == 3) then
  49. if player:GetCoinage() >= GOLD_CHESTNUTMARE then
  50. else
  51. player:SendAreaTriggerMessage("You need 30 gold to be able to buy this item.")
  52. player:GossipComplete()
  53. return false
  54. end
  55. player:AddItem(MOUNT3)
  56. player:ModifyMoney(-300000)
  57. player:GossipComplete()
  58. end
  59.  
  60. if (intid == 4) then
  61. if player:GetCoinage() >= GOLD_MECHANOSTRIDER then
  62. else
  63. player:SendAreaTriggerMessage("You need 50 gold to be able to buy this item.")
  64. player:GossipComplete()
  65. return false
  66. end
  67. player:AddItem(MOUNT4)
  68. player:ModifyMoney(-500000)
  69. player:GossipComplete()
  70. end
  71.  
  72. if (intid == 5) then
  73. player:GossipComplete()
  74. player:Dismount()
  75. end
  76. end
  77.  
  78. RegisterCreatureGossipEvent(NPC_ID, 1, On_Gossip)
  79. RegisterCreatureGossipEvent(NPC_ID, 2, On_Select)
  80.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement