Postado Agosto 14, 2015 9 anos Instalando Crie um arquivo chamado ExpScroll.lua na pasta actions e coloque: local config = { funnyEffect = "YES", minimumLevel = 7, maximumLevel = 500, -- for infinite type math.huge } local addExp = { [{config.minimumLevel, 100}] = 2500000, [{100, 200}] = 15000000, [{200, 300}] = 22500000, [{300, 400}] = 30000000, [{400, 500}] = 100000000, [{500, 600}] = 20000000, [{600, 1000}] = 30000000, [{1000, 2000}] = 45000000, [{2000, 2500}] = 125000000, [{2500, 7500}] = 150000000, [{7500, 10000}] = 200000000, [{10000, 20000}] = 250000000, [{20000, config.maximumLevel}] = 300000000 } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local level = player:getLevel() local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) if(level < config.minimumLevel) then player:sendCancelMessage("You need to be at least "..config.minimumLevel.." to use a scroll.") return false end if(level >= config.maximumLevel) then player:sendCancelMessage("Your level is too high for using a scroll.") return true end for k, v in pairs(addExp) do if level >= k[1] and level < k[2] then player:addExperience(v) player:sendTextMessage(22, "Experience Scroll Gave You " .. v .." experience!") item:remove(item.uid, 1) break end end if config.funnyEffect == "YES" then local playerexp = addExp local pos = player:getPosition() local positions = { {x=pos.x+1,y=pos.y-1,z=pos.z}, {x=pos.x-1,y=pos.y-1,z=pos.z}, {x=pos.x+1,y=pos.y+1,z=pos.z}, {x=pos.x-1,y=pos.y+1,z=pos.z}, {x=pos.x+1,y=pos.y,z=pos.z}, {x=pos.x-1,y=pos.y,z=pos.z}, {x=pos.x,y=pos.y+1,z=pos.z}, {x=pos.x,y=pos.y-1,z=pos.z} } for i = 1, table.getn(positions) do Position(i):sendMagicEffect(effect) end end end actions.xml <action itemid="1948" script="ExpScroll.lua" /> Créditos Yogiikke Editado Dezembro 7, 2015 9 anos por Azhaurn (veja o histórico de edições)
Postado Agosto 15, 2015 9 anos Tópico aprovado, obrigado por compartilhar. Este tópico foi movido: Para: "OTServ → Scripting → Actions e TalkActions" STYLLER OT 2022
Postado Janeiro 8, 2016 9 anos qual o tempo de durabilidade dele ??? 24 horas? o meu stage é assim... <stage minlevel="9" maxlevel="100" multiplier="10" /> <stage minlevel="101" maxlevel="150" multiplier="8" /> <stage minlevel="151" maxlevel="200" multiplier="7" /> <stage minlevel="201" multiplier="5" /> me ajuda a configurar? para funcionar este scroll
Postado Janeiro 23, 2017 8 anos Em 08/01/2016 ás 01:13, robi123 disse: qual o tempo de durabilidade dele ??? 24 horas? o meu stage é assim... <stage minlevel="9" maxlevel="100" multiplier="10" /> <stage minlevel="101" maxlevel="150" multiplier="8" /> <stage minlevel="151" maxlevel="200" multiplier="7" /> <stage minlevel="201" multiplier="5" /> me ajuda a configurar? para funcionar este scroll @robi123 no seu stage voce não configura nada, deixa como está! você so vai adicionar o scrool, e mudar nessa tag! Spoiler [{config.minimumLevel, 100}] = 2500000, ---> level 100 = 2500000 xp [{100, 200}] = 15000000, ---> level 100 ate o 200 = 15000000 xp [{200, 300}] = 22500000, ---> level 200 ate o 300 = 22500000 xp [{300, 400}] = 30000000, ---> level 300 ate o 400 = 30000000 xp [{400, 500}] = 100000000, ---> level 400 ate o 500 = 100000000 xp [{500, 600}] = 20000000, ---> level 500 ate o 600 = 20000000 xp [{600, 1000}] = 30000000, ---> level 600 ate o 1000 = 30000000 xp [{1000, 2000}] = 45000000, ---> level 1000 ate 2000 = 45000000 xp [{2000, 2500}] = 125000000, ---> level 2000 ate 2500 = 125000000 xp [{2500, 7500}] = 150000000, ---> level 2500 ate 7500 = 150000000 xp [{7500, 10000}] = 200000000, ---> level 7500 ate 10000 = 200000000 xp [{10000, 20000}] = 250000000, ---> level 10000 ate 20000 = 250000000 [{20000, config.maximumLevel}] = 300000000 ---> level 20000 = 300000000 xp
Postado Janeiro 13, 2018 7 anos da esse erro mano [13/01/2018 12:17:41] Description: [13/01/2018 12:17:41] data/actions/scripts/diaxp.lua:31: attempt to index local 'player' (a number value) [13/01/2018 12:17:41] stack traceback: sabe me dizer oq é ?
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.