santos1996 2 Postado Dezembro 9, 2010 Share Postado Dezembro 9, 2010 Estou com poblema no sistema que eu dei umas editada nele de reset que peguei aqui no Xtibia. ele reseta e muda vocação sertinho mais se vc chega no lvl 40000 ele reseta denovo para mesma vocação eu queria q ele trava-se e n reseta-se novamente o sistema e esse :lol²: function onSay(cid, words, param) config = { level= 40000, -- level para resetar RemainingLvl=8, -- level que ficara depois do reset exper=4200, -- Experiência que ficara depois do Reset pid=getPlayerGUID(cid), -- Não Mecha skull="yes", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull="yes",-- Players com Red Skull podem resetar "yes" para sim e "no" para não prot="yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat="yes", -- player com fight pode resetar "yes para sim e "no" para não voc = getPlayerVocation(cid), -- Não mecha mana = 35, -- mana que ficara após o reset health = 185 -- Health que ficara após o reset } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return TRUE end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return TRUE end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return TRUE end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 5 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 1) -- Vocação que o player ficara após o reset end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 9 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 2) -- Vocação que o player ficara após o reset end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 9 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 3) -- Vocação que o player ficara após o reset end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 9 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 4) -- Vocação que o player ficara após o reset end doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doPlayerSendCancel(cid, "Você precisa da vocation"..config.vocation.."") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end end end Então se poderem me ajudar a travar o sistema de reset quando chega lvl 40k Agradeço deis de ja Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/ Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Dezembro 9, 2010 Share Postado Dezembro 9, 2010 function onSay(cid, words, param) if getPlayerStorageValue(cid, 1020) > 0 then doPlayerSendTextMessage(cid, 24, "voce ja resetou.") return true end config = { level= 40000, -- level para resetar RemainingLvl=8, -- level que ficara depois do reset exper=4200, -- Experiência que ficara depois do Reset pid=getPlayerGUID(cid), -- Não Mecha skull="yes", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull="yes",-- Players com Red Skull podem resetar "yes" para sim e "no" para não prot="yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat="yes", -- player com fight pode resetar "yes para sim e "no" para não voc = getPlayerVocation(cid), -- Não mecha mana = 35, -- mana que ficara após o reset health = 185 -- Health que ficara após o reset } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return TRUE end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return TRUE end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return TRUE end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 5 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 1) -- Vocação que o player ficara após o reset end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 9 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 2) -- Vocação que o player ficara após o reset end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 9 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 3) -- Vocação que o player ficara após o reset end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerVocation(cid) == 9 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 4) -- Vocação que o player ficara após o reset end doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doPlayerSendCancel(cid, "Você precisa da vocation"..config.vocation.."") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end end end Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970705 Compartilhar em outros sites More sharing options...
santos1996 2 Postado Dezembro 9, 2010 Autor Share Postado Dezembro 9, 2010 (editado) skylo valew pela ajuda mais uma coisinha você pode me ajudar a poder resetar de todas vocção para a que quero a vocação q quero e a 9 e queria q todas essas vocação fosse para essa vocação 9 druid , paly , sorc , kina , ED . EK , RP ,MS dessas 8 vocação se falar !mixedpromo vai para vocação 9 valew deis de já. e quero que nao deixe resetar se não tiver essas vocação :XTibia_smile: Editado Dezembro 9, 2010 por santos1996 Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970767 Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Dezembro 9, 2010 Share Postado Dezembro 9, 2010 function onSay(cid, words, param) if getPlayerVocation(cid) > 8 or getPlayerStorageValue(cid, 1020) > 0 then doPlayerSendTextMessage(cid, 24, "voce não pode resetar.") return true end local config = { level= 40000, -- level para resetar RemainingLvl=8, -- level que ficara depois do reset exper=4200, -- Experiência que ficara depois do Reset pid=getPlayerGUID(cid), -- Não Mecha skull="yes", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull="yes",-- Players com Red Skull podem resetar "yes" para sim e "no" para não prot="yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat="yes", -- player com fight pode resetar "yes para sim e "no" para não voc = getPlayerVocation(cid), -- Não mecha mana = 35, -- mana que ficara após o reset health = 185 -- Health que ficara após o reset } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return TRUE end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return TRUE end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return TRUE end if not getPlayerLevel(cid) >= config.level then doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doPlayerSendCancel(cid, "Você precisa da vocation"..config.vocation.."") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, 9) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) end Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970847 Compartilhar em outros sites More sharing options...
santos1996 2 Postado Dezembro 9, 2010 Autor Share Postado Dezembro 9, 2010 (editado) Cara esse ae q você me passo não funciono apareceu isso [09/12/2010 14:33:20] data/talkactions/scripts/outras talk/promotion.lua:54: in function <data/talkactions/scripts/outras talk/promotion.lua:1> to precisando urgente desse reset pra por no meu ot agradeço se consigui arruma isso Editado Dezembro 9, 2010 por santos1996 Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970871 Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Dezembro 9, 2010 Share Postado Dezembro 9, 2010 tenta esse aki entao function onSay(cid, words, param) if getPlayerVocation(cid) > 8 or getPlayerStorageValue(cid, 1020) > 0 then doPlayerSendTextMessage(cid, 24, "voce não pode resetar.") return true end local config = { level = 40000, -- level para resetar RemainingLvl = 8, -- level que ficara depois do reset exper = 4200, -- Experiência que ficara depois do Reset pid = getPlayerGUID(cid), -- Não Mecha skull = "yes", -- Players com Skull podem resetar "yes" para sim e "no" para não redskull = "yes",-- Players com Red Skull podem resetar "yes" para sim e "no" para não prot = "yes", -- precisa estar em area pz para resetar "yes" para sim e "no" para não bat = "yes", -- player com fight pode resetar "yes para sim e "no" para não voc = getPlayerVocation(cid), -- Não mecha mana = 35, -- mana que ficara após o reset health = 185 -- Health que ficara após o reset } function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid, 24, "apenas players sem white skull podem resetar.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"apenas player sem red skull podem resetar.") return TRUE end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder resetar.") return TRUE end if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder resetar.") return TRUE end if getPlayerLevel(cid) < config.level then doPlayerSendCancel(cid, "Você precisa do level "..config.level.." ou mais para resetar.") doPlayerSendCancel(cid, "Você precisa da vocation"..config.vocation.."") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return TRUE end setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerSetVocation(cid, 9) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper..",`manamax` = "..config.mana..",`healthmax` = "..config.health..",`health` = "..config.health..",`mana` = "..config.mana.." WHERE `id` = "..config.pid) end Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970893 Compartilhar em outros sites More sharing options...
santos1996 2 Postado Dezembro 9, 2010 Autor Share Postado Dezembro 9, 2010 esse ultimo ae funciono so que quando reseta n vai pra vocação nove ele fica sem vocação Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970903 Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Dezembro 9, 2010 Share Postado Dezembro 9, 2010 eu coloquei o doPlayerSetVocation(cid, 9) então vc errou na configuração da vocação Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970922 Compartilhar em outros sites More sharing options...
santos1996 2 Postado Dezembro 9, 2010 Autor Share Postado Dezembro 9, 2010 olha ve se tem alguma coisa errada na vocação <vocation id="9" name="Mixed assasin" description="an mixed assasin" needpremium="1" gaincap="25" gainhp="30" gainmana="35" gainhpticks="2" gainhpamount="170" gainmanaticks="4" gainmanaamount="80" manamultiplier="3.0" attackspeed="300" soulmax="200" gainsoulticks="15" lessloss="30"> <formula meleeDamage="7.5" distDamage="10.0" wandDamage="1.0" magDamage="7.5" magHealingDamage="2.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970978 Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Dezembro 9, 2010 Share Postado Dezembro 9, 2010 tenta assim <vocation id="9" name="Mixed Assasin" description="a mixed assassin" needpremium="1" gaincap="25" gainhp="30" gainmana="35" gainhpticks="2" gainhpamount="170" gainmanaticks="4" gainmanaamount="80" manamultiplier="3.0" attackspeed="300" soulmax="200" gainsoulticks="15" fromvoc="9"> <formula meleeDamage="7.5" distDamage="10.0" wandDamage="1.0" magDamage="7.5" magHealingDamage="2.0" defense="1.0" magDefense="1.0" armor="1.0"/> <skill fist="1.1" club="0" sword="1.1" axe="1.1" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/> </vocation> Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-970993 Compartilhar em outros sites More sharing options...
santos1996 2 Postado Dezembro 9, 2010 Autor Share Postado Dezembro 9, 2010 (editado) Cara valeuuuu.. fico massa demais merece mais resp.. valeuu manow "skylo" valew msmo to na mo felicidade uahauhauha Você e o cara ta de parabens Editado Dezembro 10, 2010 por santos1996 Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-971013 Compartilhar em outros sites More sharing options...
Eskylo 175 Postado Dezembro 10, 2010 Share Postado Dezembro 10, 2010 Fico feliz em ter ajudado ! ^^ se aparecer qualquer bug manda mensagem Link para o comentário https://xtibia.com/forum/topic/146671-ajuda-rapida-porfavor/#findComment-971177 Compartilhar em outros sites More sharing options...
Posts Recomendados