Postado Outubro 28, 2012 12 anos Sistema de Reset igual ao do Rozinx. Ao resetar voce é promovida para uma classe superior. Vá em talkactions e crie "reset.lua" e coloque isso dentro: function onSay(cid, words, param, channel) local tabble = { ["mixed"] = {reqVoc= nil, needLevel=10000}, ["spin"] = {reqVoc= 5, needLevel=30000}, ["sacred"] = {reqVoc= 6, needLevel=60000}, ["loney"] = {reqVoc= 7, needLevel=110000}, ["falling"] = {reqVoc= 8, needLevel=130000}, ["hellborn"] = {reqVoc= 9, needLevel=250000}, ["supreme"] = {reqVoc= 10, needLevel=310000}, ["forgotten"] = {reqVoc= 11, needLevel=550000}, ["nova"] = {reqVoc= 12, needLevel=715000}, ["zealot1"] = {reqVoc= 13, needLevel=715000}, ["zealot2"] = {reqVoc= 14, needLevel=715000} } local param,config = string.lower(param),{pid = getPlayerGUID(cid),newlv = 8,life = 185,mana = 35} if not tabble[param] then doPlayerSendCancel(cid, "digite o nome correto.") return true elseif getTilePzInfo(getCreaturePosition(cid)) == false then doPlayerSendCancel(cid, "precisa estar em pz.") return true elseif getPlayerLevel(cid) < tabble[param].needLevel then doPlayerSendCancel(cid, "You need be "..tabble[param].needLevel.." level or more.") return true elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 887978) >= 1 then doPlayerSendCancel(cid, "você já virou mixed.") return true elseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc then doPlayerSendCancel(cid, "You dont have the required vocation.") return true end if tabble[param].reqVoc == nil then setPlayerStorageValue(cid, 887978, 1) end local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5 setPlayerStorageValue(cid, 887979, newvoc) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.newlv..", `experience` = "..getExperienceForLevel(config.newlv)..",`manamax` = "..config.mana..",`health` = "..config.life..", `healthmax` = "..config.life..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) return true end Após isso, adicione a linha no talkactions.xml: <talkaction words="!reset" event="script" value="reset.lua"/> Em creaturescripts/scripts/login.lua adicione isso antes do ultimo "return true": if getPlayerStorageValue(cid, 887979) ~= -1 then doPlayerSetVocation(cid, getPlayerStorageValue(cid, 887979)) end Como funciona? Bom, se voce for querer ser mixed voce vai dizer "!reset" e no caso, pode ser qualquer vocação e ter no mínimo level 10.000. Créditos: Vodkart e Gleison
Postado Dezembro 5, 2012 12 anos Teria como deixar exatamente igual ao Rozinx, ou seja, ao invez de dizer apenas !reset, ter que dizer !reset mixed, algo assim...? PS: caso seja possível, me explique como alterar os nomes das vocês e na talkaction também por favor, pois não usarei com os mesmos nomes... Grato. 01000101011101010010000001001100011101010111010001101111001000000101000001100101011011000110111101110011001000000101010101110011011101010110000101110010011010010110111101110011
Postado Dezembro 6, 2012 12 anos Autor Sim, nas talkactions.xml apenas troque o comando por !reset mixed
Postado Dezembro 6, 2012 12 anos Mais se por exemplo eu estiver mixed e quiser resetar pra próxima voc, como faço pra colocar essa talkaction? 01000101011101010010000001001100011101010111010001101111001000000101000001100101011011000110111101110011001000000101010101110011011101010110000101110010011010010110111101110011
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.