Script estranho esse seu, mas vou contribuir.
Eu tenho um script do Brock que veio aqui e vou repassá-lo:
Cria um arquivo chamado Brock.xml na pasta NPC e cole isso dentro
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Brock" script="brock.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="178" head="17" body="54" legs="114" feet="0" addons="0"/>
<parameters>
<parameter key="message_greet" value="Fale comigo! {duelo}."/>
</parameters>
</npc>
Feche e salve.
Então, na pasta NPC/scripts crie um arquivo chamado brock.lua e coloque isso dentro:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function getUidsInContainer(containeruid) -- By MatheusMkalo
local dat = {}
for i = 0, (getContainerSize(containeruid)-1) do
local item = getContainerItem(containeruid, i)
if isContainer(item.uid) then
local items = getUidsInContainer(item.uid)
for i = 0, #items do
table.insert(dat, items[i])
end
else
table.insert(dat, item.uid)
end
end
return dat
end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
if getPlayerStorageValue(cid, 64999) == 1 then
selfSay('Eu vou vencê-lo mais tarde, {!exit}.', cid)
npcHandler:ResetNpc()
end
if msgcontains(msg:lower(), "duel") then
selfSay('Olá, eu sou o Líder do Ginásio de Pewter, meu nome é Brock e eu uso Pokémons do tipo Pedra, você quer batalhar comigo?', cid)
talk_state = 1
elseif msgcontains(msg:lower(), "yes") and talk_state == 1 then
if getPlayerStorageValue(cid,987876) ~= 1 then
if getPlayerStorageValue(cid,574225) ~= 1 then
selfSay('Go, Geodude', cid)
doCreateMonster("Gym Geodude", getCreaturePosition(getNpcId()))
doSendMagicEffect(getCreaturePosition(getNpcId()) , 10)
setPlayerStorageValue(cid, 574225, 1)
else
selfSay('...', cid)
end
else
if getPlayerStorageValue(cid, 987877) ~= 1 and getPlayerStorageValue(cid,574225) == 1 then
if getPlayerStorageValue(cid,574226) ~= 1 then
selfSay('Go, Onix', cid)
doCreateMonster("Gym Onix", getCreaturePosition(getNpcId()))
doSendMagicEffect(getCreaturePosition(getNpcId()) , 10)
talk_state = 2
setPlayerStorageValue(cid, 574226, 1)
else
selfSay('...', cid)
end
else
if getPlayerStorageValue(cid, 63768) ~= 1 and getPlayerStorageValue(cid,574226) == 1 and getPlayerStorageValue(cid,987877) == 1 then
selfSay('Parabéns, você me venceu com seu carisma e estilo. Aqui está sua recompensa...', cid)
doTransformItem(getUidsInContainer(getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid)[7], 2555)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Você ganhou do Líder de Ginásio de Pewter (Brock), você ganhou a Boulder Badge!")
setPlayerStorageValue(cid, 63768, 1)
else
selfSay('Você conseguiu... me venceu.', cid)
end
end
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Lembrando que você precisa adicionar ele no mapa, criar o pokémon "Gym Onix" ou mudar o pokémon que você quer que ele sumone, ok?
Se gostou REP+ aí.
Qualquer coisa pode falar.
Abraços






info
Grupo: Artesão
Registrado: 01/02/11
Posts: 102
Reputação: +50
Char no Tibia: Natsu Draganell
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Á