Ir para conteúdo
  • 0

[pedido] exp potion por %


edukf

Pergunta

Boa noite, gostaria de um exp potion por %, por exemplo 50%

 

a maioria dos scripts de exp potion estão bugados.. alguém consegue fazer por percentagem?

 

TSF 0.4

 

 

edit:

 

Eu achei esse script bem completo mas ta bugado.. depois que usa a potion não da pra usar de novo... alguém sabe arrumar isso?

 

 

 

<?xml version="1.0" encoding="UTF-8"?><mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="um fórum que não merece ser citado.com"><!-- Configs and Functions --><config name="PotionExpConfigs"><![CDATA[------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSEconfigs = {time = 60, ---- TIME IN MINUTESneedpa = FALSE,needlvl = {TRUE, level = 10},costmana = {TRUE, mana = 100},addrate = 25, -- Exp que vai adicionar em %removeonuse = TRUE}function getTime(s)local n = math.floor(s / 60)s = s - (60 * n)return n, sendCreatureEventChecker = function(event, ...) -- Colexif isCreature(arg[1]) thenevent(unpack(arg))endendcreatureEvent = function(event, delay, ...) -- ColexaddEvent(CreatureEventChecker, delay, event, unpack(arg))endfunction getPlayerExtraExpRate(cid) -- By MatheusMkaloreturn (getPlayerRates(cid)[8]-1)*100end]]></config><!-- exppotion.lua --><action itemid="12328" event="script"><![CDATA[domodlib('PotionExpConfigs')if getPlayerStorageValue(cid, 62164) >= 1 thenreturn doPlayerSendCancel(cid, "You are already taking effect from this item.")endif configs.needpa and not isPremium(cid) thenreturn doPlayerSendCancel(cid, "You need to be a premmium account to use this item.")endif configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level thenreturn doPlayerSendCancel(cid, "You need to be level " .. configs.needlvl.level .. " to use this item.")endif configs.costmana[1] thenif getCreatureMana(cid) < configs.costmana.mana thenreturn doPlayerSendCancel(cid, "You need " .. configs.costmana.mana .. " mana to use this item.")elsedoCreatureAddMana(cid, -configs.costmana.mana)endendif configs.removeonuse thendoRemoveItem(item.uid, 1)endfor i = configs.time*60, 1, -1 dolocal a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60))if #a < 4 thena = string.sub(a,1,2) .. "0" .. string.sub(a, 3)endif i == configs.time*60 thencreatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "The effect of the exp potion end.")endcreatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "The effect of the exp potion will end in "..a..".")enddoPlayerSetExperienceRate(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 ira receber mais exp por matar os mosntros.")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.timeif os.time()-getPlayerStorageValue(cid, 62164) < time *60 thendoPlayerSetExperienceRate(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 dolocal a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60))if #a < 4 thena = string.sub(a,1,2) .. "0" .. string.sub(a, 3)endif i == (time*60-(os.time()-getPlayerStorageValue(cid, 62164))) thencreatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 62164)))*1000, cid, "The effect of the exp potion end.")endcreatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 62164)))-i)*1000, cid, "The effect of the exp potion will end in "..a..".")endendreturn TRUE]]></creaturescript></mod>
 
Editado por edukf
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

×
×
  • Criar Novo...