Thorn
Spriting since 2013
Hello, i'm trying to make an item to give an outfit, and when it does, it makes a magic effect. Recently i added one into my dat but i have no idea how to use it, if anyone could help me plz, here it is
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerSex(cid) == 1 then
doPlayerAddOutfit(cid, 842, 1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA)
doCreatureSay(cid, "Felicidades, ahora posees el Ash Avatar", TALKTYPE_MONSTER)
doRemoveItem(item.uid, 1)
elseif getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 842, 1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA)
doCreatureSay(cid, "Felicidades, ahora posees el Ash Avatar", TALKTYPE_MONSTER)
doRemoveItem(item.uid, 1)
end
end