PobrePreto 5 Postado Abril 11, 2015 Share Postado Abril 11, 2015 (editado) Boa Tarde... Venho Trazer a Vocês uma Potion de Double Exp. Essa Potion Você Pode Morrer, Sair, Voltar que ela Não perde o Efeito! Essa Potion Depois de usada, Sua Exp Sera Aumentada conforme a Configuração que Fizer nela! Testada em OTServers 8.6 - 0.4.1 Vamos la! Em mods Crie um Arquivo chamado Doubleexppotion.xml e Dentro dele Adicione: <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 50}, costmana = {TRUE, mana = 300}, addrate = 50, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="7440" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "Voce ja ta Sob o Efeito da Potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce Precisar ser Premium Para Usar") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce Precisa ser " .. configs.needlvl.level .. " Para usar a Potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce Precisar ter " .. configs.costmana.mana .. " de Mana Para usar a Potion") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da Pocao de EXP.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O Efeito da Pocao vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora Voce Esta Recebendo mais EXP por Matar Monstros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "O Efeito da Potion Termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".") end end return TRUE ]]></creaturescript> </mod> Configurações configs = { time = 30, ---- TEMPO EM MINUTOS needpa = TRUE, --- NECESSITA DE PREMIUM OU NÃO, TRUE OU FALSE needlvl = {TRUE, level = 50},---- EXIGE LEVEL TRUE OU FALSE CASO NÃO , E O LEVEL QUE DESEJA USAR NO CASO ESTA 50 costmana = {TRUE, mana = 300}, --- CUSTA MANA TRUE OU NÃO CASO NÃO QUERIA, CUSTARA 300 NO CASO addrate = 50, -- EXP QUE VAI ADICIONAR EM PORCENTAGEM , NO CASO ESTA 50% removeonuse = TRUE --- CASO QUEIRA QUE ELA SUMA APOSTA USAR, DEIXE TRUE, CASO CONTINUE FALSE! Agora vamos escolher uma Potion: Aqui Estamos usando a ID:7440 Procure Por essa Linha: <action itemid="7440" event="script"><![CDATA[ Caso queira deixar Essa Potion, ou Renome-la vá em data/items/items.xml Items.xml e Procure pela ID: 7440 <item id="7440" article="a" name="Double Exp Potion"> <attribute key="weight" value="200" /> <attribute key="description" value="Depois de Tomar Sua EXP Dobrara." /> </item> Salve, e Aproveite! Créditos: MatheusMkalo e a Mim Por Traduzir e trazer pra cá! Editado Abril 11, 2015 por PobrePreto Link para o comentário Compartilhar em outros sites More sharing options...
Krono 128 Postado Abril 11, 2015 Share Postado Abril 11, 2015 Gostei do script, obrigado por trazer conteudo ao XTIBIA. Espero por mais participações suas pelo forum da comunidade. Link para o comentário Compartilhar em outros sites More sharing options...
PobrePreto 5 Postado Abril 11, 2015 Autor Share Postado Abril 11, 2015 Opa Obrigado... Vamos que vamos! Link para o comentário Compartilhar em outros sites More sharing options...
CalistoKing 17 Postado Abril 12, 2015 Share Postado Abril 12, 2015 Muito bom , irei utilizar no meu servidor que vai lançar amanhã ! Link para o comentário Compartilhar em outros sites More sharing options...
PobrePreto 5 Postado Abril 12, 2015 Autor Share Postado Abril 12, 2015 Opa... é uma Honra! Link para o comentário Compartilhar em outros sites More sharing options...
Elias Palermo 4 Postado Maio 12, 2015 Share Postado Maio 12, 2015 Aqui pega tudo direitinho, só não dobra a exp, será porque minha base é 8.54? Link para o comentário Compartilhar em outros sites More sharing options...
markim1986 2 Postado Setembro 22, 2016 Share Postado Setembro 22, 2016 Como que faco pra acumular ? 2x 3x 5x fazer um combo Link para o comentário Compartilhar em outros sites More sharing options...
KaboFlow 54 Postado Maio 8, 2020 Share Postado Maio 8, 2020 Em 11/04/2015 em 15:04, PobrePreto disse: Boa Tarde... Venho Trazer a Vocês uma Potion de Double Exp. Essa Potion Você Pode Morrer, Sair, Voltar que ela Não perde o Efeito! Essa Potion Depois de usada, Sua Exp Sera Aumentada conforme a Configuração que Fizer nela! Testada em OTServers 8.6 - 0.4.1 Vamos la! Em mods Crie um Arquivo chamado Doubleexppotion.xml e Dentro dele Adicione: <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 50}, costmana = {TRUE, mana = 300}, addrate = 50, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="7440" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 62164) >= 1 then return doPlayerSendCancel(cid, "Voce ja ta Sob o Efeito da Potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce Precisar ser Premium Para Usar") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce Precisa ser " .. configs.needlvl.level .. " Para usar a Potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce Precisar ter " .. configs.costmana.mana .. " de Mana Para usar a Potion") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da Pocao de EXP.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O Efeito da Pocao vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora Voce Esta Recebendo mais EXP por Matar Monstros.") setPlayerStorageValue(cid, 62164, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 62164, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 62164) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) * 1000 , cid, 62164, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 62164))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "O Efeito da Potion Termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".") end end return TRUE ]]></creaturescript> </mod> Configurações configs = { time = 30, ---- TEMPO EM MINUTOS needpa = TRUE, --- NECESSITA DE PREMIUM OU NÃO, TRUE OU FALSE needlvl = {TRUE, level = 50},---- EXIGE LEVEL TRUE OU FALSE CASO NÃO , E O LEVEL QUE DESEJA USAR NO CASO ESTA 50 costmana = {TRUE, mana = 300}, --- CUSTA MANA TRUE OU NÃO CASO NÃO QUERIA, CUSTARA 300 NO CASO addrate = 50, -- EXP QUE VAI ADICIONAR EM PORCENTAGEM , NO CASO ESTA 50% removeonuse = TRUE --- CASO QUEIRA QUE ELA SUMA APOSTA USAR, DEIXE TRUE, CASO CONTINUE FALSE! Agora vamos escolher uma Potion: Aqui Estamos usando a ID:7440 Procure Por essa Linha: <action itemid="7440" event="script"><![CDATA[ Caso queira deixar Essa Potion, ou Renome-la vá em data/items/items.xml Items.xml e Procure pela ID: 7440 <item id="7440" article="a" name="Double Exp Potion"> <attribute key="weight" value="200" /> <attribute key="description" value="Depois de Tomar Sua EXP Dobrara." /> </item> Salve, e Aproveite! Créditos: MatheusMkalo e a Mim Por Traduzir e trazer pra cá! tenhe pra pokemon? poketibia? base DXP??? Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados