KA

Sistem inicial e BOX COM LEVEL SISTEM [Resolvido]

Por kamus9629, 30 de abr. de 2020 em Scripts

8
1.2k
kamus9629K
30 de abril de 2020 às 21:32

 

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 image.thumb.png.38e32ad0273f20d3082af69729593ea1.png

 

Editado Maio 1 por kamus9629

01 de maio de 2020 às 13:55

A base HUATSON ja vem com script base de Box, é só voce pegar como exemplo e usar!

kamus9629K
01 de maio de 2020 às 13:56

 

@brazvct a pokeball nao esta aparecendo mais eu uso commando /cb funciona normalmente

Editado Maio 1 por kamus9629

01 de maio de 2020 às 13:59
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.

kamus9629K
01 de maio de 2020 às 14:01
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

 

Citar
local 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

 

 

01 de maio de 2020 às 18:11

@kamus9629seu servidor possui level system?

Você quer fazer baú inicial que da pokémon?

Editado Maio 1 por FlamesAdmin

kamus9629K
01 de maio de 2020 às 18:16
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

95562000_549228762637256_4872640109549191168_n.png?_nc_cat=111&_nc_sid=b96e70&_nc_ohc=9XbGr2CBtIgAX_iPhg1&_nc_ht=scontent.fsdu5-1.fna&oh=672e083fc00e934e033205e585106afb&oe=5ED2E081

15 minutos atrás, FlamesAdmin disse:

@kamus9629seu servidor possui level system?

Você quer fazer baú inicial que da pokémon?

s

01 de maio de 2020 às 18:27
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