• 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 I need a help with this

newlegacy

New Member
Joined
Dec 15, 2012
Messages
44
Reaction score
0
Location
Dominican Republic
Greetings to all, I need a little help with these functions to adapt to TFS 1.0

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
 
Back
Top