Postado Julho 1, 2015 9 anos Eu queria um script que limita-se o level máximo do player e que após esse level não acumulasse mana nem health,porem para ele continuar upando e acumulando health e mana, teria que fazer uma quest, então so voltaria a upar depois que receber a storage 30023,4 function onLove() if getPlayerTrueLove(girlfriend) then doPlayerBeHappy(cid, true) doRemoveVirginity(cid, true) else doSendCancel(cid,"you do not know how good it feels to be loved") end end
Postado Julho 2, 2015 9 anos Solução Em "Data/creaturescripts/scripts", copie e cole um arquivo.LUA e renomeie para maxLevel.lua, apague tudo e cole: local t = { storage = {44440, 4}, -- Storage e valor necessário. maxLevel = 25 -- Level máximo. } function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL__LEVEL then if getPlayerStorageValue(cid, t.storage[1]) ~= t.storage[2] then if newLevel >= t.maxLevel then doPlayerAddExp(cid, getExperienceForLevel(t.maxLevel)-getPlayerExperience(cid)) doPlayerSendCancel(cid, "Você atingiu o level máximo, faça a quest para continuar upando.") end end end return true end Agora em "Data/creaturescripts", abra o arquivo creaturescripts.xml e adicione a tag: <event type="advance" name="maxLevel" event="script" value="maxLevel.lua"/> Novamente em "Data/creaturescripts/scripts", abra o arquivo login.lua e adicione: registerCreatureEvent(cid, "maxLevel") Caso dê algum problema ou falte algo, me avise. ➥ Regras | Seções OTServ | Seções BOT
Postado Julho 2, 2015 9 anos Autor Resolvido ! function onLove() if getPlayerTrueLove(girlfriend) then doPlayerBeHappy(cid, true) doRemoveVirginity(cid, true) else doSendCancel(cid,"you do not know how good it feels to be loved") end end
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.