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 .