Tipo do script: Npc's
Protocolo (versão do Tibia): 8.54
Servidor utilizado: The forgent server
Nível de experiência: alguns meses
Adicionais/Informações: Pessoal do :XTibia_smile: eu tenho um script de gym que eu mesmo modifiquei.. (obs: não sei de nada de script, só sei mudar falas..) Eu vou mandar o script aqui pra vcs
Npc's/Gym Brock:
<?xml version="1.0"?>
<npc name="Brock" script="data/npc/scripts/brock.lua" access="5" lookdir="0">
<health now="9000" max="9000"/>
<look type="178" head="20" body="30" legs="40" feet="50" corpse="3128"/>
</npc>
Npc's/scripts/brock:
target = 0
focus = 0
talk_start = 0
function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
end
function onCreatureTurn(creature)
end
function onCreatureSay(cid, type, msg)
msg = string.lower(msg)
if ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 5 then
selfSay('hi ' .. 'Olá, fale com que pokemon meu você quer batalhar e iremos à luta!')
focus = cid
talk_start = os.clock()
elseif (string.find(msg, '(%a*)graveler(%a*)') and focus ~= 0) then
selfSay('/m brock graveler')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)geodude(%a*)') and focus ~= 0) then
selfSay('/m brock geodude')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)onix(%a*)') and focus ~= 0) then
selfSay('/m brock onix')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)golem(%a*)') and focus ~= 0) then
selfSay('/m brock golem')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)rhydon(%a*)') and focus ~= 0) then
selfSay('/m brock rydon')
focus = 0
talk_start = 0
elseif (string.find(msg, '(%a*)rhyhorn(%a*)') and focus ~= 0) then
selfSay('/m brock rhyhorn')
focus = 0
talk_start = 0
end
end
function onCreatureChangeOutfit(creature)
end
function onThink()
if focus > 0 then
x, y, z = creatureGetPosition(focus)
myx, myy, myz = selfGetPosition()
if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then
selfTurn(0)
end
if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then
selfTurn(2)
end
if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then
selfTurn(1)
end
if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then
selfTurn(3)
end
if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(1)
end
if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then
selfTurn(3)
end
if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(2)
end
if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then
selfTurn(0)
end
if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(1)
end
if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then
selfTurn(3)
end
if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(2)
end
if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then
selfTurn(0)
end
if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(1)
end
if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then
selfTurn(3)
end
if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(2)
end
if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then
selfTurn(0)
end
end
if (os.clock() - talk_start) > 30 then
if focus > 0 then
selfSay('Va embor se vc nao pediu nada!Dexa o otro treinar!Se ja pediu ignore!')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Tiau!Volte sempre que quiser matar monstros!.')
focus = 0
end
end
end
Créditos dedicados 99%:skya tura
1% (por modificar coisas):Eu, BlueShardXD
Legal, é que aqui tah tudo certo mais eu queria que vcs modificassem pra quando eu falar "oi" ele perguntasse se eu realmente queriria batalhar com ele. Daí as respostas "sim" "não" . Se disser sim ele vai mandando esses pokes de 1 a 1 na sequencia: Brock geodude, Brock graveler, Brock golem, Brock rhyhorn, Brock rhydon, Brock onix, e quando seus pokes todos acabam o poke dele some e ele diz "Treine mais e tente outra vez". Se disser não ele diz "Volte quando estiver preparado!". Mano eu to prescisando urgente desse script e eu sei que quando eu conseguir aqui nesse tópico muitas pessoas que procuram a mesma coisa vão ficar felizes.. então eu pesso que POR FAVOR tentem me ajudar a ajudar os outros
Ah!! Esse npc fica se movendo e eu queria que ele ficasse parado.. se for possível...
OBRIGADO DESDE JÁ