BR
poketibia

(Pedido) Addons System PokeTibia

Por BrunooMaciell, 06 de abr. de 2016 em Scripts

9
2.4k
BrunooMaciellB
06 de abril de 2016 às 20:44

Eu estava olhando o forum e pesquisando e na achei mais o tutorial de como coloca o systema de addons no PDA - poketibia!!!

 

Se alguem tiver aii o tutorial do systema de addons poketibia!!

 

Rep+

06 de abril de 2016 às 20:58

Olhar Ai addons sistema do stigal

 

 

vc poder usar addons box sistema feito por min

Spoiler

function onUse(cid, item, fromPosition, itemEx, toPosition)
    
    local config = {
        premium = false, -- se precisa ser premium account (true or false)
        battle = false,    -- se precisa estar sem battle (true). Se colocar false, poderá usar addons box no meio de batalhas
                level = 10, -- level para poder usar addons box
    }

       local items = {12591,12592,12593,12594,12596,12597} ----id do addon
    
    
        if getPlayerLevel(cid) < config.level then
        doPlayerSendCancel(cid, "precisar ser level ".. config.level ..".") 
        return true
        end

    if config.premium and not isPremium(cid) then
        doPlayerSendCancel(cid, "Somente player premium.")
        return true
    end
    
    if config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then
        doPlayerSendCancel(cid, "Your pokemon can't concentrate during battles.")
        return true
    end
    
    doPlayerAddItem(cid, items[math.random(#items)])
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Abriu Addon Box")
    doRemoveItem(item.uid, 1)
end

 

Spoiler

link:

 

 

 

Editado Abril 6 por luizmachado1

BrunooMaciellB
06 de abril de 2016 às 21:11

mais passa pra min o tutorial completo de como por o systema de addons!!!

 

porque este do stigal ta muito confuso ele encinando =s

Editado Abril 6 por brunoo1996

06 de abril de 2016 às 21:14

Script Dos Addon - Creditos RicardoSohnn •[/b]

 

 

Em actions.xml adicione a seguinte tag:

 

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

 

Spoiler

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

 

addons.lua

 

Spoiler

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

 

Spoiler

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

 

Spoiler

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

 

06 de abril de 2016 às 21:16

 brunoo1996

Citar

 brunoo1996

 

BrunooMaciellB
06 de abril de 2016 às 21:22

ok vo testa aqui primeiro pra ve logo logo te falo!

BrunooMaciellB
07 de abril de 2016 às 19:06

nao deu certo eu precisava de algum tutorial bem completo sobre o systema pois adicionei todos addons eos itens no cliente mais queria sabe e eu acho que falto um tutorial onde fala que tem que adicionar no itens.xml o item 

07 de abril de 2016 às 19:08

me adicionar facebook para eu poder ajudar vc

 

https://www.facebook.com/profile.php?id=100011055639641

BrunooMaciellB
07 de abril de 2016 às 19:11

eu adicionei mais e tu eo que??