• 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!

if use on self XXX else YYY

andree

New Member
Joined
Feb 19, 2014
Messages
70
Reaction score
4
i tried this:
Code:
function onUse(cid, item, position, itemEx, toPosition)
    if getCreatureName(cid) == getCreatureName(cid) then
    doPlayerCastSpell(cid, "exura")
    else
    doPlayerCastSpell(cid, "exori frigo")
    end
    return true
end
still uses the "exori frigo" instead of exura
 
Try this
Code:
function onUse(cid, item, position, itemEx, toPosition)
if isPlayer(cid) then
doPlayerCastSpell(cid, "exura")
else
print("Testing") -- Dont remove this, this will see if the script ever reaches as far as else before something goes wrong. "Testing" should appear in console
doPlayerCastSpell(cid, "exori frigo")
end
return true
end
 
This:
Code:
if itemEx.uid == cid then


Code:
function onUse(cid, item, position, itemEx, toPosition)
    if itemEx.uid == cid then
        doPlayerCastSpell(cid, "exura")
    else
        doPlayerCastSpell(cid, "exori frigo")
    end
    return true
end

That's all.
 
Last edited:
Back
Top