Ir para conteúdo

Featured Replies

Postado

Galera Quero um Sistema De Addon Igual Do PxG, Pode Mudar De Cor, Da Fly, Ride, Surf, Sem Bugs Alguns Se Vocês Conseguirem Me Arruma Esse Sistema Agradeço 
 
REP+++ 
|
Base: Pokémon Pyrus, PDA 
|
REP+++
 
Facebook.com/PGenOnline

Editado por LoadingGo (veja o histórico de edições)

Resolvido por Wend II

Ir para solução
  • Respostas 8
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Igual a PokexGames ninguém passaria assim de mão beijada , mais tem os que tentam né   uso esse sistema de addon ai no meu servidor    Em actions.xml adicione a seguinte tag: <action itemid="

  • no some fuctions.lua    local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) r

Postado
  • Solução

Igual a PokexGames ninguém passaria assim de mão beijada , mais tem os que tentam né :P 

uso esse sistema de addon ai no meu servidor 

 

Em actions.xml adicione a seguinte tag:

<action itemid="xxxx" event="script" value="addons.lua"/>

 

Sendo, xxxx o id do item que vai dar o addon.

 

addons.lua

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
        local addons = {
        [xxxx] = {pokemon= "Scyther" , looktype = 510}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon
        }

        if #getCreatureSummons(cid) > 0 then
                doPlayerSendCancel(cid, "Please back your pokemon.")
                return false
        end    
        local numero = addons[item.itemid].looktype

        local pb = getPlayerSlotItem(cid, 8).uid
        local pk = addons[item.itemid].pokemon

        if getItemAttribute(pb,"poke") ~= pk then
                doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.")
        return false
        end

        if getItemAttribute(pb,"addon") < 1 then
                doRemoveItem(item.uid, 1)
                doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.")
                doSetItemAttribute(pb,"addon",numero)
                return true
        end    

return true

end

 

Na action do goback, no finalzinho antes de

else
        doPlayerSendCancel(cid, "This pokemon is fainted.")

end

 

Coloque:

local pk = getCreatureSummons(cid)[1]
        local pb = getPlayerSlotItem(cid, 8).uid
        local look = getItemAttribute(pb,"addon")
        if not look then
                doSetItemAttribute(pb,"addon",0)
        return false
        end
        if look > 0 then
                doSetCreatureOutfit(pk, {lookType = look}, -1)
        return true

        end

 

Agora em data/lib/catch system.lua

Depois de:

doItemSetAttribute(item, "description", description)

 

coloque:

doItemSetAttribute(item, "addon", 0)

 

Depois em data/talkactions/scripts/createpokeball.lua depois de:

doItemSetAttribute(item, "description", "Contains a "..name..".")

 

coloque:

doItemSetAttribute(item, "addon", 0)
Postado
  • Autor

Igual a PokexGames ninguém passaria assim de mão beijada , mais tem os que tentam né :P

uso esse sistema de addon ai no meu servidor

Em actions.xml adicione a seguinte tag:

Sendo, xxxx o id do item que vai dar o addon.

addons.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)		local addons = {		[xxxx] = {pokemon= "Scyther" , looktype = 510}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon		}		if #getCreatureSummons(cid) > 0 then				doPlayerSendCancel(cid, "Please back your pokemon.")				return false		end			local numero = addons[item.itemid].looktype		local pb = getPlayerSlotItem(cid, 8).uid		local pk = addons[item.itemid].pokemon		if getItemAttribute(pb,"poke") ~= pk then				doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.")		return false		end		if getItemAttribute(pb,"addon") < 1 then				doRemoveItem(item.uid, 1)				doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.")				doSetItemAttribute(pb,"addon",numero)				return true		end	return trueend

Na action do goback, no finalzinho antes de

else		doPlayerSendCancel(cid, "This pokemon is fainted.")end
Coloque:
local pk = getCreatureSummons(cid)[1]		local pb = getPlayerSlotItem(cid, 8).uid		local look = getItemAttribute(pb,"addon")		if not look then				doSetItemAttribute(pb,"addon",0)		return false		end		if look > 0 then				doSetCreatureOutfit(pk, {lookType = look}, -1)		return true        end
Agora em data/lib/catch system.lua

Depois de:

doItemSetAttribute(item, "description", description)
coloque:
doItemSetAttribute(item, "addon", 0)
Depois em data/talkactions/scripts/createpokeball.lua depois de:
doItemSetAttribute(item, "description", "Contains a "..name..".")
coloque:
doItemSetAttribute(item, "addon", 0)

Vou Testar Aqui :) ++ Para você.

Igual a PokexGames ninguém passaria assim de mão beijada , mais tem os que tentam né :P

uso esse sistema de addon ai no meu servidor

Em actions.xml adicione a seguinte tag:

Sendo, xxxx o id do item que vai dar o addon.

addons.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)		local addons = {		[xxxx] = {pokemon= "Scyther" , looktype = 510}, --xxxx = id do item do addon --- "Scyther" = nome do pokemon --- looktype = 1 é o looktype do pokemon com addon		}		if #getCreatureSummons(cid) > 0 then				doPlayerSendCancel(cid, "Please back your pokemon.")				return false		end			local numero = addons[item.itemid].looktype		local pb = getPlayerSlotItem(cid, 8).uid		local pk = addons[item.itemid].pokemon		if getItemAttribute(pb,"poke") ~= pk then				doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.")		return false		end		if getItemAttribute(pb,"addon") < 1 then				doRemoveItem(item.uid, 1)				doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.")				doSetItemAttribute(pb,"addon",numero)				return true		end	return trueend

Na action do goback, no finalzinho antes de

else		doPlayerSendCancel(cid, "This pokemon is fainted.")end
Coloque:
local pk = getCreatureSummons(cid)[1]		local pb = getPlayerSlotItem(cid, 8).uid		local look = getItemAttribute(pb,"addon")		if not look then				doSetItemAttribute(pb,"addon",0)		return false		end		if look > 0 then				doSetCreatureOutfit(pk, {lookType = look}, -1)		return true        end
Agora em data/lib/catch system.lua

Depois de:

doItemSetAttribute(item, "description", description)
coloque:
doItemSetAttribute(item, "addon", 0)
Depois em data/talkactions/scripts/createpokeball.lua depois de:
doItemSetAttribute(item, "description", "Contains a "..name..".")
coloque:
doItemSetAttribute(item, "addon", 0)

não sei se e necessário mas so por precaução adicionar isso

em actions.xml

No XXXX ID Da Box

data/actions/scripts Adicionei addons.lua

No Caso Do YYYY é O ID do Item que eo Addon Exemplo Uma Capa De Scyther

No Caso Do XXXX E O ID Da Box, Que Vai Sair Os Addons

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

local eggs = {YYYY}

local randomChance = math.random(1, 49)

if item2.itemid == XXXX then

doSendMagicEffect(getCreaturePosition(cid), 28)

doRemoveItem(item2.uid, 1)

doPlayerAddItem(cid, eggs[randomChance], 1)

doPlayerSendTextMessage(cid, 27, "Você ganhou um Addon!")

return true

end

end

                                                           278bf3ebeb128fc963dc594374adffa6c3e8b116

Editado por LoadingGo (veja o histórico de edições)

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo