Getting Started
Rules
Character Mover
Optimization Guide
EZ Wiki
EZ Guide
Magelo
Zone List
Spell Recipes
T10.5 Spell Recipes
Crafting Recipes
Donate
EZ Player Discord
EZ Server Files
EZ Client Downloads
Custom UF MiniMap
Custom UF Inventory
EQEmulator Home
Allakhazam Home
UFMissingFilesList
TwitchTV
if ($text=~/MY RANK/i) { $sth = $dbh->prepare("SELECT hp from leaderboard WHERE name = '$name'"); $sth->execute(); my $rankedHP = $sth->fetchrow_array(); $sth = $dbh->prepare("SELECT COUNT(hp) from leaderboard WHERE hp > $rankedHP"); $sth->execute(); my $ranked = int($sth->fetchrow_array()+1); $client->Message(315,"You are Ranked Number $ranked on HP!"); if ($ranked > 10) { $ranklist = int($ranked -10); } else { $ranklist = int(1); } @table = "<table><TR><TD>#<TD>$Yel NAME </c><TD>$grn HP </c><TD>$Blu MANA </c><TD>$Pink CLASS </c>/$orange Race </c><TD>$Red LEVEL </c><TD>AC<TD>$purp AA </c><TD>"; $sth = $dbh->prepare("SELECT name, hp, mana, class, level, armor, aa, race FROM leaderboard ORDER BY hp DESC LIMIT $ranklist,10"); $sth->execute(); $n = $ranklist; if ($n > 1) { $n = $n+1; } while (my ($pname, $php, $pmana, $pclass, $plevel, $pac, $paa, $prace) = $sth->fetchrow_array()) { my $php2 = plugin::commify($php); my $pmana2 = plugin::commify($pmana); my $pac2 = plugin::commify($pac); my $paa2 = plugin::commify($paa); push(@table, "<TR><TD>$n<TD>$Yel $pname </c><TD>$grn $php2 </c><TD>$Blu $pmana2 </c><TD>$Pink $pclass </c>/$orange $prace </c><TD>$Red $plevel </c><TD>$pac2<TD>$purp $paa2 </c><TD>"); $n++; } push(@table, "</table>"); quest::popup("Your Rank", "@table"); $sth->finish (); $dbh->disconnect(); }
if ($text=~/MY RANK/i) { $sth = $dbh->prepare("SELECT hp from leaderboard WHERE name = '$name'"); $sth->execute(); my $rankedHP = $sth->fetchrow_array(); $sth = $dbh->prepare("SELECT COUNT(hp) from leaderboard WHERE hp > $rankedHP"); $sth->execute(); my $ranked = int($sth->fetchrow_array()+1); $client->Message(315,"You are Ranked Number $ranked on HP!"); if ($ranked > 10) { $ranklist = int($ranked -10); } else { $ranklist = 0; } @table = "<table><TR><TD>#<TD>$Yel NAME </c><TD>$grn HP </c><TD>$Blu MANA </c><TD>$Pink CLASS </c>/$orange Race </c><TD>$Red LEVEL </c><TD>AC<TD>$purp AA </c><TD>"; $sth = $dbh->prepare("SELECT name, hp, mana, class, level, armor, aa, race FROM leaderboard ORDER BY hp DESC LIMIT $ranklist,10"); $sth->execute(); $n = $ranklist; #Set Rank to the Ranklist number if ($ranked > 10) { $n = $n+1; #If their rank is over 10 you must add 1 otherwise it won't be correct } if ($n == 0) { $n = 1; #If they are in the top 10 need this part } while (my ($pname, $php, $pmana, $pclass, $plevel, $pac, $paa, $prace) = $sth->fetchrow_array()) { my $php2 = plugin::commify($php); my $pmana2 = plugin::commify($pmana); my $pac2 = plugin::commify($pac); my $paa2 = plugin::commify($paa); push(@table, "<TR><TD>$n<TD>$Yel $pname </c><TD>$grn $php2 </c><TD>$Blu $pmana2 </c><TD>$Pink $pclass </c>/$orange $prace </c><TD>$Red $plevel </c><TD>$pac2<TD>$purp $paa2 </c><TD>"); $n++; } push(@table, "</table>"); quest::popup("Your Rank", "@table"); $sth->finish (); $dbh->disconnect(); }