-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 2 respostas
- 133 visualizações
-
- 2 respostas
- 726 visualizações
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 495 visualizações
-
- 0 respostas
- 1191 visualizações
-
Pergunta
KennyConrad 5
Galera queria um rank de reset pro meu site gesior uso esse sistema de resets e queria um rank de resets pro meu site veja a imagem abaixo de como quero que seja o rank reset.
--[[ <(Advanced Reset System 2.0)>
Autor: MarcelloMkez. Contato: (marcello_dirt@hotmail.com)
Versão: 2.0
Testado em: 8.50 e 8.60
TFS: 0.3.6 and 0.4.0
Fórum: http://www.xtibia.co...eset-system-20/
-=[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.]
-- storage = 1020, [storage.]
--=[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 = true, -- 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 = 3, -- 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= 330, free= 350},
stage2= {resets= 9, premmy= 340, free= 355}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}])
stage3= {resets= 14, premmy= 355, free= 360}, -- resets = Número de resets para o Stage;
stage4= {resets= 19, premmy= 360, free= 365}, -- premmy = Level necessário para Premium Accounts;
stage5= {resets= 24, premmy= 370, free= 380}, -- free = Level necessário para Free Accounts;
stage6= {resets= 29, premmy= 380, free= 390}, -- Coloque em Ordem...
stage7= {resets= 34, premmy= 400, free= 410}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES]
stage8= {resets= 39, premmy= 420, free= 430}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x}
stage9= {resets= 44, premmy= 440, free= 450},
stage10={resets= 49, premmy= 470, free= 480},
stage11= {resets= 54, premmy= 500, free= 510},
stage12= {resets= 59, premmy= 540, free= 550},
stage13= {resets= 64, premmy= 580, free= 590},
stage14= {resets= 69, premmy= 620, free= 630},
stage15= {resets= 74, premmy= 670, free= 680},
stage16= {resets= 79, premmy= 720, free= 730},
stage17= {resets= 84, premmy= 770, free= 780},
stage18= {resets= 89, premmy= 840, free= 860},
stage19= {resets= 94, premmy= 910, free= 930},
stage20= {resets= 95, premmy= 990, free= 1010},
}
--[[>> 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()
addEvent(newReset, 1, 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: MarcelloMkez]=--
esse aki e o meu highscores
<?PHP
$list = $_REQUEST['list'];
$page = $_REQUEST['page'];
switch($list)
{
case "fist":
$id = 0;
$list_name = 'Fist Fighting';
break;
case "club":
$id = 1;
$list_name = 'Club Fighting';
break;
case "sword":
$id = 2;
$list_name = 'Sword Fighting';
break;
case "axe":
$id = 3;
$list_name = 'Axe Fighting';
break;
case "distance":
$id = 4;
$list_name = 'Distance Fighting';
break;
case "shield":
$id = 5;
$list_name = 'Shielding';
break;
case "fishing":
$id = 6;
$list_name = 'Fishing';
break;
}
if(!isset($id))
if($list == "magic")
$list_name = "Magic Level";
else
{
$list_name = 'Experience';
$list = 'experience';
}
if(count($config['site']['worlds']) > 1)
{
$worlds .= '<i>Select world:</i> ';
foreach($config['site']['worlds'] as $idd => $world_n)
{
if($idd == (int) $_GET['world'])
{
$world_id = $idd;
$world_name = $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;
if(isset($id))
$skills = $SQL->query('SELECT name,online,value,level,vocation,promotion 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.' ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset);
elseif($list == "magic")
$skills = $SQL->query('SELECT name,online,maglevel,level,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY maglevel DESC, manaspent DESC LIMIT 101 OFFSET '.$offset);
elseif($list == "experience")
$skills = $SQL->query('SELECT name,online,level,experience,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY level DESC, experience DESC LIMIT 101 OFFSET '.$offset);
//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>';
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD></TD><TD>
<FORM ACTION="?subtopic=highscores" 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><br><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%></TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=whites><B>Country</B></TD><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD>';
if($list == "experience")
$main_content .= '<TD CLASS=whites><b><center>Points</center></B></TD>';
$main_content .= '</TR><TR>';
foreach($skills as $skill)
{
$player = $ots->createObject('Player');
$player->find($skill['name']);
$account = $player->getAccount();
$account_db = new OTS_Account();
$flagg = $account->getCustomField("flag");
if($number_of_rows < 100)
{
if($list == "magic")
$skill['value'] = $skill['maglevel'];
if($list == "experience")
$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.'"><td><image src="images/flags/'.$flagg.'.png"/></td><td>'.($offset + $number_of_rows).'.</td><td><a href="?subtopic=characters&name='.urlencode($skill['name']).'">'.($skill['online']>0 ? "<font color=\"green\">".$skill['name']."</font>" : "<font color=\"red\">".$skill['name']."</font>").'</a><br><small>'.$skill['level'].' '.$vocation_name[$world_id][$skill['promotion']][$skill['vocation']].'</small></td><td><center>'.$skill['value'].'</center></td>';
if($list == "experience")
$main_content .= '<td><center>'.$skill['experience'].'</center></td>';
$main_content .= '</tr>';
}
else
$show_link_to_next_page = TRUE;
}
$main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>';
if($page > 0)
$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';
if($show_link_to_next_page)
$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';
$main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=whites><B>Choose<br/>a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD><A HREF="?subtopic=highscores&list=experience&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/level.png" style="border: none;"></A><BR><A HREF="?subtopic=highscores&list=magic&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/ml.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=shield&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/def.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=distance&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/dist.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=club&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/club.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=sword&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/sword.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=axe&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/axe.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=fist&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/fist.png" style="border: none;"/></A><BR><A HREF="?subtopic=highscores&list=fishing&world='.$world_id.'" CLASS="size_xs"><img src="images/skills/fish.png" style="border: none;"/></A><BR></TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
?>
e esse e o rank de talkactions que uso no servidor talvez de pra pegar algum exemplo dele e fazer pro site
function getPlayerNameByGUID2(n)
local c = db.getResult("SELECT `name` FROM `players` WHERE `id` = "..n..";")
if c:getID() == -1 then
return "SQL_ERROR["..n.."]"
end
return c:getDataString("name")
end
function onSay(cid, words, param)
local max = 20
local letters_to_next = 20
local skills = {
['fist'] = 0,
['club'] = 1,
['sword'] = 2,
['axe'] = 3,
['distance'] = 4,
['shielding'] = 5,
['fishing'] = 6,
['dist'] = 4,
['shield'] = 5,
['fish'] = 6,
}
local name_now
local name = "Ranking\n"
local rkn = 0
local no_break = 0
param = string.lower(param)
dofile('config.lua')
if param == "" or param == "level" and ( param ~= "magic" and param == "ml") and skills[param] == nil then
name = name.."\n"
name = name.."Rank Level - Nome do Jogador\n"
local v = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` <= 2 ORDER BY `experience` DESC LIMIT 0,"..(max)..";")
repeat
no_break = no_break +1
if v:getID() == -1 then
break
end
rkn = rkn+1
name_now, l = v:getDataString("name"), string.len(v:getDataString("name"))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
name = name..rkn..". "..v:getDataInt("level") .." - "..name_now..space.." ".."\n"
if no_break >= 20 then
break
end
until v:next() == false
elseif param == "magic" or param == "ml" then
name = name.."\n"
name = name.."Rank Magic - Nome do Jogador\n"
local v = db.getResult("SELECT `name`, `level`, `maglevel` FROM `players` WHERE `group_id` <= 2 ORDER BY `maglevel` DESC LIMIT 0,"..(max)..";")
repeat
if v:getID() == -1 then
break
end
rkn = rkn+1
name_now, l = v:getDataString("name"), string.len(v:getDataString("name"))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
name = name..rkn..". "..v:getDataInt("maglevel").." - "..name_now..space.." ".." ".."".."\n"
until v:next() == false
elseif param == "reset" or param == "resets" then
name = name.."\n"
name = name.."Rank Reset - Nome do Jogador\n"
local v = db.getResult("SELECT `id`, `reset` FROM `players` ORDER BY reset DESC;")
local kk = 0
repeat
if kk == max or v:getID() == -1 then
break
end
kk = kk+1
name_now, l = getPlayerNameByGUID2(v:getDataInt("id")), string.len(getPlayerNameByGUID2(v:getDataInt("id")))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
if name_now == nil then
name_now = 'sql error['..v:getDataInt("id")..']'
end
name = name..kk..". "..v:getDataInt("reset").." - "..name_now..space.." \n"
until v:next() == false
elseif skills[param] ~= nil then
name = name.."\n"
name = name.."Rank "..param.." fighting - Nome do Jogador\n"
local v = db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..skills[param].." ORDER BY `value` DESC;")
local kk = 0
repeat
if kk == max or v:getID() == -1 then
break
end
kk = kk+1
name_now, l = getPlayerNameByGUID2(v:getDataInt("player_id")), string.len(getPlayerNameByGUID2(v:getDataInt("player_id")))
space = ""
for i=1, letters_to_next-l do
space = space.." "
end
if name_now == nil then
name_now = 'sql error['..v:getDataInt("player_id")..']'
end
name = name..kk..". "..v:getDataInt("value").." - "..name_now..space.." \n"
until v:next() == false
end
if name ~= "Highscore\n" then
doPlayerPopupFYI(cid, name)
end
return TRUE
end
Link para o comentário
Compartilhar em outros sites
7 respostass a esta questão
Posts Recomendados