Em creatureScript
Crie um arquivo chamado exp.lua e cole dentro
function onKill(cid, target) if isPlayer(cid) and isMonster(target) then if getPlayerStorageValue(cid,102590) - os.time() >= 1 then local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier) local count = ((getMonsterInfo(string.lower(getCreatureName(target))).experience*6.0*exp)/2) doPlayerAddExperience(cid, count) addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60)) end else return TRUE end return TRUE end
Registre no login.lua
registerCreatureEvent(cid, "ExpBonus")
Use a tag XML
<event type="kill" name="ExpBonus" event="script" value="exp.lua"/>
No actions
Crie outro arquivo chamado exp.lua e cole
local storage = 102591 local item = 2145 function onUse(cid, Item, fropos) setPlayerStorageValue(cid,storage, os.time()+7200) doPlayerRemoveItem(cid, 2145, 10) doRemoveItem(item.uid,1) doPlayerSendTextMessage(cid, 25, "Voce comprou bonus de 50 por cento de exp durante 2 horas Minutos Aproveite.") return true end
Usando a tag
<talkaction words="/doubleexp" event="script" value="exp.lua"/>


info
Grupo: Campones
Registrado: 24/05/18
Posts: 82
Reputação: +1
Gênero: Masculino
Hello, I need a script for item that will give 100% of the basic Expa for 2 hours