A base HUATSON ja vem com script base de Box, é só voce pegar como exemplo e usar!
info
Group: Conde
Joined: 11/03/13
Posts: 629
Reputation: +183

@brazvct a pokeball nao esta aparecendo mais eu uso commando /cb funciona normalmente
Edited Maio 1 by kamus9629
info
Group: Conde
Joined: 11/03/13
Posts: 629
Reputation: +183

2 minutos atrás, kamus9629 disse:
@brazvct a pokeball nao esta aparecendo mais eu uso commando /cb funciona normalmente
É só ver o script, o id da box, o poke que ganha e a ball que ele vem.
1 minuto atrás, brazvct disse:É só ver o script, o id da box, o poke que ganha e a ball que ele vem.
vou te da um exemplo dos codigo que eu estou usando
essa e statua para pega o digimon so que por algum motivo ele nao ta pegando mesmo usando o mesmo ido do huatson e ele possui sistem de level observação
Citarlocal btype = "normal" local pokemon = "Gaomon[0/5]" local storage = 72785 function onUse(cid, item, frompos, item2, topos) if pokemon == "" then return true end if getPlayerStorageValue(cid, storage) <= 0 then addPokeToPlayer(cid, pokemon, 0, nil, btype) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce pegou seu "..pokemon.."!!") doSendMagicEffect(getThingPos(cid), 29) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) setPlayerStorageValue(cid, storage, 1) else doPlayerSendCancel(cid, "Você já pegou seu Pokémon") end return TRUE end
info
Group: Infante
Joined: 28/01/12
Posts: 1.6k
Reputation: +263
Gender: Masculino

@kamus9629seu servidor possui level system?
Você quer fazer baú inicial que da pokémon?
Edited Maio 1 by FlamesAdmin
3 minutos atrás, FlamesAdmin disse:@kamus9629seu servidor possui level system?
Você quer fazer baú inicial que da pokémon?
sim mais se voce poder fazer pramin com esse codigo que ta tendo mais effeito agradeço
function onUse(cid, item, frompos, item2, topos)
local hp = 800
if item.uid == 9996 then
queststatus = getPlayerStorageValue(cid,8749)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Lalamon[0/5]")
local ball1 = doPlayerAddItem(cid,11826,1)
doPlayerAddItem(cid,384,50)
doItemSetAttribute(ball1, "aid", hp)
setPlayerStorageValue(cid,8749,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja pegou seu pokemon.")
end
elseif item.uid == 9997 then
queststatus = getPlayerStorageValue(cid,8749)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Lalamon[0/5]")
local ball2 = doPlayerAddItem(cid,11826,1)
doPlayerAddItem(cid,384,50)
doItemSetAttribute(ball2, "aid", hp)
setPlayerStorageValue(cid,8749,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja pegou seu pokemon.")
end
elseif item.uid == 9998 then
queststatus = getPlayerStorageValue(cid,8749)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Lalamon[0/5]")
local ball3 = doPlayerAddItem(cid,11826,1)
doPlayerAddItem(cid,384,50)
doItemSetAttribute(ball3, "aid", hp)
setPlayerStorageValue(cid,8749,1)
else
doPlayerSendTextMessage(cid,22,"Voce ja pegou seu pokemon.")
end
else
return 0
end
return 1
end
15 minutos atrás, FlamesAdmin disse:@kamus9629seu servidor possui level system?
Você quer fazer baú inicial que da pokémon?
s
info
Group: Infante
Joined: 28/01/12
Posts: 1.6k
Reputation: +263
Gender: Masculino

local starterpokes = {
["Weedle"] = {x = 53, y = 70, z = 7},
["Rattata"] = {x = 51, y = 70, z = 7},
["Caterpie"] = {x = 49, y = 70, z = 7},
["Bellsprout"] = {x = 43, y = 70, z = 7},
["Oddish"] = {x = 45, y = 70, z = 7},
["Sunkern"] = {x = 47, y = 70, z = 7},
["Pidgey"] = {x = 55, y = 70, z = 7},
}
local level = 5 -- LEVEL DO POKE
local extrastr = 1.5 -- FORÇA ADICIONAL( CASO NÃO QUEIRA BASTA APAGAR A LINHA)
local btype = "normal"
local storage = 72785
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
if getPlayerStorageValue(cid, storage) <= 0 then
addPokeToPlayer(cid, pokemon, level, extrastr, nil, 0, btype, true, unique) -- COM FORÇA ADICIONAL
--addPokeToPlayer(cid, pokemon, level, nil, 0, btype, true, unique) -- SEM FORÇA ADICIONAL
doPlayerAddItem(cid, 2394, 10) -- ITEM QUE IRÁ GANHAR TAMBÉM
doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
else
doPlayerSendCancel(cid, "Você já pegou seu Pokémon")
end
return TRUE
end
Testa ai, configure no starterpokes os pokémons e as posições dos baús de cada um deles no mapa, os itens abaixo da função AddPokeToPlayer e também o level do player if getPlayerLevel(cid) > 5 then (level 5 ou maior que 5 pode abrir o baú)
Edited Maio 3 by FlamesAdmin




info
Group: Visconde
Joined: 14/08/11
Posts: 291
Reputation: +8
RESOLVIDO PESSOAL parece que huatson as box e pokemon inicial ele so cria ultraball nao sei motivo mais so aceita ele ae eu coloquei ultraball de volta e esta funcionando obrigado pela ajuda do pessoal
Edited Maio 1 by kamus9629