Ir para conteúdo

Posts Recomendados

Olhe :

 

 

post-354920-0-93491900-1351460138_thumb.jpg

 

 

post-354920-0-90531300-1351460160_thumb.jpg

 

 

Ta,mais como Slicer disse qual é sua duvida?

 

mano oq exatamente tu ta tentando fazer? eh os baus dos pokes iniciais ms? ou um ball pra uma quest qlqr?

 

Tem que ser mais direto para te ajudarmos.

PAra quets :Pokecial.lua olhe o que tem dentro dele tudo que tem dentro dele foi o @Ghupk

 

 

-- Pokes iniciais ---

local starterpokes = {

["Mewtwo"] = {x = 1077, y = 1072, z = 7},

["Caterpie"] = {x = 1070, y = 1070, z = 7},

["Gengar"] = {x = 1073, y = 1070, z = 7}, -- x, y, x é a posição do BAU

}

 

local btype = "normal" -- pokeball normal

 

function onUse(cid, item, frompos, item2, topos)

 

if getPlayerLevel(cid) > 5 then -- o player precisa ser level MAIOR que 5 pra pegar

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

 

local gender = getRandomGenderByName(pokemon)

 

local happy = 250

local item = doCreateItemEx(2219)

doItemSetAttribute(item, "poke", pokemon)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "gender", gender)

doItemSetAttribute(item, "description", "Contains a "..pokemon..".")

doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")

doItemSetAttribute(item, "unique", getCreatureName(cid)) -- Faz seu pokemon FICAR UNIQUE ( NAO D APRA JOGAR FORA OU TROCAR COM ALGUEM )

 

doPlayerAddItemEx(cid, item, true)

 

doTransformItem(item, pokeballs[btype].on)

 

doPlayerSendTextMessage(cid, 27, "Você acabou de ganhar um "..pokemon..")

 

return TRUE

end

 

Agora o que eu coloquei em actions.xml

-- BOXES (Quets)

<action itemid="1740" event="script" value="Pokecial.lua"/>

Acho q ja vi o problema, ele copio o starte.lua e n mudou a tag .xml ou seja deve tar com nome Starte.lua que vc tinha mostrado acima, veja se n é isso.

Como ta o actions.xml

 

-- BOXES (poke inicial)

<action itemid="1740" event="script" value="Starter.lua"/>

 

-- BOXES (Quets)

<action itemid="1740" event="script" value="Pokecial.lua"/>

 

-- POKEMON PRIZE BOXES / RARE CANDY

<action itemid="11638-11641" event="script" value="box.lua"/>

<action itemid="6569" event="script" value="rarecandy.lua" allowfaruse="1"/>

 

Ah e eu não copiei o Starter o @Cleberadm que fez se vc for lá emcima no do topico se vai ver

 

Olhemo oe error que acabou de aparecer quando fui abrir o server :

[28/10/2012 19:09:21] [Error - LuaScriptInterface::loadFile] data/actions/scripts/Pokecial.lua:44: unfinished string near '")'

[28/10/2012 19:09:21] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/Pokecial.lua)

[28/10/2012 19:09:21] data/actions/scripts/Pokecial.lua:44: unfinished string near '")'

Postado: Hoje, 19:43

PAra quets :Pokecial.lua olhe o que tem dentro dele tudo que tem dentro dele foi o @Ghupk

 

Sei nao..

 

 

TROCA O ID DO BAU ( PEGA OUTRO CHEST.... ) ou coloca as posição e os pokes no starter...

E PORQUE VOCE TIRO AS ASPAS? ESSE É O ERRO MANO, VOCE TIRO AS ASPAS ¬¬

 

 

USA ESSE

 

 

 

-- Pokes iniciais ---

local starterpokes = {

["Mewtwo"] = {x = 1077, y = 1072, z = 7},

["Caterpie"] = {x = 1070, y = 1070, z = 7},

["Gengar"] = {x = 1073, y = 1070, z = 7}, -- x, y, x é a posição do BAU

}

 

local btype = "normal" -- pokeball normal

 

function onUse(cid, item, frompos, item2, topos)

 

if getPlayerLevel(cid) > 5 then -- o player precisa ser level MAIOR que 5 pra pegar

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

 

local gender = getRandomGenderByName(pokemon)

 

local happy = 250

local item = doCreateItemEx(2219)

doItemSetAttribute(item, "poke", pokemon)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "gender", gender)

doItemSetAttribute(item, "description", "Contains a "..pokemon..".")

doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")

doItemSetAttribute(item, "unique", getCreatureName(cid)) -- Faz seu pokemon FICAR UNIQUE ( NAO D APRA JOGAR FORA OU TROCAR COM ALGUEM )

 

doPlayerAddItemEx(cid, item, true)

 

doTransformItem(item, pokeballs[btype].on)

 

doPlayerSendTextMessage(cid, 27, "Você acabou de ganhar um "..pokemon.."")

 

return TRUE

end

 

 

Editado por Cleberadm

Cara eu tirei as Aspas porque o lek disse que Akele que era o error porque tinha 2 aspas e era para eu apagar 1

Cara 1 aspa era pra fecha o texto e a outra era pra fecha o ..pokemon.. ¬¬¬¬

Ah Cara quando eu for colocar o bau pelo remere's em Actions e utide sla eu tenho que colocar algum numero ou deixar como tá tudo 0

Cara já estou ficando doido não estou conseguindo nem a pau.

 

Pokecial.lua:

 

-- Pokes iniciais ---

local starterpokes = {

["Mewtwo"] = {x = 1074, y = 1071, z = 7},

["Caterpie"] = {x = 1070, y = 1071, z = 7},

["Gengar"] = {x = 1072, y = 1071, z = 7}, -- x, y, x é a posição do BAU

}

 

local btype = "normal" -- pokeball normal

 

function onUse(cid, item, frompos, item2, topos)

 

if getPlayerLevel(cid) > 5 then -- o player precisa ser level MAIOR que 5 pra pegar

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

 

local gender = getRandomGenderByName(pokemon)

 

local happy = 250

local item = doCreateItemEx(2219)

doItemSetAttribute(item, "poke", pokemon)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "gender", gender)

doItemSetAttribute(item, "description", "Contains a "..pokemon..".")

doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")

doItemSetAttribute(item, "unique", getCreatureName(cid)) -- Faz seu pokemon FICAR UNIQUE ( NAO D APRA JOGAR FORA OU TROCAR COM ALGUEM )

 

doPlayerAddItemEx(cid, item, true)

 

doTransformItem(item, pokeballs[btype].on)

 

doPlayerSendTextMessage(cid, 27, "Você acabou de ganhar um "..pokemon.."")

 

return TRUE

end

 

 

Actions.Xml

 

-- BOXES (Quets)

<action itemid="1740" event="script" value="Pokecial.lua"/>

 

 

Imagem de eu clikando nos Baús :

 

post-354920-0-10276100-1351469167_thumb.jpg

 

 

Cara o id do bau eu coloco qual ? No remere's amostra 1 e no Intem.XML mostra outro qual eu coloco ?

Faz assim... sabe o starter.LUA?

 

coloca isso la junto com os outros pokes...

 


["Mewtwo"] = {x = 1074, y = 1071, z = 7},
["Caterpie"] = {x = 1070, y = 1071, z = 7},
["Gengar"] = {x = 1072, y = 1071, z = 7},

 

PRONTO.. ai voce EXCLUI essa tag do ACTIOB.XML

<action itemid="1740" event="script" value="Pokecial.lua"/>

E só deixa a tag do starter.XML...

 

 

Depois no RME voce coloca o UNIQUEID no bau..

 

Se voce for usar mais que 1 bau vc adiciona 1 a mais nos outros baus

 

Ex:

 

1° bau = UniqueID 1005

2° bau voce coloca 1006

 

e continua assim...

Editado por Cleberadm

Cara foi exatamente que eu fiz nakeles 3 baus 1 eu coloquei 1005 ou 1006 e outro 1007. e Actions 0 e united esse ai cara e olha que eu fui en actions.xml e olheu se nenhum desse id ae tinha lá e não tinham

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...