Em 30/03/2016 at 09:59, luizmachado1 disse:Esse sistema de addonbox poder vim addons aleatorios..function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { premium = true, -- 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 = 100, -- level para poder usar addons box } local items = {13064,13060} ----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)endcriar 1 arquivo com nome addonbox.lua poder escolher entre as 2 script
1-- script poder escolher level para abrir addon box e addons aleatorios
2-- script e bem basica só poder ganhar 1 addon na addon box
function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { premium = true, -- 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 } id = 13064 count = 1 -- id do item e quantidade 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, id, count) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Abriu Addons Box E Ganhou Addons De "..getItemNameById(id)..".") doRemoveItem(item.uid, 1)endtag
<action itemid="id_do_item" event="script" value="addonbox.lua"/>
Tem como configurar pra uns addons serem raros de ser ganhos?







info
Grupo: Artesão
Registrado: 08/10/15
Posts: 103
Reputação: +34
Esse sistema de addonbox poder vim addons aleatorios.. function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { premium = true, -- 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 = 100, -- level para poder usar addons box } local items = {13064,13060} ----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) endcriar 1 arquivo com nome addonbox.lua poder escolher entre as 2 script
1-- script poder escolher level para abrir addon box e addons aleatorios
2-- script e bem basica só poder ganhar 1 addon na addon box
function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { premium = true, -- 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 } id = 13064 count = 1 -- id do item e quantidade 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, id, count) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce Abriu Addons Box E Ganhou Addons De "..getItemNameById(id)..".") doRemoveItem(item.uid, 1) endtag
Editado Março 30 por luizmachado1