lfelipebsilva05 14 Postado Julho 10, 2012 Share Postado Julho 10, 2012 (editado) Script da Vodkart. Seguinte lvl 10k eu falo !mixedpromo Reseta. ai tem mais reset pra mais lvl e talz mais quando chego 10k dnv eu posso falar !mixedpromo dnv, ai quando abre skills debuga o char,. como ponho pra reseta apenas 1x? Script : 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} } local config = {pid = getPlayerGUID(cid),newlv = 8,life = 185,mana = 35} local param = string.lower(param) 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 dont have the required level.") return true elseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc then doPlayerSendCancel(cid, "You dont have the required vocation.") return true elseif getPlayerStorageValue(cid, 789456) >= 1 then doPlayerSendCancel(cid, "você já foi promovido para mixed.") return true end local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5 setPlayerStorageValue(cid, 650230, newvoc) setPlayerStorageValue(cid, 789456, newvoc == 5 and 1 or 0) 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..",`vocation` = "..newvoc.." WHERE `id` = "..config.pid) return true end Editado Julho 10, 2012 por lfelipebsilva05 Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/ Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 10, 2012 Share Postado Julho 10, 2012 (editado) 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} } local config = {pid = getPlayerGUID(cid),newlv = 8,life = 185,mana = 35} local param = string.lower(param) 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 dont have the required level.") return true elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 789456) >= 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 local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5 setPlayerStorageValue(cid, 650230, tonumber(newvoc)) setPlayerStorageValue(cid, 789456, tonumber(newvoc) == 5 and 1 or 0) 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..",`vocation` = "..newvoc.." WHERE `id` = "..config.pid) return true end ou se n 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} } local config = {pid = getPlayerGUID(cid),newlv = 8,life = 185,mana = 35} local param = string.lower(param) 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 dont have the required level.") return true elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 789456) >= 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, 789456, 1) end local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5 setPlayerStorageValue(cid, 650230, tonumber(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..",`vocation` = "..newvoc.." WHERE `id` = "..config.pid) return true end Editado Julho 10, 2012 por Vodkart Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291070 Compartilhar em outros sites More sharing options...
0 lfelipebsilva05 14 Postado Julho 10, 2012 Autor Share Postado Julho 10, 2012 (editado) ot agora fica dando umas caida doida :S. nao da erro nem nada, ela trava tenho que reiniciar ;x escript ficou mt bom, so ta com esse probleminha agr =/ duvida : cara posso adc mais quantos reset eu quiser , so colocando ["mixed"] = {reqVoc= nil, needLevel=10000}, ....? editavel? so quando uso alguns tpw de itens, ajuda ai ;x Editado Julho 10, 2012 por lfelipebsilva05 Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291078 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 10, 2012 Share Postado Julho 10, 2012 q? n entendi nd Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291090 Compartilhar em outros sites More sharing options...
0 lfelipebsilva05 14 Postado Julho 10, 2012 Autor Share Postado Julho 10, 2012 o script funfa kse perfeito, reseta td certim e talz como eu queria. mais quando vou usar supreme sword= arma vip do ot. e uma magia exevo gran mas frigo. o ot cai. tpw ele fica on sem erro no executor, so nao da pra logar. POR ENQUANTO SO ESSES 2 creio que tenha mais =/ entendeu? Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291094 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 10, 2012 Share Postado Julho 10, 2012 tenta adc as nova voc em data/lib/031-vocations Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291114 Compartilhar em outros sites More sharing options...
0 lfelipebsilva05 14 Postado Julho 10, 2012 Autor Share Postado Julho 10, 2012 (editado) meu ta assim, uq mudo? function isSorcerer(cid) return isInArray({1, 5}, getPlayerVocation(cid)) end function isDruid(cid) return isInArray({2, 6}, getPlayerVocation(cid)) end function isPaladin(cid) return isInArray({3, 7}, getPlayerVocation(cid)) end function isKnight(cid) return isInArray({4, 8}, getPlayerVocation(cid)) end function isRookie(cid) return isInArray({0}, getPlayerVocation(cid)) end Lembrando que a vocão vai ate 15, e a 5 puxa as 4 anteriores e a 6 puxa as 5 etc,,, Editado Julho 10, 2012 por lfelipebsilva05 Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291150 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 10, 2012 Share Postado Julho 10, 2012 que tal colocar os ids das novas vocs q vc crio ai? outra coisa vc vai ter que editar em weapons.xml e spells.xml pra aceitar as novas voc tbm exemplo: <wand id="8910" level="42" mana="13" min="60" max="70" type="death" event="function" value="default"> <!-- Underworld Rod --> <vocation id="2"/> <vocation id="9"/> <vocation id="ID NOVA VOC"/> </wand> Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291163 Compartilhar em outros sites More sharing options...
0 lfelipebsilva05 14 Postado Julho 11, 2012 Autor Share Postado Julho 11, 2012 Pronto editei weapons.lua , magia ou mexer . vodkart ficaria assim no caso? function isSorcerer(cid) return isInArray({1, 5}, getPlayerVocation(cid)) end function isDruid(cid) return isInArray({2, 5}, getPlayerVocation(cid)) end function isPaladin(cid) return isInArray({3, 5}, getPlayerVocation(cid)) end function isKnight(cid) return isInArray({4, 5}, getPlayerVocation(cid)) end function isMixed(cid) return isInArray({5, 6}, getPlayerVocation(cid)) end function isSpin(cid) return isInArray({6, 7}, getPlayerVocation(cid)) end function isSacred(cid) return isInArray({7, 8}, getPlayerVocation(cid)) end function isLonely(cid) return isInArray({8, 9}, getPlayerVocation(cid)) end function isFalling(cid) return isInArray({9, 10}, getPlayerVocation(cid)) end function isHellborn(cid) return isInArray({10, 11}, getPlayerVocation(cid)) end function isSupreme(cid) return isInArray({11, 12}, getPlayerVocation(cid)) end function isApoka(cid) return isInArray({12, 13}, getPlayerVocation(cid)) end function isNova(cid) return isInArray({13, 14}, getPlayerVocation(cid)) end function isZealot1(cid) return isInArray({14, 15}, getPlayerVocation(cid)) end Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291334 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 11, 2012 Share Postado Julho 11, 2012 sim acho que vai ter que mudar no script das potion tbm Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291340 Compartilhar em outros sites More sharing options...
0 lfelipebsilva05 14 Postado Julho 11, 2012 Autor Share Postado Julho 11, 2012 potions tem poucas e rapidim, foda e as spells :S vai quebrar bunito. nao posso deixar spells assim nao? e tpw, vou criar varias spells agora, propias, ai boto umas pra cada reseta, ou tem que trocar td? Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291351 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Julho 11, 2012 Share Postado Julho 11, 2012 vc tem que colocar o id das vocation na spell se vc for criar uma nova e colocar pra voc com id 12 usar vc edita na tag das spells Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291353 Compartilhar em outros sites More sharing options...
0 lfelipebsilva05 14 Postado Julho 13, 2012 Autor Share Postado Julho 13, 2012 Sim Sim isso eu sei minha duvida e tpw. function isSpin(cid) return isInArray({6, 7}, getPlayerVocation(cid)) - isso e tpw, ele vocaçao 7 com spells da 6 , ne isso que significa nao? end cara ainda ta bugando =/ a supreme sword. ela e de atk de area, tem algo a ver? ai vodkart sera que tem como por para resetar todas as skills? obrigado dnv' i cara eu posso por mais vocations? normal, ou preciso mudar algo pra por mais de 5? exemplo: 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} } Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1291358 Compartilhar em outros sites More sharing options...
0 gleison157 24 Postado Julho 19, 2012 Share Postado Julho 19, 2012 lfelipebsilva05 vc pode me passar o comando talkaction por favor Link para o comentário https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/#findComment-1295959 Compartilhar em outros sites More sharing options...
Pergunta
lfelipebsilva05 14
Script da Vodkart.
Seguinte lvl 10k eu falo !mixedpromo Reseta. ai tem mais reset pra mais lvl e talz
mais quando chego 10k dnv eu posso falar !mixedpromo dnv, ai quando abre skills debuga o char,.
como ponho pra reseta apenas 1x?
Script :
Link para o comentário
https://xtibia.com/forum/topic/189517-reset-vocation-system-bug/Compartilhar em outros sites
13 respostass a esta questão
Posts Recomendados