Ir para conteúdo

Suporte Chaitosoft

Campones
  • Total de itens

    10
  • Registro em

  • Última visita

Sobre Suporte Chaitosoft

Informações

  • Forma que conheci o xTibia
    Outros Sites
  • Sou
    Não Informado

Últimos Visitantes

896 visualizações

Suporte Chaitosoft's Achievements

  1. mano estou com um server tibia ot 8.00 pra por on nao coloquei ainda pq nao estou conseguindo por uma porta pra so passar conta premium, tentei já um monte de script ai mais sem sucesso cara estou desisperado por favor me ajuda ai obrigado, tem como é pra por uma porta pra so  passar conta premium.

  2. Olá, tudo na boa? Após perceber que alguns servidores possuíam problemas com a recarga de estamina por uma falha causada na própria source decidi procurar um script que pudesse resolver isto, nem que fosse de uma maneira meio "arrumada". Porém vai ser de ótima ajuda para aqueles que desejam manter ativo o sistema de estamina em seu servidor. 1°- Siga até "/data/globalevents/" e adiciona a tag no arquivo "globalevents.xml": <globalevent name="stamina" interval="3600000" event="script" value="stamina.lua"/> 2°- Siga até "/data/globalevents/scripts/" e crie um arquivo chamado "stamina.lua" e preencha: function onThink(interval, lastExecution, thinkInterval) local total,minutes = 151200000,3900000 local query = db.getResult("SELECT `id`, `stamina` FROM `players` WHERE `id` > 6 AND `group_id` < 3;") if (query:getID() ~= -1) then while true do local id, stamina_now = query:getDataInt("id"), query:getDataInt("stamina") if stamina_now < (total-minutes) then db.executeQuery("UPDATE `players` SET `stamina` = "..stamina_now+minutes.." WHERE `id` = "..id) end if not(query:next()) then break end end query:free() end return true end É isto ai, obrigado
  3. hahaha é isso ai, as vezes é preciso retirar ideia de outros jogos.
  4. Opa, e ai galera do XTibia. Sabe aqueles jogos FPS que fornecem ao jogador um valor baseado na quantidade de death e kill do jogador. Foi lembrando deste sistemas que remontei este kill/death ratio e fiz a integração com uma página Gesior para manter um rank interativo com os jogadores. Espero que gostem 1°- Siga até o diretório "/data/creaturescripts/" e adicione a tag ao arquivo "creaturescripts.xml": <!-- K.D System --> <event type="kill" name="killpoint" event="script" value="onkill.lua"/> <event type="preparedeath" name="deathpoint" event="script" value="onpd.lua"/> <event type="look" name="KdrLook" event="script" value="onlook.lua"/> 2°- Siga até o diretório "/data/creaturescripts/scripts" e adicione os registros de login em "login.lua": registerCreatureEvent(cid, "KdrLook") registerCreatureEvent(cid, "killpoint") registerCreatureEvent(cid, "deathpoint") 3°- Siga até o diretório "/data/creaturescripts/scripts", crie um arquivo chamado "onpd.lua" e preencha: function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) == true then db.query("UPDATE `players` SET `deaths` = `deaths` + 1 WHERE id = " .. getPlayerGUID(cid) .. ";") doCreatureSay(cid, '+1 Death Point!', TALKTYPE_ORANGE_1) end return true end 4°- Siga até o diretório "/data/creaturescripts/scripts", crie um arquivo chamado "onkill.lua" e preencha: function onKill(cid, target, damage, flags) if isPlayer(target) == true then db.query("UPDATE `players` SET `frags` = `frags` + 1 WHERE id = " .. getPlayerGUID(cid) .. ";") doCreatureSay(cid, '+1 Frag Point!', TALKTYPE_ORANGE_1) end return true end 5°- Siga até o diretório "/data/creaturescripts/scripts", crie um arquivo chamado "onlook.lua" e preencha: function onLook(cid, thing, position, lookDistance) function getKillsPlayer(cid) local Info = db.getResult("SELECT `frags` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") local frags= Info:getDataInt("frags") return frags end function getDeathsPlayer(cid) local Info = db.getResult("SELECT `deaths` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1") local deaths= Info:getDataInt("deaths") return deaths end if isPlayer(thing.uid) then local kdr = getKillsPlayer(thing.uid)/getDeathsPlayer(thing.uid) doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and "\nShe" or "\nHe") .. " has Killed: ["..getKillsPlayer(thing.uid).."] Players."..(getPlayerSex(thing.uid) == 0 and "\nShe" or "\nHe") .. " has Died: ["..getDeathsPlayer(thing.uid).."] Times.\nThe Kdr(Kill Death Ratio) is: ["..kdr.."].") end if(thing.uid == cid) then local kdr = getKillsPlayer(thing.uid)/getDeathsPlayer(thing.uid) doPlayerSetSpecialDescription(thing.uid, "\nYou have Killed: ["..getKillsPlayer(thing.uid).."] Players.\nYou have Died: ["..getDeathsPlayer(thing.uid).."] Times.\nYou Kdr(Kill Death Ratio) is: ["..kdr.."].") end return true end 6°- Siga até a pasta de seu website Gesior e prepare o "index.php" pare receber a página: <?PHP $page = $_REQUEST['page']; if(count($config['site']['worlds']) > 1) { foreach($config['site']['worlds'] as $idd => $world_n) { if($idd == (int) $_GET['world']) { $world_id = $idd; $world_name = $world_n; } } } if(!isset($world_id)) { $world_id = 0; $world_name = $config['server']['serverName']; } $offset = $page * 100; //jesli chodzi o skilla if(isset($id)) $skills = $SQL->query('SELECT * FROM players, player_skills WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = '.$id.' AND players.account_id != 1 ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset); else { $skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 AND deaths != 1 ORDER BY frags/deaths DESC, level DESC LIMIT 101 OFFSET '.$offset); $list_name = 'K.D System Ratio'; $list = 'frags'; } //wyswietlanie wszystkiego $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><CENTER><H2>Ranking for '.$list_name.' on '.$world_name.'</H2></CENTER><BR>'; if(count($config['site']['worlds']) > 1) { $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD> <FORM ACTION="index.php?subtopic=highscores&list='.$list.'" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=highscores><INPUT TYPE=hidden NAME=list VALUE=experience> <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['lightborder'].'"> <TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>'; foreach($config['site']['worlds'] as $id => $world_n) { $main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>'; } $main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18> </TD></TR></TABLE></TABLE></FORM></TABLE><br>'; } $main_content .= '<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=5% CLASS=whites><B>Rank</B></TD> <TD WIDTH=65% CLASS=whites><B>Name</B></TD><TD WIDTH=30% CLASS=whites><b><center>K/D</center></B></TD>'; $main_content .= '<TD CLASS=whites><b><center>Level</center></B></TD>'; $main_content .= '</TR><TR>'; foreach($skills as $skill) { if($number_of_rows < 100) { /* INICIO SCRIPT CONTAGEM */ $deathssss = $skill['deaths']-1; $fragsss = $skill['frags']-1; if($skill['deaths'] > 0){$num = $skill['deaths'];}else{ $num = 1;} $number2 = $skill['frags']/$num; $number = number_format($number2, 2, '.', ''); if($number2 > 1){$st = "#98FB98";}elseif($number2 < 1){$st = "#FF6A6A";}else{$st = ""; /*#87CEEB*/} /* FIM SCRIPT CONTAGEM */ $skill['value'] = $skill['level']; if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++; $main_content .= '<tr bgcolor="'.$bgcolor.'" style="background: '.$st.' !important;"> <td>'.($offset + $number_of_rows).'.</td> <td>'.$flag.'<a href="index.php?subtopic=characters&name='.urlencode($skill['name']).'">'.$skill['name'].'</a>'; if($config['site']['showMoreInfo']) $main_content .= '<br><small>Level: '.$skill['level'].', '.$vocation_name[$skill['world_id']][$skill['promotion']][$skill['vocation']]; if(count($config['site']['worlds']) > 1) $main_content .= ', '.$config['site']['worlds'][$skill['world_id']]; $main_content .= '</small>'; $main_content .= '<td><center><b>'.$number.' </b> ('.$fragsss.'/'.$deathssss.')</center></td>'; $main_content .= '</td><td>'.$skill['value'].'</td>'; $main_content .= '</tr>'; } else $show_link_to_next_page = TRUE; } $main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>'; //link to previous page if actual page isn't first if($page > 0) $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=eventrank&world='.$world_id.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>'; //link to next page if any result will be on next page if($show_link_to_next_page) $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=eventrank&world='.$world_id.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>'; //end of page $main_content .= '</TABLE></TD> </TR> </TABLE>'; $main_content .= '<center><b>Desenvolvido por: Wênio Ferraz - <a href="http://www.chaitosoft.com" target="_blank">ChaitoSoft.com</a></b></center>'; ?> 7°- Siga até seu banco de dados e execute as seguintes QUERYS: ALTER TABLE `players` ADD `frags` INT( 11 ) NOT NULL DEFAULT '1'; ALTER TABLE `players` ADD `deaths` INT( 11 ) NOT NULL DEFAULT '1'; Prontinho, obrigado!
  5. Olá, poste os erros que ajudamos porém seja mais específico em qual plataforma quer compilar Linux ou Windows?
  6. Olá, sabe dizer qual é a arquitetura da máquina? x86 ou x64?
  7. Olá, aonde você está fazendo a hospedagem do seu servidor?
  8. Olá pessoal do XTibia, tudo na boa? Após pesquisar muito não consegui encontrar um sistema de reset para usar no servidor de nosso cliente Demolidores então decidi fazer a junção de alguns sistemas e montei também um ranking para Gesior. Chega de blá blá blá e vamos direto ao script. 1°- Adicione a tag em seu "talkactions.xml"; <talkaction words="!resetar;!reset" event="script" value="reseting.lua"/> 2°- Adicione o arquivo "reseting.lua" ao diretório "/data/talkactions/scripts/"; function onSay(cid, words, param, channel) config = { RemainingLvl=8, exper=4200, pid=getPlayerGUID(cid), batle="yes" } function getPlayerResets(cid) resets = getPlayerStorageValue(cid,1021) 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 local healthMax, manaMax = getCreatureMaxHealth(cid), getCreatureMaxMana(cid) ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 85 and getPlayerResets(cid) == 15 then if getPlayerLevel(cid) >= 16000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 16000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 80 and getPlayerResets(cid) == 14 then if getPlayerLevel(cid) >= 15000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 15000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 70 and getPlayerResets(cid) == 13 then if getPlayerLevel(cid) >= 14000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 14000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 65 and getPlayerResets(cid) == 12 then if getPlayerLevel(cid) >= 13000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 13000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 60 and getPlayerResets(cid) == 11 then if getPlayerLevel(cid) >= 12000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 12000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 55 and getPlayerResets(cid) == 10 then if getPlayerLevel(cid) >= 11000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 11000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 50 and getPlayerResets(cid) == 9 then if getPlayerLevel(cid) >= 10000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 10000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 45 and getPlayerResets(cid) == 8 then if getPlayerLevel(cid) >= 9000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 9000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 40 and getPlayerResets(cid) == 7 then if getPlayerLevel(cid) >= 8000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 8000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 35 and getPlayerResets(cid) == 6 then if getPlayerLevel(cid) >= 7000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 7000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 30 and getPlayerResets(cid) == 5 then if getPlayerLevel(cid) >= 6000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 6000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 25 and getPlayerResets(cid) == 4 then if getPlayerLevel(cid) >= 5000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 5000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 20 and getPlayerResets(cid) == 3 then if getPlayerLevel(cid) >= 4000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 4000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 15 and getPlayerResets(cid) == 2 then if getPlayerLevel(cid) >= 3000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 3000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 10 and getPlayerResets(cid) == 1 then if getPlayerLevel(cid) >= 2000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 2000 ou mais para poder resetar.") end end ---------------------------------------------------------------------------------------------------------------------------------------- if getPlayerStorageValue(cid,1021) < 5 and getPlayerResets(cid) == 0 then if getPlayerLevel(cid) >= 1000 then setPlayerStorageValue(cid,1021,getPlayerResets(cid)+1) setPlayerStorageValue(cid,11548,os.time()+30) doPlayerAddLevel(cid, config.RemainingLvl) setCreatureMaxHealth(cid, healthMax) setCreatureMaxMana(cid, manaMax) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORK_RED) db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid) else doPlayerSendCancel(cid,"Você precisa ter level 1000 ou mais para poder resetar.") end end return true end 3°- Execute a query SQL para criar a coluna "reset" no banco de dados Mysql; ALTER TABLE `players` ADD `reset` BIGINT(255) NOT NULL DEFAULT '0'; 4°- Configure o "index.php" do seu Gesior para receber a página PHP; <?php $limitt = 100; $zap = $SQL->query('SELECT `name`,`level`, `reset` FROM `players` WHERE `group_id` < '.$config['site']['players_group_id_block'].' AND `name` != "Account Manager" ORDER BY `reset` DESC, `level` DESC LIMIT 100;'); $number_of_rows = 0; $main_content .= ' <center><h2>Reset Ranking</h2></center> <TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%> <tr bgcolor="#af2126"> <td><font color="white">Nome</font></td> <td><font color="white">Reset</font></td> <td><font color="white">Level</font></td> </tr> '; foreach($zap as $wynik) { 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> <a href="index.php?subtopic=characters&name='.urlencode($wynik['name']).'"> <b> '.$wynik['name'].' </b></a> </td> <td> '.$wynik['reset'].' </td> <td> '.$wynik['level'].' </td> </tr> '; } $main_content .= ' </tr> </table>'; ?> Seria basicamente isto, espero que possa ter contribuído com alguém. Para alterar o numero de resets permitidos é só remover ou adicionar as linhas.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...