CA
dúvida

Como coloco uma pokebola com um pokemon dentro pra quest ?

Por CayoZanatto, 25 de fev. de 2014 em Archived

22
2k
CayoZanattoC
25 de fevereiro de 2014 às 19:00

Quero saber como coloco pra ganhar um pokemon na quest .

TredfgT
25 de fevereiro de 2014 às 20:02

Cria uma arquivo no action com o nome da quest e poem isso

 

local starterpokes = {
["Nome do poke"] = {x = 53, y = 70, z = 7},( ea position)
}
local level = Aqui o level que ele vem se o teu server tive level.
local extrastr = 1.5
local btype = "Qual ball vc quer que venha"
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > 5 then
return true
end
local pokemon = ""
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end
addPokeToPlayer(cid, pokemon, level, extrastr, nil, 0, btype, true)
doPlayerAddItem(cid, 2394, 10)
doPlayerSendTextMessage(cid, 27, " Texto aqui.")
doPlayerSendTextMessage(cid, 27, "Texto aqui!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
CayoZanattoC
25 de fevereiro de 2014 às 22:03

 

Cria uma arquivo no action com o nome da quest e poem isso

 

local starterpokes = {
["Nome do poke"] = {x = 53, y = 70, z = 7},( ea position)
}
local level = Aqui o level que ele vem se o teu server tive level.
local extrastr = 1.5
local btype = "Qual ball vc quer que venha"
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > 5 then
return true
end
local pokemon = ""
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end
addPokeToPlayer(cid, pokemon, level, extrastr, nil, 0, btype, true)
doPlayerAddItem(cid, 2394, 10)
doPlayerSendTextMessage(cid, 27, " Texto aqui.")
doPlayerSendTextMessage(cid, 27, "Texto aqui!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end

 

N ta funcionando tipo , eu clico no bau e n acontece nda

25 de fevereiro de 2014 às 22:16

Colocou a TAG?

 

 

Tag no Actions.xml:

 

<action actionid="6776" event="script" value="nomedoarquivo.lua"/>

 

 

Agora coloca o action 6776 no Baú

CayoZanattoC
25 de fevereiro de 2014 às 22:27

Colocou a TAG?

 

 

Tag no Actions.xml:

<action actionid="6776" event="script" value="nomedoarquivo.lua"/>

Agora coloca o action 6776 no Baú

Sim sim , mais so da pra players de lvl 5 pegarem o bagui : if getPlayerLevel(cid) > 5 then , como deixo pra qualquer lvl pegar?

25 de fevereiro de 2014 às 22:33

 

Colocou a TAG?

 

 

Tag no Actions.xml:

<action actionid="6776" event="script" value="nomedoarquivo.lua"/>

Agora coloca o action 6776 no Baú

Sim sim , mais so da pra players de lvl 5 pegarem o bagui : if getPlayerLevel(cid) > 5 then , como deixo pra qualquer lvl pegar?

 

 

So deixa 1 ué '-' if getPlayerLevel(cid) > 1 then

CayoZanattoC
25 de fevereiro de 2014 às 22:54

 

 

Colocou a TAG?

 

 

Tag no Actions.xml:

<action actionid="6776" event="script" value="nomedoarquivo.lua"/>

Agora coloca o action 6776 no Baú

Sim sim , mais so da pra players de lvl 5 pegarem o bagui : if getPlayerLevel(cid) > 5 then , como deixo pra qualquer lvl pegar?

 

 

So deixa 1 ué '-' if getPlayerLevel(cid) > 1 then

 

Cara vo manda meu bagui pra vc ver oq ta errado , q n ta funcionando

 

Meu chest da :

ACTIONS : 6776

UID: 5945 ( N TEM NDA COM ISSO )

 

Meu metang.lua (nome da quest)

 

local starterpokes = {
["Metang"] = {x=219, y=1049, z=8},
}
local level = 5
local extrastr = 1.5
local btype = "ultra"
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > 1 then
return true
end
local pokemon = ""
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end
addPokeToPlayer(cid, pokemon, level, extrastr, nil, 0, btype, true)
doPlayerAddItem(cid, 2394, 10)
doPlayerSendTextMessage(cid, 27, " Boa seu preto fedido")
doPlayerSendTextMessage(cid, 27, "Você ja pego o metang seu negão!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
E no actions ta :
1- <action actionid="6776" event="script" value="quests/metang.lua"/>
2- <action uniqueid="5945" event="script" value="quests/metang.lua"/>
26 de fevereiro de 2014 às 00:04

Oq acontece, é q o "scripter Shoguns", nao soube retirar as tags:

local level = 5
 
if getPlayerLevel(cid) > 1 then
return true
end
 
addPokeToPlayer(cid, pokemon, level, extrastr, nil, 0, btype, true)    

Tenta:

 

local starterpokes = {
["Metang"] = {x=219, y=1049, z=8},
}
local extrastr = 1.5
local btype = "ultra"
function onUse(cid, item, frompos, item2, topos)
local pokemon = ""
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end
addPokeToPlayer(cid, pokemon, extrastr, nil, 0, btype, true)
doPlayerAddItem(cid, 2394, 10)
doPlayerSendTextMessage(cid, 27, " Boa seu preto fedido")
doPlayerSendTextMessage(cid, 27, "Você ja pego o metang seu negão!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end

#OFF
Que falta de respeito com seus players ein cara
doPlayerSendTextMessage(cid, 27, " Boa seu preto fedido")
doPlayerSendTextMessage(cid, 27, "Você ja pego o metang seu negão!")

Editado Fevereiro 26 por FlamesAdmin

26 de fevereiro de 2014 às 05:36

 

Oq acontece, é q o "scripter Shoguns", nao soube retirar as tags:

local level = 5
 
if getPlayerLevel(cid) > 1 then
return true
end
 
addPokeToPlayer(cid, pokemon, level, extrastr, nil, 0, btype, true)    

Tenta:

 

local starterpokes = {
["Metang"] = {x=219, y=1049, z=8},
}
local extrastr = 1.5
local btype = "ultra"
function onUse(cid, item, frompos, item2, topos)
local pokemon = ""
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end
addPokeToPlayer(cid, pokemon, extrastr, nil, 0, btype, true)
doPlayerAddItem(cid, 2394, 10)
doPlayerSendTextMessage(cid, 27, " Boa seu preto fedido")
doPlayerSendTextMessage(cid, 27, "Você ja pego o metang seu negão!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end

#OFF
Que falta de respeito com seus players ein cara
doPlayerSendTextMessage(cid, 27, " Boa seu preto fedido")
doPlayerSendTextMessage(cid, 27, "Você ja pego o metang seu negão!")

 

 

Não mexo com Pokemon faz mais de 2 anos...

LegnusL
26 de fevereiro de 2014 às 05:57

FlamesAdmin, procura maneirar essa arrogância aí fera..

 

 

 

 

 

 

 

 

 

 

~ Adicionei storage ao script, o player irá pegar o item apenas uma vez.

local starterpokes = {
["Metang"] = {x=219, y=1049, z=8},
}
 
local extrastr = 1.5
local btype = "ultra"
 
function onUse(cid, item, frompos, item2, topos)
 
local pokemon = ""
 
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
 
if pokemon == "" then return true end

if getPlayerStorageValue(cid, 888888) == 1 then
 doPlayerSendCancel(cid, "Você ja pegou o Metang!")
  else
 
 addPokeToPlayer(cid, pokemon, extrastr, nil, 0, btype, true)    
   doPlayerAddItem(cid, 2394, 10)                                         
doPlayerSendTextMessage(cid, 27, " Boa, você pegou o item!")

doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
setPlayerStorageValue(cid, 888888, 1)

end
 
return true
end

Editado Fevereiro 26 por Nogard

CayoZanattoC
26 de fevereiro de 2014 às 12:16

FlamesAdmin, procura maneirar essa arrogância aí fera..

 

 

Em local pokemon = "" tem que colocar o nome do poke?

 

 

 

 

 

 

 

~ Adicionei storage ao script, o player irá pegar o item apenas uma vez.

local starterpokes = {
["Metang"] = {x=219, y=1049, z=8},
}
 
local extrastr = 1.5
local btype = "ultra"
 
function onUse(cid, item, frompos, item2, topos)
 
local pokemon = ""
 
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
 
if pokemon == "" then return true end

if getPlayerStorageValue(cid, 888888) == 1 then
 doPlayerSendCancel(cid, "Você ja pegou o Metang!")
  else
 
 addPokeToPlayer(cid, pokemon, extrastr, nil, 0, btype, true)    
   doPlayerAddItem(cid, 2394, 10)                                         
doPlayerSendTextMessage(cid, 27, " Boa, você pegou o item!")

doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
setPlayerStorageValue(cid, 888888, 1)

end
 
return true
end

 

Em local pokemon = "" tem que colocar o nome do poke?

26 de fevereiro de 2014 às 16:30

Nao precisa, ja tem o nome e a posiçao no inicio do script.

CayoZanattoC
26 de fevereiro de 2014 às 17:42

Nao precisa, ja tem o nome e a posiçao no inicio do script.

Continua do mesmo geito , eu clico pra abrir o bau e o pokemon fdp n vai pro bag e nem pro depot , ainda por cima n aparece nda , clico no bau e n acontece nda
26 de fevereiro de 2014 às 17:59

Tenta desse jeito:

local starterpokes = {
["Metang"] = {x=219, y=1049, z=8},
}
local extrastr = 1.5
local btype = "ultra"
function onUse(cid, item, frompos, item2, topos)
local pokemon = ""
for a, b in pairs (starterpokes) do
if isPosEqualPos(topos, b) then
pokemon = a
end
end
if pokemon == "" then return true end
addPokeToPlayer(cid, pokemon, extrastr, nil, 0, btype, true)
doPlayerAddItem(cid, 2394, 10)
doPlayerSendTextMessage(cid, 27, "Parabéns!")
doPlayerSendTextMessage(cid, 27, "Você já pegou seu Metang!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end

26 de fevereiro de 2014 às 18:42

Tenta colocar um Unique no baú para impedir que ele se abra como um chest normal