WA
creatureevent

Anti Push

Por WarW0lf, 06 de ago. de 2012 em Globalevents e Spells

script
2
1.1k
WarW0lfW
06 de agosto de 2012 às 12:02

Como funciona?

 

Ele previne que um player puxe outro player enquanto ele está treinando ou atacando um monstro.

 

COLOQUE TUDO EM CREATURESCRIPTS

 

creaturescripts.xml

 

 

 

XML Code:

 

<event type="push" name="Anti-Push" event="script" value="anti-push.lua"/>

 

 

 

login.lua

 

 

 

Lua Code:

 

registerCreatureEvent(cid, "Anti-Push")

 

 

 

anti-push.lua

 

 

 

Lua Code:

 

local targetList, GAMEMASTER = {"Target Dummy"}, 5

function onPush(cid, target)

if(getPlayerAccess(cid) < GAMEMASTER) then

if((target ~= cid and isPlayer(target)) and (getCreatureTarget(target) > 0 and isInArray(targetList, getCreatureName(getCreatureTarget(target)):lower()))) then

doPlayerSendCancel(cid, "You cannot move this object.")

return false

end

end

 

return true

end

BeekiB
06 de agosto de 2012 às 13:02

Tópico mal formulado, alem do mais esse script foi feito por J.Dre, ou seja poste os devidos créditos.

 

Segue o link do tópico verdadeiro: http://otland.net/f82/anti-push-159029/