bolachapanco
Member
I have this script that when an item is used it gives the mount but I would like it to be necessary to use these items for the mount to be given:
04 Spectral Horseshoes Spectral Horseshoe
01 Spectral Horse Tack Spectral Horse Tack
01 Spectral Saddle
The idea here is to revscript the Phastamal Jade mount
04 Spectral Horseshoes Spectral Horseshoe
01 Spectral Horse Tack Spectral Horse Tack
01 Spectral Saddle
The idea here is to revscript the Phastamal Jade mount
Lua:
local config = {
[34072] = {mountId = 167, message = "You receive the permission to ride a Phantasmal Jade"},
[34073] = {mountId = 167, message = "You receive the permission to ride a Phantasmal Jade"},
[34074] = {mountId = 167, message = "You receive the permission to ride a Phantasmal Jade"},
}
local jademount = Action()
function jademount.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local mount = config[item.itemid]
if not mount then
return true
end
if not player:hasMount(mount.mountId) then
player:addMount(mount.mountId)
player:say(mount.message, TALKTYPE_MONSTER_SAY)
item:remove(1)
else
player:sendTextMessage(19, "You already have this mount")
end
return true
end
for itemId, info in pairs(config) do
jademount:id(itemId)
end
jademount:register()