Ir para conteúdo
  • Cadastre-se

Normal [pedido] Scripts Anti-Push Treiner


Posts Recomendados

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+

Link para o post
Compartilhar em outros sites

Data/talkactions/scripts e crie um arquivo .lua chamado  treinaroff.lua e adicione esse script nele.

Spoiler

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 Night Criador do Script! 

 

Bom uso! xD 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites

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.

 

 

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
9 horas atrás, 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 

Link para o post
Compartilhar em outros sites
10 horas atrás, 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

asdukeeh.jpg

Link para o post
Compartilhar em outros sites

então eu implantei no meu servidor ele deu esse erro aqui

 

[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>'

Link para o post
Compartilhar em outros sites
43 minutos atrás, DavyziinC disse:

Cara usa logo o que eu te falei e finalizar logo esse seu problema! 

 

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Link para o post
Compartilhar em outros sites
Em 20/03/2016 at 00:08, DavyziinC disse:

Amigo não quero de comando e sim uma scripts que não precisa de comando. desculpa ae

Desculpa, esqueci de você. Estranho, uso ele exatamente assim no meu server, mas no seu ta faltando um end.

 

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
 end
	return true
end

 

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
  • 3 years later...
Em 22/03/2016 em 11:39, DukeeH disse:

Desculpa, esqueci de você. Estranho, uso ele exatamente assim no meu server, mas no seu ta faltando um end.

 


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
 end
	return true
end

 

 

Vllw rep ++

 

Link para o post
Compartilhar em outros sites
  • 3 years later...
Em 18/03/2016 em 16: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.

 

 

Tem como add mais de 1 nome? tenho 2 tipos de Trainer

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo