Postado Março 18, 2016 9 anos Boa tarde, eu estou com problema em meu servidor que o problema que eu os player consegui puxar o outro player no treiner caso alguém tenha a scriptd anti-push por favor esteja disponibilizando essa scripts para mim ou caso alguém sabe criar esse scripts por favor crie para mim fico muito grato por isso. Do Rep+
Postado Março 18, 2016 9 anos Data/talkactions/scripts e crie um arquivo .lua chamado treinaroff.lua e adicione esse script nele. Mostrar conteúdo oculto local time = 2 -- em segundos 1 = 1 segundo 2 = 2 segundos... local say_events = {} local function SayText(cid) if isPlayer(cid) == TRUE then if say_events[getPlayerGUID(cid)] ~= nil then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando!", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid) doCreatureSetNoMove(cid, true) end end return TRUE end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Utilize '!trainar on' para ligar e '!trainar off' para desligar.") return true end if param == "on" then if isPlayer(cid) == TRUE then doSendAnimatedText(getPlayerPosition(cid),"Treinando", math.random(01,255)) end say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid) doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Voce esta em modo 'Treinar'.") doPlayerSendTextMessage(cid,20,"Para sair do modo 'treinar' diga !trainar off") elseif param == "off" then stopEvent(say_events[getPlayerGUID(cid)]) say_events[getPlayerGUID(cid)] = nil doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING,"Voce nao esta mais em modo Treinar'.") doCreatureSetNoMove(cid, false) end return TRUE end Agora em Data/talkactions e abra o arquivo talkactions.xml e adicione essa Tag: <talkaction log="yes" words="!treinar" event="script" value="treinaroff.lua"/> Creditos: Yan Liima E Night Criador do Script! Bom uso! xD
Postado Março 18, 2016 9 anos Esse é provavelmente melhor, evita que alguem puxe quem esta atacando x monstro. creaturescripts.xml <event type="push" name="Anti-Push" event="script" value="anti-push.lua"/> creaturescripts/scripts/login.lua registerCreatureEvent(cid, "Anti-Push") creaturescripts/scripts/anti-push.lua local targetList, GAMEMASTER = {"NOME DO TRAINER"}, 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 Só editar nome do trainer.
Postado Março 19, 2016 9 anos Autor Em 18/03/2016 em 19:03, DukeeH disse: Esse é provavelmente melhor, evita que alguem puxe quem esta atacando x monstro. creaturescripts.xml <event type="push" name="Anti-Push" event="script" value="anti-push.lua"/> creaturescripts/scripts/login.lua registerCreatureEvent(cid, "Anti-Push") creaturescripts/scripts/anti-push.lua local targetList, GAMEMASTER = {"NOME DO TRAINER"}, 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 Só editar nome do trainer. mais esse como funciona só por nome do treiner ai quando o player tiver atackando o player ele não e puxado é isso? Ou tem que por um id no chão? ta dando esse erro aqui oh [Error - LuaInterface::loadFile] data/creaturescripts/scripts/anti-push.lua:10: 'end' expected (to close 'function' at line 2) near '<eof>' [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/anti-push.lua) data/creaturescripts/scripts/anti-push.lua:10: 'end' expected (to close 'function' at line 2) near '<eof>' @up
Postado Março 19, 2016 9 anos Em 19/03/2016 em 05:03, DavyziinC disse: mais esse como funciona só por nome do treiner ai quando o player tiver atackando o player ele não e puxado é isso? Ou tem que por um id no chão? ta dando esse erro aqui oh [Error - LuaInterface::loadFile] data/creaturescripts/scripts/anti-push.lua:10: 'end' expected (to close 'function' at line 2) near '<eof>' [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/anti-push.lua) data/creaturescripts/scripts/anti-push.lua:10: 'end' expected (to close 'function' at line 2) near '<eof>' @up Isso, sem id sem nada, só checa se o player esta atacando o trainer. 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
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.