SU
poketibia

{Pedido} Editando Bau Inicial (Poketibia)

Por superbruno100, 07 de set. de 2011 em Archived

tibia
script
otserv
4
1.3k
superbruno100S
07 de setembro de 2011 às 11:52

Galera eu quero colocar EXP até o level 5 para os players

que clicar no bau para pegar um pokemon!!!

 

O meu sistema ta assim:

 

function onUse(cid, item, frompos, item2, topos)
local rat = {x=850,y=1077,z=5}
local cat = {x=852,y=1077,z=5}
local wee = {x=854,y=1077,z=5}
local pox = getPlayerPosition(cid)

if getPlayerStorageValue(cid, 54842) ~= 1 then
local health = 350
local maxhealth = 350
local description = "Contains a Rattata."
local poke1 = "This is Rattata's pokeball. HP = ["..health.."/"..maxhealth.."]"
item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", poke1)
doItemSetAttribute(item, "nome", "Rattata")
doItemSetAttribute(item, "description", description)
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, 2222)
doPlayerSendTextMessage(cid, 27, "Voce pegou um pokemon.")
doPlayerAddItem(cid, 2147,10)
doPlayerAddItem(cid, 2273,2)
setPlayerStorageValue(cid, 54842, 1)
else
doPlayerSendTextMessage(cid, 27, "Voce ja pegou seu pokemon.")
end
return TRUE
end

 

Quero acrecentar EXP, só 4 leveis!!! (Lembrando que ele já começa no level 1)

Editado Setembro 7 por Brunex

MulizeuM
07 de setembro de 2011 às 11:59

Ve se deu!

 

function onUse(cid, item, frompos, item2, topos)
local rat = {x=850,y=1077,z=5}
local cat = {x=852,y=1077,z=5}
local wee = {x=854,y=1077,z=5}
local pox = getPlayerPosition(cid)

if getPlayerStorageValue(cid, 54842) ~= 1 then
local health = 350
local maxhealth = 350
local description = "Contains a Rattata."
local poke1 = "This is Rattata's pokeball. HP = ["..health.."/"..maxhealth.."]"
item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", poke1)
doItemSetAttribute(item, "nome", "Rattata")
doItemSetAttribute(item, "description", description)
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, 2222)
doPlayerSendTextMessage(cid, 27, "Voce pegou um pokemon.")
doPlayerAddItem(cid, 2147,10)
doPlayerAddItem(cid, 2273,2)
setPlayerStorageValue(cid, 54842, 1)
doPlayerAddExp(cid,10000)
else
doPlayerSendTextMessage(cid, 27, "Voce ja pegou seu pokemon.")
end
return TRUE
end

superbruno100S
07 de setembro de 2011 às 12:07

Funfo, mais só que tah indo muita EXP!!!

Mais pode deixar que agora eu sei editar

vlw man!!! REP+

 

@UP Para quem não sabe o que mudo no Script...

 

doPlayerAddExp(cid,10000)

 

Aonde esta de dourado é o tanto de EXP que o player vai ganhar ;D

Editado Setembro 7 por Brunex

Henrique127H
07 de setembro de 2011 às 22:47

Muito Boom ! Parabens