Box [+4] Lendary Pokemons

HosterDaian
em Actions e Talkactions

HosterDaian

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 01/02/11Posts: 2Char no Tibia: Ragos Kaill

E aew ;D

 

Hj vou ensinar como criar uma BOX para server de POKETIBIA!

 

Script testado em: Pokeserver [TFS] 0.3.6 v4.1

 

Começando, criei um arquivo chamado box4.lua em \data\actions\scripts\box

Se ja tiver algum documento com mesmo nome substitua.

 

Dentro do arquivo coloque isso:

 

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

 

local box = {

[1] ={msg = "You opened the box [+4]",np = 'mew Pokeball'},

[2] ={msg = "You opened the box [+4]",np = 'mewtwo Pokeball'},

[3] ={msg = "You opened the box [+4]",np = 'zapdos Pokeball'},

[4] ={msg = "You opened the box [+4]",np = 'moltres Pokeball'},

[5] ={msg = "You opened the box [+4]",np = 'articuno Pokeball'},

 

}

local level = 50

local e = box[math.random(1,28)]

local boxid = 2531

 

if getPlayerLevel(cid) >= level then

doPlayerSendTextMessage(cid,22,e.msg)

b = doPlayerAddItem(cid, boxid, 1)

doItemSetAttribute(b, "name", e.np)

doRemoveItem(item.uid, 1)

else

doPlayerSendCancel(cid, "Vc precisa de "..level.." para usar esta box.")

end

return TRUE

end

 

Vermelho: Pokemons que serao sorteados (vc ganha um poke quando da use) OBS: tome cuidado

com as letras maiusculas e minusculas, pois pode bugar! example: mewtwo Pokeball, nome do poke minusculo, Pokeball com incial maiuscula.

Verde: Level que podera usar a box.

Rosa: Aconselho deixar assim. mais eh pra diferenciar os pokemons.

Azul: Id da pokebola.

 

Pokeballs:

[2149]Pokeball

[2521]Masterball

[2150]Ultraball

[2146]Greatball

[2147]Superball

 

Agora em \SEUSERVIDOR\data\actions, abra o documento actions.xml com o bloco de notas

e adicione isto em qualquer lugar:

 

 

<action itemid="7891" event="script" value="box/box4.lua"/>

 

 

Eh isso ;D

 

Gostou? +REP

jeancassio2010

Madruga Star
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 02/12/10Posts: 15Char no Tibia: Hanna-montana

errado, pois esses ids pokeball=2149 etc, são balls de catch, nao de goback. Se nao entende o script, nao tente Fazer tutorial dele, flw.

naruto-shippuden-ultimate-ninja-storm-2-box-art-revealed.jpg

Te ajudei?? DÊ REP+++

rodrigocmj18

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/01/11Posts: 15

E aew ;D

 

Hj vou ensinar como criar uma BOX para server de POKETIBIA!

 

Script testado em: Pokeserver [TFS] 0.3.6 v4.1

 

Começando, criei um arquivo chamado box4.lua em \data\actions\scripts\box

Se ja tiver algum documento com mesmo nome substitua.

 

Dentro do arquivo coloque isso:

 

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

 

local box = {

[1] ={msg = "You opened the box [+4]",np = 'mew Pokeball'},

[2] ={msg = "You opened the box [+4]",np = 'mewtwo Pokeball'},

[3] ={msg = "You opened the box [+4]",np = 'zapdos Pokeball'},

[4] ={msg = "You opened the box [+4]",np = 'moltres Pokeball'},

[5] ={msg = "You opened the box [+4]",np = 'articuno Pokeball'},

 

}

local level = 50

local e = box[math.random(1,28)]

local boxid = 2531

 

if getPlayerLevel(cid) >= level then

doPlayerSendTextMessage(cid,22,e.msg)

b = doPlayerAddItem(cid, boxid, 1)

doItemSetAttribute(b, "name", e.np)

doRemoveItem(item.uid, 1)

else

doPlayerSendCancel(cid, "Vc precisa de "..level.." para usar esta box.")

end

return TRUE

end

 

Vermelho: Pokemons que serao sorteados (vc ganha um poke quando da use) OBS: tome cuidado

com as letras maiusculas e minusculas, pois pode bugar! example: mewtwo Pokeball, nome do poke minusculo, Pokeball com incial maiuscula.

Verde: Level que podera usar a box.

Rosa: Aconselho deixar assim. mais eh pra diferenciar os pokemons.

Azul: Id da pokebola.

 

Pokeballs:

[2149]Pokeball

[2521]Masterball

[2150]Ultraball

[2146]Greatball

[2147]Superball

 

Agora em \SEUSERVIDOR\data\actions, abra o documento actions.xml com o bloco de notas

e adicione isto em qualquer lugar:

 

 

<action itemid="7891" event="script" value="box/box4.lua"/>

 

 

Eh isso ;D

 

Gostou? +REP

 

 

Outro erro

deve ser assim local e = box[math.random(1,5)]

e nao assim local e = box[math.random(1,28)]

Tiagohells

Dark Tiagohells
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/12/10Posts: 53Gênero: MasculinoChar no Tibia: Uknown

Railan159

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/06/11Posts: 4Char no Tibia: Sterelol

http://www.xtibia.com/forum/topic/159876-sistema-m1-m12-como-prometido/

 

Ae o systema de m1... so q e ate m12 :]

Upa ae meus digimons n vao cais sua mao!!!
[html]http://www.digimonpets.xpg.com.br/levelup.php?id=378733[/html]
[html]http://www.digimonpets.xpg.com.br/levelup.php?id=378697[/html]