Shucaco 0 Postado Julho 26, 2012 Share Postado Julho 26, 2012 Peguei um script aqui, pra quando reseta muda vocação,mana,life,etc.. So que qeria usar ele em varias vocações e so funcionou pra resetar para a primeira. OBS:Tá resetando o lvl,mana,etc so a vocação que não. Peguei daqui: http://www.xtibia.co...ta-mana-e-life/ Crei no talkactions varios comandos pra cada um dos resets. Script: function onSay(cid, words, param) config = {level= 20000, -- 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="no", -- 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 = 300, -- mana que ficara após o reset health = 300 -- Health que ficara após o reset } if getPlayerVocation(cid) >= 6 then doPlayerSendTextMessage(cid, 22, "Você ja possui essa promoção.") return TRUE end if getPlayerVocation(cid) <= 4 then doPlayerSendTextMessage(cid, 22, "Você precisa ser um Assassin para ter essa promoção.") return TRUE end if getPlayerVocation(cid) == 5 then 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))) doPlayerSetVocation(cid, 6) -- Vocação que o player ficara após o reset 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.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end end Link para o comentário Compartilhar em outros sites More sharing options...
0 Tchubaka 36 Postado Julho 26, 2012 Share Postado Julho 26, 2012 function onSay(cid, words, param) config = { level= 10000, -- 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) == 8 then -- Vocação que o player precisa ter doPlayerSetVocation(cid, 9) -- 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.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Shucaco 0
Peguei um script aqui, pra quando reseta muda vocação,mana,life,etc..
So que qeria usar ele em varias vocações e so funcionou pra resetar para a primeira.
OBS:Tá resetando o lvl,mana,etc so a vocação que não.
Peguei daqui: http://www.xtibia.co...ta-mana-e-life/
Crei no talkactions varios comandos pra cada um dos resets.
Script:
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados