<action itemid="xxxx" event="script" value="outfit rune.lua"/> ----- Put item id at 'xxxx'
function onUse(cid, item, frompos, item2, topos)
doSetCreatureOutfit(cid, 159)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = getCreatureOutfit(cid)
if v.lookType ~= 159 then
v.lookType = 159
doCreatureChangeOutfit(cid, v)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
else
doPlayerSendCancel(cid, 'You already have this outfit.')
end
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = getCreatureOutfit(cid)
if v.lookType ~= 159 then
v.lookType = 159
doCreatureChangeOutfit(cid, v)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, 'You already have this outfit.')
end
return true
end