LU

[Encerrado] [Pokemon] Dúvidas? - Pda

Por lucashgas, 10 de jan. de 2012 em Tópicos Sem Resposta

brun123
pokemon
otserv
tibia
12.4k
1.9M
zerefshirouZ
23 de janeiro de 2012 às 14:50

Não sei se ja postaram isso, mas ja sei faz tempo

 

Enquanto ta no evoluindo se falar !cd da erro console, mas é simples só colocar uma condição se o nome for evolution return true certo? bem ta ai uma coisa para deixar um serve com menos bugs, qualquer coisa to aceitando pm

DrMastersD
23 de janeiro de 2012 às 14:57

Ae. Deu vontade de ajudar vocês(Mesmo que a maioria é um bando de folgados):

 

Paint(Testado em 1.4_d):

 

 

Npc:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Deka" script="paint.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="513" head="116" body="54" legs="114" feet="0" addons="2"/>
<parameters>
</parameters>
</npc>

 

Scripts:

 

Salve como paint.lua

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
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setMessage(MESSAGE_GREET, 'Welcome to my painting shop |PLAYERNAME|!')
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
 return false
end
local pokesalive = {}
if(msgcontains(msg, 'paint')) then
  selfSay('Do you want to paint your pokemon\'s ball?', cid)
  talkState = 1
elseif(msgcontains(msg, 'yes') and talkState == 1) then
 selfSay('Nice, you can choose: Pokeball, Greatball, Superball and Ultraball.', cid)
  talkState = 2
elseif(msgcontains(msg, 'no') and talkState == 1) then
 selfSay('So, whenever you want it, just came here and ask for!', cid)
 talkState = 0
 npcHandler:releaseFocus(cid)
elseif((msgcontains(msg, 'pokeball') or msgcontains(msg, 'poke ball') or msgcontains(msg, 'Pokeball') or msgcontains(msg, 'Poke ball')) and talkState == 2) then
 if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Pokeball? It will cost you 50 dollars!', cid)
 talkState = 3
 else
 selfSay('You must put the ball closed at the ball slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 3) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Pokeball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end

elseif((msgcontains(msg, 'greatball') or msgcontains(msg, 'great ball') or msgcontains(msg, 'Greatball') or msgcontains(msg, 'Great ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Greatball? It will cost you 50 dollars!', cid)
 talkState = 4
 else
 selfSay('You must put the ball closed at the balls slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 4) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Greatball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end

elseif((msgcontains(msg, 'superball') or msgcontains(msg, 'super ball') or msgcontains(msg, 'Superball') or msgcontains(msg, 'Super ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Superball? It will cost you 50 dollars!', cid)
 talkState = 5
 else
 selfSay('You must put the ball closed at the ball slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 5) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Superball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end

elseif((msgcontains(msg, 'ultraball') or msgcontains(msg, 'ultra ball') or msgcontains(msg, 'Ultraball') or msgcontains(msg, 'Ultra ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Ultraball? It will cost you 50 dollars!', cid)
 talkState = 6
 else
 selfSay('You must put the ball closed at the ball slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 6) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Ultraball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

Agora é so configurar. =D

E sim eu tirei a config de propósito.

 

Alguem configura Pra versão E???

aqui não funciona.. fda este problema

ai eu apago oq ele epde da outro na 61.. Valews aew

 

 

 

INFO: Starting OTScript Debug.lua

ERROR: paint.lua:38: unexpected symbol near ')'

INFO: Stopping OTScript Debug.lua

BRDominikB
23 de janeiro de 2012 às 15:14

Ae. Deu vontade de ajudar vocês(Mesmo que a maioria é um bando de folgados):

 

Paint(Testado em 1.4_d):

 

 

Npc:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Deka" script="paint.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="513" head="116" body="54" legs="114" feet="0" addons="2"/>
<parameters>
</parameters>
</npc>

 

Scripts:

 

Salve como paint.lua

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
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setMessage(MESSAGE_GREET, 'Welcome to my painting shop |PLAYERNAME|!')
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
 return false
end
local pokesalive = {}
if(msgcontains(msg, 'paint')) then
  selfSay('Do you want to paint your pokemon\'s ball?', cid)
  talkState = 1
elseif(msgcontains(msg, 'yes') and talkState == 1) then
 selfSay('Nice, you can choose: Pokeball, Greatball, Superball and Ultraball.', cid)
  talkState = 2
elseif(msgcontains(msg, 'no') and talkState == 1) then
 selfSay('So, whenever you want it, just came here and ask for!', cid)
 talkState = 0
 npcHandler:releaseFocus(cid)
elseif((msgcontains(msg, 'pokeball') or msgcontains(msg, 'poke ball') or msgcontains(msg, 'Pokeball') or msgcontains(msg, 'Poke ball')) and talkState == 2) then
 if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Pokeball? It will cost you 50 dollars!', cid)
 talkState = 3
 else
 selfSay('You must put the ball closed at the ball slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 3) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Pokeball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end

elseif((msgcontains(msg, 'greatball') or msgcontains(msg, 'great ball') or msgcontains(msg, 'Greatball') or msgcontains(msg, 'Great ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Greatball? It will cost you 50 dollars!', cid)
 talkState = 4
 else
 selfSay('You must put the ball closed at the balls slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 4) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Greatball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end

elseif((msgcontains(msg, 'superball') or msgcontains(msg, 'super ball') or msgcontains(msg, 'Superball') or msgcontains(msg, 'Super ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Superball? It will cost you 50 dollars!', cid)
 talkState = 5
 else
 selfSay('You must put the ball closed at the ball slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 5) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Superball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end

elseif((msgcontains(msg, 'ultraball') or msgcontains(msg, 'ultra ball') or msgcontains(msg, 'Ultraball') or msgcontains(msg, 'Ultra ball')) and talkState == 2) then
if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
 selfSay('Do you really want to paint your ball like a Ultraball? It will cost you 50 dollars!', cid)
 talkState = 6
 else
 selfSay('You must put the ball closed at the ball slot first.', cid)
 talkState = 0
 end
 elseif(msgcontains(msg, 'yes') and talkState == 6) then
  if isInArray(pokesalive, getPlayerSlotItem(cid,8).itemid) then
  if doPlayerRemoveMoney(cid,5000) == true then
  selfSay('Nice choose, from now one, it will look like a Ultraball! There are anything else that I can help you with?', cid)
  doTransformItem(getPlayerSlotItem(cid, 8).uid, )
  talkState = 0
  else
  selfSay('Sorry '.. getCreatureName(cid) ..', but you don\'t have enough money.', cid)
  talkState = 0
  end
 else
 selfSay('Please keep your ball closed at the ball slot.', cid)
 talkState = 0
 end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

 

Agora é so configurar. =D

E sim eu tirei a config de propósito.

 

Alguem configura Pra versão E???

aqui não funciona.. fda este problema

ai eu apago oq ele epde da outro na 61.. Valews aew

 

 

 

INFO: Starting OTScript Debug.lua

ERROR: paint.lua:38: unexpected symbol near ')'

INFO: Stopping OTScript Debug.lua

 

doTransformItem(getPlayerSlotItem(cid, 8).uid, )

Ta faltando configurar ai.

ou

Vc não configurou direito.

Editado Janeiro 23 por Zawe

suarez23S
23 de janeiro de 2012 às 15:19

zeref eu fiz tudo oq fala seu gia pra pom shiny n jogo + cuando eu falo /m shiny venusaur aparese um scyther tirando passive e qnd morre e um orco 0o ajuda plx

DrMastersD
23 de janeiro de 2012 às 15:23

Zawe.. Como assim configura???

vo loga outra conta akie pra te dar 5 Rep+

BRDominikB
23 de janeiro de 2012 às 15:31

Zawe.. Como assim configura???

vo loga outra conta akie pra te dar 5 Rep+

Você provavelmente não configurou direito.

Editado Janeiro 23 por Zawe

zerefshirouZ
23 de janeiro de 2012 às 15:32

... mas funciona normal? você deve ter pego o corpse do dat e itemtype errado e.e

suarez23S
23 de janeiro de 2012 às 16:05

pode me pasar o portfoil do shiny venusaur?

 

[23/01/2012 15:00:24] data/creaturescripts/scripts/spawn.lua:38: in function <data/creaturescripts/scripts/spawn.lua:32>

[23/01/2012 15:01:14] data/creaturescripts/scripts/goback.lua:10: in function <data/creaturescripts/scripts/goback.lua:1>

[23/01/2012 15:01:14] data/creaturescripts/scripts/login.lua:115: in function <data/creaturescripts/scripts/login.lua:81>

Deu tudo isso como posso areglar?

 

TMB DEU ISSO

 

 

[23/01/2012 15:00:19] [Error - LuaScriptInterface::loadFile] data/lib/configuration.lua:1341: '}' expected (to close '{' at line 1334) near '['

[23/01/2012 15:00:19] [Warning - LuaScriptInterface::initState] Cannot load data/lib/

zerefshirouZ
23 de janeiro de 2012 às 16:11

Erro na linha ai você esqueceu de fechar ou apagou algo que fechava uma tabela, o tutorial está certo, oque você fez que está errado

suarez23S
23 de janeiro de 2012 às 16:22

men ese error ta dando sem aplicar shiny venu so ta dando soshino

 

tem como sacar os lvl dos pokes n gosto do poketibia com lvl em pokes

zerefshirouZ
23 de janeiro de 2012 às 16:30

@suarez23

 

Você bugou o configuration.lua vai dar erro em kse tudo do ot e.e

suarez23S
23 de janeiro de 2012 às 16:50

presiso os portfoil onde pego eles?

 

aff fiz tudo certinho e falo /m shiny venusaur e aparese 1 scyther tirando passive aff

 

pss matei ele olha 15:49 You see a dead orc.

ItemID: [2862].

DecayTo: [2863].

Position: [X: 1066] [Y: 1138] [Z: 7].

fagundes14F
23 de janeiro de 2012 às 17:16

@Topico

 

Se Alguem Puder Me Ajuda Eu Estou Tentando Criar Uma Spell Chamada Twister Igual o PXG

Onde Tem A Determinada Area Que No Caso E Random E É Na Frente Do Pokemon , E Que O Distance Acompanha o Efeito

Mais Nao Esta Funcionado ;S

 

Se Alguem Poder Me Ajudar , Ficarei Muito Grato

 

REP +

 

ABRASS

suarez23S
23 de janeiro de 2012 às 17:38

uma ajuda e do rep por 1 mes xD eu do control +k e abre tudo bem + qnd um player da control k da bug o server

BLACKHERTB
23 de janeiro de 2012 às 17:54

lucashgas

 

bro Eu não preciso colocar o passivo pokemon

eu preciso saber é como adicionar um ataque passivo

ejemp electabuzz attack passive electric

 

 

 

 

pelo que eu intendi ele quer um ataque passivo igual SvkE,

para quem não lembra, a magia do Golduck/Psyduck é a Cofusion Stun

E não precisa estár "atacando um pokemon para que ataque".

No servidor do WolfVR, ela funciona em Defense com InFight..

 

alguem poderia tentar?

Editado Janeiro 23 por BLACKHERT