A base HUATSON ja vem com script base de Box, é só voce pegar como exemplo e usar!
info
Grupo: Conde
Registrado: 11/03/13
Posts: 629
Reputação: +183

@brazvct a pokeball nao esta aparecendo mais eu uso commando /cb funciona normalmente
Editado Maio 1 por kamus9629
info
Grupo: Conde
Registrado: 11/03/13
Posts: 629
Reputação: +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
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino

@kamus9629seu servidor possui level system?
Você quer fazer baú inicial que da pokémon?
Editado Maio 1 por 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
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: 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ú)
Editado Maio 3 por FlamesAdmin




info
Grupo: Visconde
Registrado: 14/08/11
Posts: 291
Reputação: +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
Editado Maio 1 por kamus9629