newlegacy
New Member
Greetings to all, I need a little help with these functions to adapt to TFS 1.0
CreatureEvent
and this
the code is here too http://otland.net/threads/securemode-pvp-system.128600/ so they know that it is well adapted to the sources could only do funconar farta if I can help please.
sorry for my english
CreatureEvent
Code:
function onTarget(cid, target)
if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerSecureMode(attacker)) then
return false
end
return true
end
function onStatsChange(cid, attacker, type, combat, value)
if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerSecureMode(attacker)) then
if combat ~= COMBAT_HEALING then
return false
end
end
return true
end
function onCast(cid, target)
if(attacker and isPlayer(attacker) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerSecureMode(attacker)) then
if combat ~= COMBAT_HEALING then
return false
end
end
return true
end
and this
Code:
function onCombat(cid, target)
if(target and isPlayer(target) and getPlayerSecureMode(cid)) then
doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.")
return false
end
return true
end
Code:
<event type="statschange" name="Raczka" event="script" value="raczka.lua"/>
<event type="target" name="RaczkaTarget" event="script" value="raczka.lua"/>
<event type="cast" name="RaczkaCast" event="script" value="raczka.lua"/>
<event type="combat" name="RaczkaSkull" event="script" value="raczka1.lua"/>
the code is here too http://otland.net/threads/securemode-pvp-system.128600/ so they know that it is well adapted to the sources could only do funconar farta if I can help please.
sorry for my english