Jump to content

Search the Community

Showing results for tags 'reset'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Sou

Found 25 results

  1. Pessoal, sou novo no XTibia e gostaria de pedir uma ajuda a vocês. Voltei a administrar servidor de Tibia e estava aqui tentando editar uns scripts para usar o comando de !reset. Esse comando funcionou bem no meu Server local config = { backToLevel = 40, redskull = false, -- need to be without redskull to reset? battle = true, -- need to be without battle to reset? pz = false, -- need to be in protect zone to reset? stages = { {resets = 4, level = 350, premium = 330}, {resets = 9, level = 355, premium = 340}, {resets = 14, level = 450, premium = 450}, {resets = 19, level = 600, premium = 600}, {resets = 24, level = 800, premium = 800}, {resets = 29, level = 1000, premium = 1000}, {resets = 34, level = 1100, premium = 1100}, {resets = 39, level = 1200, premium = 1200}, {resets = 44, level = 1300, premium = 1300}, {resets = 49, level = 1500, premium = 1500}, {resets = 54, level = 1600, premium = 1600}, {resets = 59, level = 1650, premium = 1650}, {resets = 64, level = 1700, premium = 1700}, {resets = 69, level = 1800, premium = 1800}, {resets = 74, level = 1850, premium = 1850}, {resets = 79, level = 1900, premium = 1900}, {resets = 84, level = 2200, premium = 2200}, {resets = 89, level = 2500, premium = 2500}, {resets = 94, level = 5000, premium = 5000}, {resets = 2^1024, level = 7000, premium = 7000} } } function onSay(cid, words, param) local function getPlayerResets(cid) local resets = getPlayerStorageValue(cid, 500) return resets < 0 and 0 or resets end local function doPlayerAddResets(cid, count) setPlayerStorageValue(cid, 500, getPlayerResets(cid) + count) end if config.redskull and getCreatureSkullType(cid) == 4 then return doPlayerSendCancel(cid, "Voce precisa estar sem red skull para resetar.") elseif config.pz and not getTilePzInfo(getCreaturePosition(cid)) then return doPlayerSendCancel(cid, "Voce precisa estar em protection zone para resetar.") elseif config.battle and getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendCancel(cid, "Voce precisa estar sem battle para resetar.") end local resetLevel = 0 for x, y in ipairs(config.stages) do if getPlayerResets(cid) <= y.resets then resetLevel = isPremium(cid) and y.premium or y.level break end end if getPlayerLevel(cid) < resetLevel then return doPlayerSendCancel(cid, "Voce precida de level " .. resetLevel .. " para o proximo reset.") end doPlayerAddResets(cid, 1) local healthMax, manaMax = getCreatureMaxHealth(cid), getCreatureMaxMana(cid) doPlayerAddLevel(cid, -(getPlayerLevel(cid) - config.backToLevel)) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Now you have " .. getPlayerResets(cid) .. " " .. (getPlayerResets(cid) == 1 and "reset" or "resets") .. ".") return true end Porém, eu precisava de algumas modificações nele... eu precisava definir alguns pontos de mudança pós o reset, por exemplo, o jogador ganha 10% a mais de xp... esse tipo de coisa. Fora isso, o que eu precisava também (e mais importante) seria que esse reset fosse contabilizado numa row 'resets' da database do meu server que é MySQL. Vocês poderiam, por gentileza, me ajudar ou dar uma luz relacionado a isso? Ficaria muito grato!
  2. Alguem teria um script de reset preferencialmente por source para otx2 atualizado https://github.com/mattyx14/otxserver/tree/otxserv2 se for por distro as mudanças me diga aonde mudar eu mesmo compilo ou script normal mesmo, porem as configuraçoes do script seriam as seguintes level necessario para resetar = x aumento de x level para reset = x item e quantidade de item para resetar = x,x aumento de x items por reset= x vida e mana volta ao inicio ao resetar = true or false skills voltao ao inicio ao resetar = true false hp e mp adicional ganho /lvl por reset = 1% (configurável) dano e heal adicionado por reset = 1% configuravel reset voc = {x, x, x, x, x, x, x} (quando der o 10 reset por exemplo(configuravel) , será feito uma checagem de vocation para poder resetar, por exemplo até 10 resets qualquer voc reseta nao será feito checagem, porem no reset 10 só resetará se for uma das seguintes vocações, se for mais facil deixa só 1 reset configuravel assim se for dificil pode colocar apartir de tantos resets precisa da classe, coloque oque for mais pratico pois o efeito será o mesmo. teleport para o templo= true or false pode resetar com battle= true or false a cada x resets ganhe tal item (configuravel) reset x recebe item x ao resetar, reset =5 {2160, 100} - exemplo. nao me importa se será storage, source, script. só me importo com o resultado e que nao tenha bugs, quanto mais bem feito melhor na hora de negociar o preço, se nao for permitido este tipo de post aqui alguem me avise que eu retiro ele. se tem outro local por favor movam ele, mais informações mande msg no privado responderei assim que possível.
  3. Bom dia galera. Sou um antigo membro do forum mas perdi minha conta não consegui recuperar e tive que fazer outra. to usando um Script do @MarcelloMendes essa script Advanced Reset System 2.0 porem não consegui fazer com que a cada reset aumente a vida, dano e exp por determinada %, alguem tem ou consegue me ajudar a fazer? to usando versão do OT 8.60 + REP
  4. IP e Site www.asteraotserv.com; porta 7171, cliente 10.99 Devido a alguns bugs irreversíveis tivemos que resetar o servidor, assim, VENHAM DOMINAR O SERVER. OT HOSPEDADO NO CANADÁ, UPTIME DE 99.8%, DEDICADO 24/7. ESTAMOS DANDO POINTS PARA QUEM ENCONTRAR BUGS E TROUXER ATÉ 5 AMIGOS Servidor global, 99% indêntico, com todas as novas atualizações, NPC Addoner que vende e troca itens, raids 100%, market 100%, shop e donate 100%. Exp 500x stagiada Loot 10x Spawn 5x Skill 80x Magic 70x Fast attack balanceado. Estamos abertos a sugestões e críticas! Traga seu time e domine nosso server! Equipe Astera Otserver
  5. Olá galera boa tarde; Venho por meio deste suporte para lhes pedir um script. O script e de proteção de RESET, pois existe o de proteção de LEVEL. É o seguinte o jogador não poderá ser morto com menos de 3 resets exatos, após os 3 resets eles terão que se virarem. Apenas isso. TFS 1x V. 10.90 Uso sistema de RESET por DB e Funcão getPlayerResets. Obrigado desde já pela ajuda :3
  6. Alguém pode me ajudar, pra quando der look na pessoa mostrar quantos resets ela tem? eu uso um systema de reset que puxa pela database, a tabela resets. tfs 1.2
  7. Gostaria q alguem me ajudasse a criar um script q quando eu clico no meu personagem aparece informaçoes igual a esse 19:28 -> [Level: 653833] [Reset: 23] Vocation: Blypter Druid. [Frags: 5] LIFE: [54320825 / 54320825] MANA: [80434145 / 80434145] Member of the Thedevil
  8. Bom dia, galera... Eu mais uma vez (como de costume) aqui com os scripts problematicos. Enfim to com um reset system aqui por talkaction, e ele funciona normal, mas quando reseta ele mantem a mana e health do antigo level. Eu gostaria que quando desse reset a mana e health ficasse compativel com level para que o char voltou. Outra coisa tambem, ali no script tem a função de mostrar no look do char quantos resets ele tem, e também não funciona. Se alguém puder me ajudar ai com isso, ficarei eternamente agradecido. function onSay(cid, words, param) local level = 2000 --level pra ser resetado local RemainingLvl = 20 --lvl que ele ficara depois do reset local pid = getPlayerGUID(cid) function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) look = true return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then resets = getPlayerStorageValue(thing.uid, 1020)+1 doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. resets .."]") end return true end else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end
  9. Bom Galera, sou novo em scripts, e queria saber se é possivel, criar um NPC pra reset, e ao completar o reset o Player conseguir receber uma bonificação por isso, ou seja uma quantia de POINTS Donate, do site. EX: Upei até 600 lvl, um level min pra reset, Vou e reseto meu account ao chegar no 600, ele irá voltar ao lvl 8 com os atributos de lvl e receberá 2 Donates Points em sua account por ter resetado, ai vamos lá, ele reseta 15x ele consegue receber 30 Donates POints, no que ele poderá gastar com itens ou VIP account, o que permitiria players q não gastam com OT ter esse previlégio tbm, e seria muito bom pois ao invés de resetar um SERVER inteiro de 1 em um 1 ano, conseguiremos mante-lo online por muito mais tempo sem resetar todo mapa. Espero que gostem a Ideia, que alguém consiga desenvolver, ou caso não possa ou consiga desenvolver, possa me orientar em tal trabalho.
  10. Gostaria muito que logo abaixo do level dos player tivese a opção Reset, que mostraria o numero de Reset que x player tem. tentei fazer mas por algum motivo da algum erro então estou postando pedindo a ajuda de vocês! <?PHP $name = stripslashes(ucwords(strtolower(trim($_REQUEST['name'])))); if(empty($name)) { $main_content .= 'Here you can get detailed information about a certain player on '.$config['server']['serverName'].'.<BR> <FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; } else { if(check_name($name)) { $player = $ots->createObject('Player'); $player->find($name); if($player->isLoaded()) { $account = $player->getAccount(); $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Character Information</B></TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>Name:</TD><TD><font color="'; $main_content .= ($player->isOnline()) ? 'green' : 'red'; $main_content .= '"><b>'.$player->getName().'</b></font>'; if($player->isDeleted()) $main_content .= '<font color="red"> [DELETED]</font>'; if($player->isNameLocked()) $main_content .= '<font color="red"> [NAMELOCK]</font>'; $main_content .= '</TD></TR>'; if($player->getOldName()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; if($player->isNameLocked()) $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Proposition:</TD><TD>'.$player->getOldName().'</TD></TR>'; else $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Old name:</TD><TD>'.$player->getOldName().'</TD></TR>'; } // BEGIN Position Showing *** Fixed by jerryb1988 from otfans.net $group = $player->getGroup(); if ($group == 2){$group_name = 'Tutor';} if ($group == 3){$group_name = 'Senior Tutor';} if ($group == 4){$group_name = 'Gamemaster';} if ($group == 5){$group_name = 'Community Manager';} if ($group == 6){$group_name = 'GOD';} if($group != 1) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Position:</TD><TD>'.$group_name.'</TD></TR>'; } // END Position Showing if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Sex:</TD><TD>'; $main_content .= ($player->getSex() == 0) ? 'female' : 'male'; $main_content .= '</TD></TR>'; if($config['site']['show_marriage_info']) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Marital status:</TD><TD>'; $marriage = new OTS_Player(); $marriage->load($player->getMarriage()); if($marriage->isLoaded()) $main_content .= 'married to <a href="?subtopic=characters&name='.urlencode($marriage->getName()).'"><b>'.$marriage->getName().'</b></a></TD></TR>'; else $main_content .= 'single</TD></TR>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Profession:</TD><TD>'.$vocation_name[$player->getWorld()][$player->getPromotion()][$player->getVocation()].'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Level:</TD><TD>'.$player->getLevel().'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>World:</TD><TD>'.$config['site']['worlds'][$player->getWorld()].'</TD></TR>'; if(!empty($towns_list[$player->getWorld()][$player->getTownId()])) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Residence:</TD><TD>'.$towns_list[$player->getWorld()][$player->getTownId()].'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Balance:</TD><TD>'.$player->getBalance().' Gold Coins.</TD></TR>'; } $rank_of_player = $player->getRank(); if(!empty($rank_of_player)) { { $guild_id = $rank_of_player->getGuild()->getId(); $guild_name = $rank_of_player->getGuild()->getName(); if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Guild Membership:</TD><TD>'.$rank_of_player->getName().' of the <a href="?subtopic=guilds&action=show&guild='.$guild_id.'">'.$guild_name.'</a></TD></TR>'; } } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $lastlogin = $player->getLastLogin(); if(empty($lastlogin)) $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>Never logged in.</TD></TR>'; else $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Last login:</TD><TD>'.date("j F Y, g:i a", $lastlogin).'</TD></TR>'; if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; if($config['site']['show_creationdate'] && $player->getCreated()) { $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Created:</TD><TD>'.date("j F Y, g:i a", $player->getCreated()).'</TD></TR>'; } /*Vip Status*/ if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Vip Status:</TD><TD>'; $main_content .= ($account->getPlayerVipTime()) ? '<b><font color="green">Vip Account</font></b>' : '<b><font color="red">Not Vip Account</font></b>'; if($config['site']['show_vip_status']) { $id = $player->getCustomField("id"); if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=10%>Vip Status:</TD>'; $vip = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$config['site']['show_vip_storage'].';')->fetch(); if($vip == false) { $main_content .= '<TD><span class="red"><B>NOT VIP</B></TD></TR>'; } else { $main_content .= '<TD><span class="green"><B>VIP</B></TD></TR>'; } $comment = $player->getComment(); $newlines = array("\r\n", "\n", "\r"); $comment_with_lines = str_replace($newlines, '<br />', $comment, $count); if($count < 50) $comment = $comment_with_lines; if(!empty($comment)) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD VALIGN=top>Comment:</TD><TD>'.$comment.'</TD></TR>'; } } //Outfit shower by Pening edited by loleslav if($config['site']['show_outfit']) { $id = $player->getCustomField("id"); $main_content .= '<TD BGCOLOR="'.$config['site']['darkborder'].'">Outfit:'; $listaddon = array('128','129','130','131','132','133','134','135','136','137','138','139','140','141','142','143','144','145','146','147','148','149','150','151','152','153','154','155','158','159','251','252','268','269','270','273','278','279','288','289','302','324','325'); $lookadd = array('0','1','2','3'); foreach ($listaddon as $pid => $name) foreach ($lookadd as $addo => $name) { $addon1 = $SQL->query('SELECT * FROM players WHERE id = '.$id.' AND looktype = '.$listaddon[$pid].' AND lookaddons = '.$lookadd[$addo].';')->fetch(); if($addon1[looktype] == true ) { $finaddon = $addon1[looktype] + $addon1[lookaddons] * 300; $main_content .= '<TD with=50% style="background-color: '.$config['site']['darkborder'].'"><center><img src="images/addons/'.$finaddon.'.gif"/></center></TD></TD>'; } } } $main_content .= '</td>'; //end Outfit shower by Pening edited by loleslav if($config['site']['show_signature']) { // Signature by makr0mango. function randomSignature( $folder ) { $files = scandir ( "./$folder/" ); $signature = array(); foreach ( $files as $file ): if ( substr ( strtolower ( $file ) , -4 ) == ".png" ) $signature[] = $file; endforeach; return rand(0,count($signature)-1); } $random = randomSignature("signatures"); $main_content .= '<br><tr></tr><tr></tr><tr></tr><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Signature</B></TD></TR>'; $main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD WIDTH=20%>Forum Link:</TD><TD><input type='text' size='75' onclick='this.select();' value='[url=\"http://" . $_SERVER['HTTP_HOST'] . "\"][IMG=http://" . $_SERVER['HTTP_HOST'] . "/signature.php?character=" .$player->getName(). "ℑ=" . $random . "][/url]' /></TD></TR>"; $main_content .= "<TR BGCOLOR=".$config['site']['lightborder']."><TD WIDTH=20%>Direct Link:</TD><TD><input type='text' size='75' onclick='this.select();' value='http://" . $_SERVER['HTTP_HOST'] . "/signature.php?character=" .$player->getName(). "ℑ=" . $random . "' /></TD></TR>"; $main_content .= "<TR BGCOLOR=".$config['site']['darkborder']."><TD COLSPAN='2' style='text-align: center;'><img src='signature.php?character=" .$player->getName(). "ℑ=" . $random . "' /></TD></TR>"; $main_content .= '</TD></TR></TABLE>'; // Signature by makr0mango. } //modified status scripts by ballack13 $main_content .= '<table width=100%><tr>'; //equipment shower by ballack13 $id = $player->getCustomField("id"); $number_of_items = 1; $main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>'; $list = array('2','1','3','6','4','5','9','7','10','8'); foreach ($list as $pid => $name) { $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch(); if($top[itemtype] == false) { if($list[$pid] == '8') { $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>'; } if(is_int($number_of_items / 3)){ $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>'; } else { $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>'; } $number_of_items++; } else { if($list[$pid] == '8') { $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>'; } if(is_int($number_of_items / 3)) $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>'; else $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>'; $number_of_items++; } if($list[$pid] == '8') { $main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>'; } } $main_content .= '</tr></TABLE></td>'; //Hp/Mana/Exp Status by ballack13 $hp = ($player->getHealth() / $player->getHealthMax() * 100); $main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td> <td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr>'; if ($player->getManaMax() > 0) { $mana = ($player->getMana() / $player->getManaMax() * 100); $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td>'; } else { $main_content .= '<tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">0/0<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: 100%; height: 3px;"></td>'; } $main_content .= '</tr></table><tr>'; $next = ($player->getLevel() + 1); $exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200); $expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience()); $expresult = ($expnext / (($expnext + $player->getExperience()) - $exp) * 100); $main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="'.$config['site']['lightborder'].'" align="left" width="20%"><b>Player Level:</b></td><td BGCOLOR="'.$config['site']['lightborder'].'" align="left">'.$player->getLevel().'</td></tr> <tr><td BGCOLOR="'.$config['site']['darkborder'].'" align="left"><b>Player Experience:</b></td><td BGCOLOR="'.$config['site']['darkborder'].'" align="left">'.$player->getExperience().' EXP.</td></tr> <tr><td BGCOLOR="'.$config['site']['lightborder'].'" align="left"><b>To Next Level:</b></td><td BGCOLOR="'.$config['site']['lightborder'].'" align="left">You need <b>'.$exp.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>'; if($config['site']['show_skills_info']) { //Skills Pics v2. Table borders optimized by Absolute Mango $main_content .= '<br/><table cellspacing="0" cellpadding="0" border="0" width="200" align="center"><caption><strong>Skills</strong></caption><tbody><tr> <td align="center"><a href="?subtopic=highscores&list=experience"><img src="images/skills/level.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=magic"><img src="images/skills/ml.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=fist"><img src="images/skills/fist.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=club"><img src="images/skills/club.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=sword"><img src="images/skills/sword.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=axe"><img src="images/skills/axe.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=distance"><img src="images/skills/dist.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=shield"><img src="images/skills/def.png" style="border: none;"/></a></td> <td align="center"><a href="?subtopic=highscores&list=fishing"><img src="images/skills/fish.png" style="border: none;"/></a></td> </tr></tbody></table> <table cellspacing="0" cellpadding="0" border="1" width="360" align="center"><tbody><tr><tr bgcolor="'.$config['site']['darkborder'].'"> <td align="center" width="38"><strong>Level</strong></td> <td align="center" width="38"><strong>ML</strong></td> <td align="center" width="42"><strong>Fist</strong></td> <td align="center" width="40"><strong>Club</strong></td> <td align="center" width="38"><strong>Swrd</strong></td> <td align="center" width="38"><strong>Axe</strong></td> <td align="center" width="38"><strong>Dist</strong></td> <td align="center" width="38"><strong>Shield</strong></td> <td align="center" width="38"><strong>Fish</strong></td></font> </tr> <tr bgcolor="'.$config['site']['lightborder'].'"> <td align="center" width="38">'.$player->getLevel().'</td> <td align="center" width="38">'.$player->getMagLevel().'</td> <td align="center" width="38">'.$player->getSkill(0).'</td> <td align="center" width="38">'.$player->getSkill(1).'</td> <td align="center" width="38">'.$player->getSkill(2).'</td> <td align="center" width="38">'.$player->getSkill(3).'</td> <td align="center" width="38">'.$player->getSkill(4).'</td> <td align="center" width="38">'.$player->getSkill(5).'</td> <td align="center" width="38">'.$player->getSkill(6).'</td> </tr></tbody></table><div table align="center"> <br /> </div>'; //skill script end } //quest status by ballack13 $id = $player->getCustomField("id"); $number_of_quests = 0; $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>'; $quests = $config['site']['quests']; foreach ($quests as $storage => $name) { if(is_int($number_of_quests / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $number_of_quests++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>'; $quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch(); if($quest == false) { $main_content .= '<TD><img src="images/false.png"/></TD></TR>'; } else { $main_content .= '<TD><img src="images/true.png"/></TD></TR>'; } } $main_content .= '</TABLE></td></tr></table><br />'; $deads = 0; //deaths list $player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;'); foreach($player_deaths as $death) { if(is_int($number_of_rows / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; $number_of_rows++; $deads++; $dead_add_content .= "<tr bgcolor=\"".$bgcolor."\"> <td width=\"20%\" align=\"center\">".date("j M Y, H:i", $death['date'])."</td> <td>"; $killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll(); $i = 0; $count = count($killers); foreach($killers as $killer) { $i++; if(in_array($i, array(1, $count))) $killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']); if($killer['player_name'] != "") { if($i == 1) $dead_add_content .= "Killed at level <b>".$death['level']."</b> by "; else if($i == $count) $dead_add_content .= " and by "; else $dead_add_content .= ", "; if($killer['monster_name'] != "") $dead_add_content .= $killer['monster_name']." summoned by "; if($killer['player_exists'] == 0) $dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">"; $dead_add_content .= $killer['player_name']; if($killer['player_exists'] == 0) $dead_add_content .= "</a>"; } else { if($i == 1) $dead_add_content .= "Died at level <b>".$death['level']."</b> by "; else if($i == $count) $dead_add_content .= " and by "; else $dead_add_content .= ", "; $dead_add_content .= $killer['monster_name']; } if($i == $count) $dead_add_content .= "."; } $dead_add_content .= ".</td></tr>"; } if($deads > 0) $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />'; //end if(!$player->getHideChar()) { $main_content .= '<TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR>'; if($account->getRLName()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getRLName().'</TD></TR>'; } if($account->getLocation()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.$account->getLocation().'</TD></TR>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; if($account->getLastLogin()) $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>'.date("j F Y, g:i a", $account->getLastLogin()).'</TD></TR>'; else $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Last login:</TD><TD>Never logged in.</TD></TR>'; if($account->getCreated()) { if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, g:i a", $account->getCreated()).'</TD></TR>'; } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD>Account Status:</TD><TD>'; $main_content .= ($account->isPremium()) ? '<b><font color="green">Premium Account</font></b>' : '<b><font color="green">Gratis Premium Account</font></b>'; if($account->isBanned()) if($account->getBanTime() > 0) $main_content .= '<font color="red"> [Banished until '.date("j F Y, G:i", $account->getBanTime()).']</font>'; else $main_content .= '<font color="red"> [Banished FOREVER]</font>'; $main_content .= '</TD></TR></TABLE>'; $main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=5 CLASS=white><B>Characters</B></TD></TR> <TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>World</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B> </B></TD></TR>'; $account_players = $account->getPlayersList(); $account_players->orderBy('name'); $player_number = 0; foreach($account_players as $player_list) { if(!$player_list->getHideChar()) { $player_number++; if(is_int($player_number / 2)) $bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder']; if(!$player_list->isOnline()) $player_list_status = '<font color="red">Offline</font>'; else $player_list_status = '<font color="green">Online</font>'; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=52%><NOBR>'.$player_number.'. '.$player_list->getName(); $main_content .= ($player_list->isDeleted()) ? '<font color="red"> [DELETED]</font>' : ''; $main_content .= '</NOBR></TD><TD WIDTH=15%>'.$config['site']['worlds'][$player_list->getWorld()].'</TD><TD WIDTH=25%>'.$player_list->getLevel().' '.$vocation_name[$player_list->getWorld()][$player_list->getPromotion()][$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>'; } } $main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>'; } $main_content .= '<BR><BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; $main_content .= '</TABLE>'; } else $search_errors[] = 'Character <b>'.$name.'</b> does not exist.'; } else $search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.'; if(!empty($search_errors)) { $main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>'; foreach($search_errors as $search_error) $main_content .= '<li>'.$search_error; $main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>'; $main_content .= '<BR><FORM ACTION="?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>'; } } ?> Tentei colocar asssim: { } if(is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD><b>Dinheiro:</TD><TD>'.$player->getPlayerReset().' Gold Coins.</b></TD></TR>'; $rank_of_player = $player->getRank(); if(!empty($rank_of_player)) { Mas da erro.
  11. Bom gente, é o seguinte, quero um sistema de reset que funcione da seguinte maneira: Pode ser por talkaction ou por um comando no SQLite Studio. Eu executo a talkaction ou comando sql, ai todos os players menos o GOD perdem o LEVEL, perdem TODOS OS ITENS MENOS os itens DONATE, mas o reset não afetaria a LIFE, MANA e SKILLS do player. Por favor, alguém pode me ajudar? Imploro, preciso muito desse sistema!!!! IMPLOROOOOO up up Alguém fecha por favor? Já consegui! EDIT: Bom, é por talkaction. Vá na pasta talkactions/scripts e crie um arquivo chamado reset.lua e dentro dele coloque isso aqui: VERMELHO- itens que NÃO SERÃO EXCLUÍDOS DO Depósito dos Players. AZUL- Itens que NÃO SERÃO ECLUÍDOS DO PLAYER. Agora vão em talkactions.xml e adicione a seguinte tag: Pronto. Agora, se você usa TFS, no lugar do script do reset.lua coloque este aqui: A tag no .xml é a mesma! Créditos: xWhiteWolf(outro fórum) Wise(outro fórum)
  12. Bom dia, tenho um servidor onde a rate exp dele é alta e por isso implementei o sistema de resets. Aí que vem o problema, após 2 resets, caso você esteja com a aba Skills aberta, aquela que você ve a experience, level, magic level e etc, o client simplesmente da debug. Descobri que era por causa dessa aba devido a outros tópicos pelo google a fora. Mas eis o problema, não achei a solução e sei que a causa é a experiencia que aparece na aba e acaba sendo um número extremamente grande, causando o tão chato e não desejado DEBUG. Existe algum método para burlar ou sanar este problema além de não abrir a aba skill? Se existe outro tópico com uma solução, eu não achei e peço desculpas antecipadamente. Atenciosamente, teteusinhu. @up!
  13. Boa noite, tenho uma dúvida relacionada ao sistema de resets. Gostaria de saber como posso fazer com que o dano base, tanto de ataques corpo a corpo, como spells, aumentem de acordo com a quantidade de resets. -> Suponhamos que após o primeiro reset, o dano seja aumentado em 2 vezes, segundo reset em 3x e assim por diante. Creio que se fosse por storage seria mais fácil, porem com o sistema de reset do MarcelloMkez no seguinte tópico: http://www.xtibia.com/forum/topic/142463-advanced-reset-system-20/ ele acaba sendo por Database. Gostaria de saber como proceder? Estou realmente perdido. Quem puder me ajudar agradeço imensamente. Agradeço desde já, Abraços.
  14. Boa Noite estou aqui para tirar uma dúvida em relação a um servidor e quanto tempo ele passa sem precisar ser resetado. Então tenho um servidor global e as vezes fico na dúvida quando reseta-lo.. oque faz um servidor durar mais tempo sem ser resetado²? ________________________________________________________________________ xtibia sempre
  15. ontem eu fiz um topico de como deixar seu ot com level infinito, hj um post um pouco parecido! um reset system que voce nao desloga pra resetar =) vai na pasta data/talkactions/scripts e crie um arquivo chamado newresetsystem.lua dentro dele tu bota isso aqui: obs: configure aquilo que tem que ser configurado la na primeira linha =) agora vá em data/talkactions/talkactions.xml abra o com bloco de notas ( se tiver tudo embaraçado abra como wordpad! FIKADIKA =D ) e crie uma nova linha: divirta-se sem precisar deslogar pra resetar =p
  16. Gente desculpa tinha "iscrivinhado" errado, o reset system sem precisar deslogar eu sei fazer =P o que eu nao sei fazer é: um maxlevel system ke nao precisa deslogar! ou seja: !maxlevel You advanced from level 717217 to 717218, qualquer coisa, o importante e que o player nao deslogue, e tbm que o player fique no lvl 717218!
  17. Gostaria de um baiak 8.6 com sistema de reset , com 99999x quando chega em um certo lvl reseta. blablabla com eventos...
  18. Alguém me ajuda esse script de reset quando da look nao mostra a quantidade de reset alguem poderia ajudar aew? function onSay(cid, words, param, channel) config = { RemainingLvl=8, exper=4200, pid=getPlayerGUID(cid), batle="yes" } function getPlayerResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if (config.batle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.") return TRUE end if (getPlayerStorageValue(cid, 11548) >= os.time()) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.") return TRUE end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 85 then if getPlayerLevel(cid) >= 780 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 780 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 80 then if getPlayerLevel(cid) >= 730 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 730 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 75 then if getPlayerLevel(cid) >= 680 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 680 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 70 then if getPlayerLevel(cid) >= 630 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 630 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 65 then if getPlayerLevel(cid) >= 590 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 590 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 60 then if getPlayerLevel(cid) >= 550 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 550 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 55 then if getPlayerLevel(cid) >= 510 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 510.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 50 then if getPlayerLevel(cid) >= 480 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 480 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 45 then if getPlayerLevel(cid) >= 450 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 450 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 40 then if getPlayerLevel(cid) >= 430 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 430 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 35 then if getPlayerLevel(cid) >= 410 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 410 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 30 then if getPlayerLevel(cid) >= 390 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 390") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 25 then if getPlayerLevel(cid) >= 380 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 380 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 20 then if getPlayerLevel(cid) >= 365 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 365 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 15 then if getPlayerLevel(cid) >= 360 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 360 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 10 then if getPlayerLevel(cid) >= 355 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 355 .") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1020) < 5 then if getPlayerLevel(cid) >= 350 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 350 .") end end -- Resets Vips -- ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 85 then if getPlayerLevel(cid) >= 770 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 770 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 80 then if getPlayerLevel(cid) >= 720 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 720 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 75 then if getPlayerLevel(cid) >= 670 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 670 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 70 then if getPlayerLevel(cid) >= 620 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 620 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 65 then if getPlayerLevel(cid) >= 580 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 580 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 60 then if getPlayerLevel(cid) >= 540 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 540 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 55 then if getPlayerLevel(cid) >= 500 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 500 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 50 then if getPlayerLevel(cid) >= 470 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 470 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 45 then if getPlayerLevel(cid) >= 440 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 440 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 40 then if getPlayerLevel(cid) >= 420 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 420 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 35 then if getPlayerLevel(cid) >= 400 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 400 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 30 then if getPlayerLevel(cid) >= 380 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 380 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 25 then if getPlayerLevel(cid) >= 370 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 370 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 20 then if getPlayerLevel(cid) >= 360 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 360 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 15 then if getPlayerLevel(cid) >= 355 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 355 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 10 then if getPlayerLevel(cid) >= 340 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 340 .") end end end ---------------------------------------------------------------------------------------------------------------------------------------- if isPremium(cid) == TRUE then if getPlayerStorageValue(cid,1020) < 5 then if getPlayerLevel(cid) >= 330 then setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid) db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 330 .") end end end return true end
  19. Fala galera hoje vim ensinar a colocar um rank reset em seu ot server..Bem vamos ao que interesa.. em talkactions/scripts crie um arquivo .lua com o nome topfrags.lua e dentro dele coloque isso: talkactions.xml Bem Galera e Isso Espero Ter Ajudado.. Creditos; Kaiotp AdilsonHacker
  20. oi pessoas, eu queria um script, acho que é um talkaction. assim: o rank atualiza sempre quando alguem upa, com possibilidades de colocar novos ranks, exemplo: !rank health aqueles com a maior life do servidor, !rank monster dragon aqueles que mais mataram dragons no servidor... também o que eu mais quero, !rank reset que mostra os players com mais resets do servidor --[[ <(Advanced Reset System 2.0)> Autor: Juniior Cwb ;*. Contato: (Juniior_Cwb@hotmail.com) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Atenção , Se Achar Esse Sistema em outro site ou forum favor comunicar Eu ( Juniior Cwb ) Juniior_Cwb@hotmail.com ) -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [sTAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "/installreset" -- Só será usado uma vez, para instalar o sistema. -- "!resetar" -- Para Resetar. function onSay(cid, words, param) if words =="!resetar" then --[ Condições de Reset ] -- local coNdConf = { needPz = false, -- Precisa estar em Pz pra resetar? [true, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [true, false] red = true, -- Players com Pk Red pode resetar? [true, false] battle = false, -- Players precisão estar sem battle pra resetar? [true, false] teleport = false, -- Teleportar Player para o templo após resetar? [true, false] look = true, -- Aparecer Resets no Look do Player? [true, false] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 350, -- Level Necessário para Resetar. [Valor] backLvl = 8, -- Level que voltará após o Reset. [Valor] time = 2, -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {x}, Desabilitar = {}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 4, premmy= 350, free= 350}, stage2= {resets= 9, premmy= 360, free= 360}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 14, premmy= 370, free= 370}, -- resets = Número de resets para o Stage; stage4= {resets= 19, premmy= 380, free= 380}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 24, premmy= 390, free= 390}, -- free = Level necessário para Free Accounts; stage6= {resets= 29, premmy= 400, free= 400}, -- Coloque em Ordem... stage7= {resets= 34, premmy= 420, free= 420}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 39, premmy= 440, free= 440}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 44, premmy= 460, free= 460}, stage10={resets= 49, premmy= 480, free= 480}, stage11={resets= 54, premmy= 500, free= 500}, stage12={resets= 59, premmy= 525, free= 525}, stage13={resets= 64, premmy= 550, free= 550}, stage14={resets= 69, premmy= 575, free= 575}, stage15={resets= 74, premmy= 600, free= 600}, stage16={resets= 79, premmy= 650, free= 650}, stage17={resets= 84, premmy= 700, free= 700}, stage18={resets= 89, premmy= 750, free= 750}, stage19={resets= 94, premmy= 800, free= 800}, stage20={resets= 99, premmy= 1000, free= 1000}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[sTAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, premmy= stage.stage1.premmy, free= stage.stage1.free}, {resets= stage.stage2.resets, premmy= stage.stage2.premmy, free= stage.stage2.free}, {resets= stage.stage3.resets, premmy= stage.stage3.premmy, free= stage.stage3.free}, {resets= stage.stage4.resets, premmy= stage.stage4.premmy, free= stage.stage4.free}, {resets= stage.stage5.resets, premmy= stage.stage5.premmy, free= stage.stage5.free}, {resets= stage.stage6.resets, premmy= stage.stage6.premmy, free= stage.stage6.free}, {resets= stage.stage7.resets, premmy= stage.stage7.premmy, free= stage.stage7.free}, {resets= stage.stage8.resets, premmy= stage.stage8.premmy, free= stage.stage8.free}, {resets= stage.stage9.resets, premmy= stage.stage9.premmy, free= stage.stage9.free}, {resets=stage.stage10.resets, premmy=stage.stage10.premmy, free=stage.stage10.free}, {resets=stage.stage11.resets, premmy=stage.stage11.premmy, free=stage.stage11.free}, {resets=stage.stage12.resets, premmy=stage.stage12.premmy, free=stage.stage12.free}, {resets=stage.stage13.resets, premmy=stage.stage13.premmy, free=stage.stage13.free}, {resets=stage.stage14.resets, premmy=stage.stage14.premmy, free=stage.stage14.free}, {resets=stage.stage15.resets, premmy=stage.stage15.premmy, free=stage.stage15.free}, {resets=stage.stage16.resets, premmy=stage.stage16.premmy, free=stage.stage16.free}, {resets=stage.stage17.resets, premmy=stage.stage17.premmy, free=stage.stage17.free}, {resets=stage.stage18.resets, premmy=stage.stage18.premmy, free=stage.stage18.free}, {resets=stage.stage19.resets, premmy=stage.stage19.premmy, free=stage.stage19.free}, {resets=stage.stage20.resets, premmy=stage.stage20.premmy, free=stage.stage20.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: marcello_dirt@hotmail.com", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installreset" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] -="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[by: Juniior Cwb ;* ]=-- algue me ajuda me quem me ajudar ganha rep+ up up
  21. godjean

    Npc Reset.

    Ola pessoal então meu amigo passo um script de npc hoje. Ele reseta o player e da certas coisas para ele ao resetar uma delas é vocation ...essas coisas ae o script.(Ele é 7.92 eu gostaria passa ele para 8.54) elseif msgcontains(msg, 'reset') then if vezes == -1 or vezes == 0 then selfSay('Reset a god? Hmm... First time? Ok, i will do it free this time!') talk_state = 6 else selfSay('Reset a god? Hmm... Sure I can, but it will not be cheap, what do you say about ' .. rubys .. ' ruby coins?') talk_state = 6 end -- reset elseif talk_state == 6 then --rubys = (getPlayerLevel(cid)*4000)*(vezes*10)/1000000) if msgcontains(msg, 'yes') then if isPremium(cid) then if getPlayerLevel(cid) >= 400 then if getPlayerVocation(cid) >= 9 then --if pay(cid,(getPlayerLevel(cid)*4000)*(vezes*10)) then if getPlayerVocation(cid) == 13 then -- deuses if getPlayerLevel(cid) >= 500 then if getPlayerItemCount(cid,13685) >= rubys then selfSay('Welcome new god!') doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.") health = getCreatureMaxHealth(cid) mana = getCreatureMaxMana(cid) doPlayerAddExp(cid,-10000000000) doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1)) doCreatureAddHealth(cid,(health/10)*(vezes+1)) doCreatureChangeMaxMana(cid, (mana/15)*(vezes+1)) doPlayerAddMana(cid,(mana/15)*(vezes+1)) doPlayerMagicLevel(cid,25) doSendMagicEffect(getPlayerPosition(cid),12) setPlayerStorageValue(cid,7777,vezes+1) doPlayerTakeItem(cid,13685,rubys) talk_state = 0 else selfSay('Sorry mortal, but you dont have this monney!') talk_state = 0 end else selfSay('Sorry, but only gods level 500 or above can do that!') talk_state = 0 end end if getPlayerVocation(cid) == 14 then if getPlayerLevel(cid) >= 500 then if getPlayerItemCount(cid,13685) >= rubys then selfSay('Welcome new god!') doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.") health = getCreatureMaxHealth(cid) mana = getCreatureMaxMana(cid) doPlayerAddExp(cid,-10000000000) doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1)) doCreatureAddHealth(cid,(health/10)*(vezes+1)) doCreatureChangeMaxMana(cid, (mana/15)*(vezes+1)) doPlayerAddMana(cid,(mana/15)*(vezes+1)) doPlayerMagicLevel(cid,25) doSendMagicEffect(getPlayerPosition(cid),12) setPlayerStorageValue(cid,7777,vezes+1) doPlayerTakeItem(cid,13685,rubys) talk_state = 0 else selfSay('Sorry mortal, but you dont have this monney!') talk_state = 0 end else selfSay('Sorry, but only gods level 500 or above can do that!') talk_state = 0 end end if getPlayerVocation(cid) == 15 then if getPlayerLevel(cid) >= 500 then if getPlayerItemCount(cid,13685) >= rubys then selfSay('Welcome new god!') doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.") health = getCreatureMaxHealth(cid) mana = getCreatureMaxMana(cid) doPlayerAddExp(cid,-10000000000) doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1)) doCreatureAddHealth(cid,(health/10)*(vezes+1)) doCreatureChangeMaxMana(cid, (mana/10)*(vezes+1)) doPlayerAddMana(cid,(mana/10)*(vezes+1)) doPlayerMagicLevel(cid,5) doPlayerAddSkill(cid,4,25) doPlayerAddSkill(cid,5,25) doSendMagicEffect(getPlayerPosition(cid),12) setPlayerStorageValue(cid,7777,vezes+1) doPlayerTakeItem(cid,13685,rubys) talk_state = 0 else selfSay('Sorry mortal, but you dont have this monney!') talk_state = 0 end else selfSay('Sorry, but only gods level 500 or above can do that!') talk_state = 0 end end if getPlayerVocation(cid) == 16 then if getPlayerLevel(cid) >= 500 then if getPlayerItemCount(cid,13685) >= rubys then selfSay('Welcome new god!') doPlayerSendTextMessage(cid,22,"Você resetou seu personagem.") health = getCreatureMaxHealth(cid) mana = getCreatureMaxMana(cid) doPlayerAddExp(cid,-10000000000) doCreatureChangeMaxHealth(cid, (health/10)*(vezes+1)) doCreatureAddHealth(cid,(health/10)*(vezes+1)) doCreatureChangeMaxMana(cid, (mana/10)*(vezes+1)) doPlayerAddMana(cid,(mana/10)*(vezes+1)) doPlayerAddSkill(cid,0,25) doPlayerAddSkill(cid,1,25) doPlayerAddSkill(cid,2,25) doPlayerAddSkill(cid,3,25) doPlayerAddSkill(cid,5,25) doSendMagicEffect(getPlayerPosition(cid),12) setPlayerStorageValue(cid,7777,vezes+1) doPlayerTakeItem(cid,13685,rubys) talk_state = 0 else selfSay('Sorry mortal, but you dont have this monney!') talk_state = 0 end else selfSay('Sorry, but only gods level 500 or above can do that!') talk_state = 0 end end if getPlayerStorageValue(cid,7777) <= 0 and getPlayerVocation(cid) >= 13 and getPlayerLevel(cid) >= 500 then setPlayerStorageValue(cid,7777,1) end if getPlayerVocation(cid) >= 9 and getPlayerVocation(cid) < 13 then -- semis if getPlayerItemCount(cid,6500) >= 1000 then selfSay('Oh! Now you are a god!') if getPlayerVocation(cid) >= 9 and getPlayerVocation(cid) < 11 then doPlayerMagicLevel(cid,10) end if getPlayerVocation(cid) == 11 then doPlayerMagicLevel(cid,2) doPlayerAddSkill(cid,4,10) doPlayerAddSkill(cid,5,10) end if getPlayerVocation(cid) == 12 then doPlayerAddSkill(cid,0,10) doPlayerAddSkill(cid,1,10) doPlayerAddSkill(cid,2,10) doPlayerAddSkill(cid,3,10) doPlayerAddSkill(cid,5,10) end doPlayerSendTextMessage(cid,22,"Você evoluiu seu espírito a Deus.") doPlayerAddExp(cid,-10000000000) doCreatureChangeMaxHealth(cid,185) doCreatureAddHealth(cid,185) doCreatureChangeMaxMana(cid,35) doPlayerAddMana(cid,35) doPlayerSetVocation(cid, getPlayerVocation(cid)+4) doSendMagicEffect(getPlayerPosition(cid),12) doPlayerTakeItem(cid,6500,100) talk_state = 0 else selfSay('Sorry, but you dont have the 100 demoniac essense!') talk_state = 0 end end else selfSay('Sorry, but only gods i can do that!') talk_state = 0 end else selfSay('Sorry, but only gods level 500 or above can do that!') talk_state = 0 end else selfSay('Sorry but only can reset a god premmy.') talk_state = 0 end end --end
  22. Primeiramente, não sei bem se essa é área correta, mas como já vi algumas querys para sql, resolvi postar aqui. Procurei bastante aqui no xtibia e não encontrei nenhum que servisse totalmente, se alguém já tiver um que foi testado e puder ajudar... Bem, eu gostaria de saber como eu reseto meu ot server SQLITE. Eu gostaria que resetasse o Ot todo. Deletasse as accounts, players, guilds, items depot, items nas houses, enfim... Tudo. Porém, queria que não deletasse as tables que eu coloquei a partir de querys. Por exemplo: Executei uma query que cria a table do War System. <- Queria que não fosse deletado. Se alguém puder ajudar, agradeço e Rep+ Acho que vai ajudar muitas pessoas. Observação: 1. Não quero deletar 1 por 1 account. (acho que tem jeito mais fácil) 2. Não quero botar outra database limpa, pois as querys q foram executadas não ficarão salvas. Desde já, agradeço.
  23. Gostaria de um script de NPC que resetasse o level do player uma vez só. Tipo um NPC Reborn que vc só pode rebornar uma vez. Só que esse só vai resetar o level pra 8, sem mudar life,skills e tal. Agradeço ! ! ! (+) REP pra quem responder certinho.
  24. Olá. Eu tenho o sistema de RESET's só que ele não atende muito ao meu querer.Dou rep++++ pra quem conseguir criar um sistema de RESET's com a seguinte configuração: RESET POR STAGE: PARA PODER DAR QUALQUER RESET O PLAYER DEVE TER O LEVEL 350 RESET MAXIMO = 10 AO RESETAR O PLAYER VOLTA LVL 8 AO RESETAR O PLAYER RESETA OS SKILL's AO RESETAR,VOLTA A MANA E HP DO PRO LVL 8 AO RESETAR O PLAYER PODE FAZER TODAS AS QUEST's NOVAMENTE (como aqui é stourage não quero que ele perca a stourage vip) OBS: SISTEMA VIP SERÁ O DE PREMIUM AO RESETAR O PLAYER RECEBE O TERMO "RESET's : numero de resets" NO LOOK DELE Se puderem me ajudar eu garanto que dou rep++++ preciso muito desse sistema pois ele me deu muito dinheiro do geito que está apenas voltando level porém os players exigem mais e eu preciso para colocar meu servidor que por incrivel que pareça me fornece sustento *.* Desde de já obrigado a todos.!
  25. vá em NPC/scripts, Crie um arquivo .lua (Exemplo: reset.lua) Depois volta na pasta NPC, Crie um Arquivo .XML (Exemplo: reset.xml) e crie um NPC. o meu ta asssim. <npc name="reborn" script="data/npc/scripts/reborn.lua" access="6" lookdir="1"> <health now="1000" max="1000"/> <look type="133" head="95" body="86" legs="86" feet="38" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|.Qual motivo de ter vindo ate mim depois desta jornada {reborn}." /> </parameters> </npc> no arquivo .lua insira isto dentro -- SCRIPT FEITO POR YUNIE Edited by Stark -- config minlevel = 1 -- level para resetar price = 5000 newlevel = 9 -- level após reset newexp = 0 -- nova experiencia após reset -- end config function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) return true endfunction getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cidif msgcontains(msg, 'renascer') and getPlayerStorageValue(cid,30025) == 4 then selfSay('Voçe Não Pode Mais renascer.') focus = 0 talk_start = 0 elseif msgcontains(msg, 'renascer') and getPlayerLevel(cid) < 30 and getPlayerStorageValue(cid,30025) ~= 4 then selfSay('Mensagem que sera dita caso nao tenha os requerimentos nescessarios')elseif msgcontains(msg, 'renascer') then selfSay('Entao o grande aventureiro gostaria de renascer? {yes}') talk_state = 2 elseif msgcontains(msg, 'yes') and talk_state ==2 and getPlayerLevel(cid) >= 30 and getPlayerVocation(cid) == 50 then doPlayerSetVocation(cid, 95) addReset(cid) playerid = getPlayerGUID(cid) setPlayerStorageValue(cid,30025,4) doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."") talk_state = 0 elseif msgcontains(msg, 'yes') and talk_state == 2 then selfSay('Sorry, ' .. getCreatureName(cid) .. '! You must revert or transform, Voce deve transformar ou reverter.') elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye. Deslogue e logue Por Favor!!!!') focus = 0 talk_start = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) getPlayerLevel(cid) >= 30 ( Level nescessario ) getPlayerVocation(cid) == 50 then (vocação) doPlayerSetVocation(cid, 95) (vocação que sera inserida apos reset) selfSay('Mensagem que sera dita apos player falar a mensagem de ação') no caso (renascer) Duvidas Postar aqui.
×
×
  • Create New...