Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local NPC_ID = 60021
- local GOLD_STALLION = 500
- local GOLD_STEED = 1000
- local GOLD_CHESTNUTMARE = 300000
- local GOLD_MECHANOSTRIDER = 500000
- local MOUNT1 = 2402
- local MOUNT2 = 14338
- local MOUNT3 = 5655
- local MOUNT4 = 13322
- function On_Gossip(event, player, unit)
- player:GossipMenuAddItem(0, "Rent me a Black Stallion - 10 minutes", 0 , 1)
- player:GossipMenuAddItem(0, "Rent me a Swift White Steed", 0 , 2)
- player:GossipMenuAddItem(0, "Buy Chestnut Mare", 0, 3)
- player:GossipMenuAddItem(0, "Buy Unpainted Mechanostrider", 0, 4)
- player:GossipMenuAddItem(0, "Nevermind..", 0, 5)
- player:GossipSendMenu(1, unit)
- end
- function On_Select(event, player, unit, sender, intid, code)
- if (intid == 1) then
- if player:GetCoinage() >= GOLD_STALLION then
- else
- player:SendAreaTriggerMessage("You need 5 silver to be able to rent this mount.")
- player:GossipComplete()
- return false
- end
- player:Mount(MOUNT1)
- player:ModifyMoney(-500)
- player:GossipComplete()
- end
- if (intid == 2) then
- if player:GetCoinage() >= GOLD_STEED then
- else
- player:SendAreaTriggerMessage("You need 10 silver to be able to rent this mount.")
- player:GossipComplete()
- return false
- end
- player:Mount(MOUNT2)
- player:ModifyMoney(-1000)
- player:GossipComplete()
- end
- if (intid == 3) then
- if player:GetCoinage() >= GOLD_CHESTNUTMARE then
- else
- player:SendAreaTriggerMessage("You need 30 gold to be able to buy this item.")
- player:GossipComplete()
- return false
- end
- player:AddItem(MOUNT3)
- player:ModifyMoney(-300000)
- player:GossipComplete()
- end
- if (intid == 4) then
- if player:GetCoinage() >= GOLD_MECHANOSTRIDER then
- else
- player:SendAreaTriggerMessage("You need 50 gold to be able to buy this item.")
- player:GossipComplete()
- return false
- end
- player:AddItem(MOUNT4)
- player:ModifyMoney(-500000)
- player:GossipComplete()
- end
- if (intid == 5) then
- player:GossipComplete()
- player:Dismount()
- end
- end
- RegisterCreatureGossipEvent(NPC_ID, 1, On_Gossip)
- RegisterCreatureGossipEvent(NPC_ID, 2, On_Select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement