hugoleods95 0 Postado Junho 24, 2010 Share Postado Junho 24, 2010 pessoal estou com um probleminha na minha talkaction de reset toda vez q um char reseta mais de uma vez fika repetindo Have a x resets,have a x reset,have a x reset,have a x reset ai fika assim alguem pode me ajudar a nao repitir e fikar so assim have a x reset.e so ir mudando o numero O script q eu uso e esse ai em baixo -- script by Marcryzius D'evil. --function onSay(cid, words, param) config = { level=717217, -- level necessario pra reseta. RemainingLvl=18, -- level que ficará depois de ser resetado. exper=4200, -- experiencia que ficará depois de ser resetado. pid=getPlayerGUID(cid), -- não mecha skull="yes", -- players com white skull podem resetar? ("yes" or "no"). redskull="yes", -- players com red skull podem resetar? ("yes" or "no"). prot="yes", -- players precisam estar em protection zone pra resetar? ("yes" or "no"). bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no"). } 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,22,"apenas players sem white skull podem resetar.") return TRUE end if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.") return TRUE end if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid,22,"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,22,"você precisa estar sem battler pra poder resetar.") return TRUE end if getPlayerLevel(cid) >= config.level then setPlayerStorageValue(cid,1020,getResets(cid)+1) doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.") doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.") doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) else doPlayerSendCancel(cid, "You need to have level "..config.level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end Link para o comentário https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/ Compartilhar em outros sites More sharing options...
0 prdsr 0 Postado Junho 25, 2010 Share Postado Junho 25, 2010 Olá, nao sou muito experiente, mas eu sempre tento até conseguir :} voce poderia tentar o seguinte, preste atenção, function getResets(cid) reset = getPlayerStorageValue(cid,1020) if reset < 0 then reset = 0 end return reset end Tente mudar o reset = 0 para reset = 1 Caso nao funcione, tente mudar o valor do storage value de getPlayerStorageValue(cid,1020) para outro como por exemplo getPlayerStorageValue(cid,9974) Se mesmo assim nao funcione tente retirar a seguinte parte: if reset < 0 then reset = 0 Então ficaria assim function getResets(cid) reset = getPlayerStorageValue(cid,1020) end return reset end Caso mesmo assim nao dê certo, talvez seu servidor nao tenha essa funcion getResets(cid) que pelo visto deve ser adicionada de algum ATS. Te desejo boa sorte ^^, espero ter ajudado. Link para o comentário https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/#findComment-895629 Compartilhar em outros sites More sharing options...
0 hugoleods95 0 Postado Junho 25, 2010 Autor Share Postado Junho 25, 2010 Valew cara mais ainda nao consigui arrumar Link para o comentário https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/#findComment-895688 Compartilhar em outros sites More sharing options...
0 Vodkart 1515 Postado Junho 25, 2010 Share Postado Junho 25, 2010 da uma olhada aqui: http://www.xtibia.com/forum/topic/134710-look-com-reset/ Link para o comentário https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/#findComment-895762 Compartilhar em outros sites More sharing options...
0 hugoleods95 0 Postado Junho 30, 2010 Autor Share Postado Junho 30, 2010 da uma olhada aqui: http://www.xtibia.com/forum/topic/134710-look-com-reset/ valew me ajudo muito Link para o comentário https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/#findComment-899261 Compartilhar em outros sites More sharing options...
0 Henrique Moura 193 Postado Junho 30, 2010 Share Postado Junho 30, 2010 Sanado - movido Link para o comentário https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/#findComment-899540 Compartilhar em outros sites More sharing options...
Pergunta
hugoleods95 0
pessoal estou com um probleminha na minha talkaction de reset
toda vez q um char reseta mais de uma vez fika repetindo Have a x resets,have a x reset,have a x reset,have a x reset
ai fika assim alguem pode me ajudar a nao repitir e fikar so assim have a x reset.e so ir mudando o numero
O script q eu uso e esse ai em baixo
Link para o comentário
https://xtibia.com/forum/topic/135654-ajuda-script-de-reset/Compartilhar em outros sites
5 respostass a esta questão
Posts Recomendados