• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Outfit Lever [0.3.6]

Samaster

Raptorserver.ddns.net
Joined
Jun 9, 2013
Messages
291
Reaction score
23
Location
UK
Hi,
As one of the rewards of a quest, there is a lever that players can use and it will reward them with the elf outfit [The one that you can change the colours]. The same way as any other outfit, it will be permanently available and you can change to it in your outfit selector window

However the script I have doesn't work at all.. Does anyone know a script that does this please?

Thanks
 
Post the script that you have and post the error you get with it (if any error)

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local v = getPlayerSex(cid) == 0 and 159
    if canPlayerWearOutfit(cid, v, 3) then
        return doPlayerSendCancel(cid, "You have already have the elf outfit!")
    end
  
    doPlayerAddOutfit(cid, v, 3)
    doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, you have gained the elf outfit!")
    return true
end

I don't get any error reports, it simply doesnt work xD
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local lookType = 159
    if canPlayerWearOutfit(cid, lookType) then
        doPlayerSendCancel(cid, "You have already have the elf outfit!")
        return true
    end
 
    doPlayerAddOutfit(cid, lookType, 3)
    doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, you have gained the elf outfit!")

    doTransformItem(item.uid, item.itemid == 1946 and 1945 or 1946)
    return true
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local lookType = 159
    if canPlayerWearOutfit(cid, lookType) then
        doPlayerSendCancel(cid, "You have already have the elf outfit!")
        return true
    end

    doPlayerAddOutfit(cid, lookType, 3)
    doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Congratulations, you have gained the elf outfit!")

    doTransformItem(item.uid, item.itemid == 1946 and 1945 or 1946)
    return true
end

Thanks man, it works! :D
 
Back
Top