Hello,
this action simply change player outfit until his logout, next out change etc.
It have infinity charges, but you need full mana to change outfit.
Also you can choose which outfits are available.
You can use it on other players.
this action simply change player outfit until his logout, next out change etc.
It have infinity charges, but you need full mana to change outfit.
Also you can choose which outfits are available.
You can use it on other players.
LUA:
local outfits = {578,577,576,571,545,491,484,445,438,429,423,346,344,339,335,334,332,330,298,61,43,35,24,21}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= 100 then
if isPlayer(itemEx.uid) then
if getPlayerMana(cid) == getPlayerMaxMana(cid) then
if getCreatureName(cid) == getCreatureName(itemEx.uid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have changed your outfit.")
doSetCreatureOutfit(cid, {lookType = outfits[math.random(#outfits)]}, -1)
doSendMagicEffect(getCreaturePosition(cid), 13)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(itemEx.uid) .. " outfit is now changed.")
doPlayerSendTextMessage(itemEx.uid, MESSAGE_STATUS_CONSOLE_BLUE, "Your outfit has been changed by " .. getCreatureName(cid))
doSetCreatureOutfit(itemEx.uid, {lookType = outfits[math.random(#outfits)]}, -1)
doSendMagicEffect(getCreaturePosition(itemEx.uid), 13)
end
if getPlayerAccess(cid) <= 2 then
doPlayerAddMana(cid, -getPlayerMana(cid), false)
doPlayerAddSpentMana(cid, getPlayerMana(cid))
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need full mana to use that powerful tool.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You can only use this on players.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need 100 level to use that powerful tool.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
return true
end
Last edited: