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

Lua onStatsChange

Keshho

New Member
Joined
Feb 8, 2015
Messages
3
Reaction score
0
Code:
function onStatsChange(cid, attacker, type, combat, value)


        if combat == COMBAT_HEALING then
            return true
        end
        if getCreatureHealth(cid) > value then
            return true
        end
        if getPlayerStorageValue(cid,7749) == 1 then
        doCreateItem(2016,1,getCreaturePosition(cid))
        doTeleportThing(cid, {x=1001,  y=1003,  z=7})
        doSendMagicEffect(getCreaturePosition(cid), 10)
        doRemoveConditions(cid, FALSE)
        doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid))
        doCreatureAddMana(cid, getCreatureMaxMana(cid) - getCreatureMana(cid))
        end
   
            return false

end

I need to teleport and other from "if" only when player have storage 7749,1 when have other i need to normal kill him .I dont know how to do .
 
Back
Top