luizmachado1 34 Posted March 30, 2016 Share Posted March 30, 2016 (edited) 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) end criar 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) end tag <action itemid="id_do_item" event="script" value="addonbox.lua"/> Edited March 30, 2016 by luizmachado1 Link to comment Share on other sites More sharing options...
CaioSilva99 28 Posted April 6, 2016 Share Posted April 6, 2016 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)end criar 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)end tag <action itemid="id_do_item" event="script" value="addonbox.lua"/> Tem como configurar pra uns addons serem raros de ser ganhos? Link to comment Share on other sites More sharing options...
luizmachado1 34 Posted April 6, 2016 Author Share Posted April 6, 2016 (edited) Spoiler local chancemob = 10 -- chance de abrir e vir um monstro 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 chance = 1, -- chance poder vim } local items = {13064,13060} ----id do addon if doPlayerrandom(1,100) <= config.chance then doPlayerSendCancel(cid, "Sua Addons box Falhou") return true end 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 @ CaioSilva99 Edited April 6, 2016 by luizmachado1 Link to comment Share on other sites More sharing options...
CaioSilva99 28 Posted April 8, 2016 Share Posted April 8, 2016 Em 06/04/2016 at 18:13, luizmachado1 disse: Mostrar conteúdo oculto local chancemob = 10 -- chance de abrir e vir um monstro 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 chance = 1, -- chance poder vim } local items = {13064,13060} ----id do addon if doPlayerrandom(1,100) <= config.chance then doPlayerSendCancel(cid, "Sua Addons box Falhou") return true end 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 @ CaioSilva99 Desculpe caro amigo mas ainda continuo sem entender onde ponho os addons raros de vir, se pudesse explicar ficaria grato. Você ganhou um Rep+ pela ajuda anterior. Link to comment Share on other sites More sharing options...
Punchlines Nemmo 85 Posted December 24, 2016 Share Posted December 24, 2016 Em 08/04/2016 at 17:32, CaioSilva99 disse: Desculpe caro amigo mas ainda continuo sem entender onde ponho os addons raros de vir, se pudesse explicar ficaria grato. Você ganhou um Rep+ pela ajuda anterior. dx de ser burro man '-' ate um kid intenderia isso pra colocar os addons e akie local items = {13064,13060} ----id do addon ai akie voce configura '-' 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 chance = 1, -- chance poder vim Link to comment Share on other sites More sharing options...
Lordbaxx 291 Posted December 24, 2016 Share Posted December 24, 2016 41 minutos atrás, Punchlines Nemmo disse: dx de ser burro man '-' ate um kid intenderia isso pra colocar os addons e akie local items = {13064,13060} ----id do addon ai akie voce configura '-' 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 chance = 1, -- chance poder vim @Punchlines Nemmo Se for pra "ajudar" algum membro desta forma obscena e banal, que não ajude! Quanto ao tópico, bom conteúdo! Link to comment Share on other sites More sharing options...
CaioSilva99 28 Posted December 25, 2016 Share Posted December 25, 2016 Em 24/12/2016 at 02:19, Punchlines Nemmo disse: dx de ser burro man '-' ate um kid intenderia isso pra colocar os addons e akie local items = {13064,13060} ----id do addon ai akie voce configura '-' 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 chance = 1, -- chance poder vim Desculpe mas eu disse os addons raros de vir,não todos,mesmo assim obrigado por sua ajuda. Link to comment Share on other sites More sharing options...
Recommended Posts