• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Item give outfit or mount

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
 
that for mount you can edit
[26340] this items player will use to get mount
87 id for the mount
and mount name

Lua:
local table = {
    [24763] = {mountId = 87, mountName = "Rift Runner"},
    [26194] = {mountId = 94, mountName = "Sparkion"},
    [26340] = {mountId = 98, mountName = "Neon Sparkid"},
    [26341] = {mountId = 99, mountName = "Vortexion"},
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local useId = table[item.itemid]
    if not useId then
        return false
    end

    if not player:hasMount(useId.mountId) then
        player:addMount(useId.mountId)
        player:say("You receive the permission to ride a ".. useId.mountName ..".", TALKTYPE_MONSTER_SAY)
        player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN)
        item:remove(1)
    else
        player:sendCancelMessage("You already have this mount.")
        player:getPosition():sendMagicEffect(CONST_ME_POFF)
    end
    return true
end
outfit
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 8000) < 1 then
doPlayerAddOutfit(cid, 137, 3)
doPlayerAddOutfit(cid, 137, 3)
setPlayerStorageValue(cid, 8000, 1)
player:getPosition():sendMagicEffect(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
 
Back
Top