Israelboschetti
New Member
- Joined
- Jul 13, 2020
- Messages
- 2
- Reaction score
- 0
Hiho \o
I'm looking for a script in which when using a specific item, the player gains a mount or a specific outfit, the item disappears in 24 hours and can only be used once and disappears.
I want to give as a gift to players who donate. Has anyone seen any similar here? I searched a lot and didn't find ... I have 10 mounts and outfits for that
I'm using 1.3
I found it, but dont work to me. When i try to use this item, nothing happen.
in data/action/actions.xml
<action itemid="11401" event="script" value="itemoutfit.lua"/>
in data/action/scripts/itemoutfit.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 11401 and (getPlayerStorageValue(cid, 8000) == EMPTY_STORAGE) then
doPlayerAddOutfit(cid, 137, 3)
doPlayerAddOutfit(cid, 137, 3)
setPlayerStorageValue(cid, 8000, 1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
doPlayerSendTextMessage(cid,22,"Congratulations, you have received warmaster addon!")
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You have already received this addon!.")
end
end
I'm looking for a script in which when using a specific item, the player gains a mount or a specific outfit, the item disappears in 24 hours and can only be used once and disappears.
I want to give as a gift to players who donate. Has anyone seen any similar here? I searched a lot and didn't find ... I have 10 mounts and outfits for that
I'm using 1.3
I found it, but dont work to me. When i try to use this item, nothing happen.
in data/action/actions.xml
<action itemid="11401" event="script" value="itemoutfit.lua"/>
in data/action/scripts/itemoutfit.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 11401 and (getPlayerStorageValue(cid, 8000) == EMPTY_STORAGE) then
doPlayerAddOutfit(cid, 137, 3)
doPlayerAddOutfit(cid, 137, 3)
setPlayerStorageValue(cid, 8000, 1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
doPlayerSendTextMessage(cid,22,"Congratulations, you have received warmaster addon!")
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You have already received this addon!.")
end
end