Galera esse script está muito top
<?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 FALSEconfigs = {time = 1, ---- TIME IN MINUTESneedpa = FALSE,needlvl = {FALSE, level = 1},costmana = {FALSE, mana = 50},addrate = 100, -- Exp que vai adicionar em %removeonuse = FALSE}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="5952" event="script"><![CDATA[domodlib('PotionExpConfigs')if getPlayerStorageValue(cid, 62164) >= 1 thenreturn doPlayerPopupFYI(cid, "Você não pode usar o mesmo potion, use os outros para ativar o combo\n\n\nSe seu tempo já esgotou e mesmo assim você não consegue usar o potion\né porque você esta bugado.\n\nPor favor digite !fly desbugar em uma área pz\n\nBom Jogo")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, "2x "..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, "Você adicionou 2x de exp por 30 minutos.")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 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, "Sua experiecia de 2x acaba em "..a..".")endendreturn TRUE]]></creaturescript></mod>
só tem um detalhe, como que eu faco pra ter um de 3x e uma de 2x ( eu troquei o nome do xml e as storages da copia, ate funciona mas quando o tempo acaba ele não volta com a experiencia normal quando acaba, isso quando eu uso o de 2x e 3x juntos, se usar separado funciona de boa.
o lance é usar juntos e acabar a exp normal
Na verdade eu queria os itens desta maneira:
item "xxxx" daria 2x de exp por 30 minitem "xxxx" daria 3x de exp por 30 minitem "xxxx" daria 4x de exp por 30 minitem "xxxx" daria 5x de exp por 30 minitem "xxxx" daria 7x de exp por 30 min
Desde já agradeço