Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($status >= 250)
- {
- if($text=~/^#hate$/i)
- {
- my $n = 1;
- my $CTarg = $client->GetTarget();
- my $CTarget = $CTarg->CastToNPC();
- my $Targ_Name = $CTarget->GetCleanName();
- my @hatelist = $CTarget->GetHateList();
- my @hatetable = "<table><TR><TD>#<TD>$Yel NAME </c><TD>$Red DMG </c><TD>$orange HATE </c><TD>";
- foreach $ent (@hatelist)
- {
- my $h_ent = $ent->GetEnt();
- my $h_dmg = $ent->GetDamage();
- my $h_hate = $ent->GetHate();
- my $h_dmg2 = plugin::commify($h_dmg);
- my $h_hate2 = plugin::commify($h_hate);
- if($h_ent && $n <= 15)
- {
- my $h_ent_name = $h_ent->GetName();
- push(@hatetable, "<TR><TD>$n<TD>$Yel $h_ent_name </c><TD>$Red $h_dmg2 </c><TD>$orange $h_hate2 </c><TD>");
- $n++;
- }
- }
- push(@hatetable, "</table>");
- quest::popup("$Targ_Name\'s Hatelist", "@hatetable");
- }
- if($text=~/^find/i)
- {
- use DBI;
- my $find_char = substr($text,5);
- $client->Message(315,"$find_char\'s Instances");
- $database = "peq";
- $host = "localhost";
- $username = "root";
- $password = "PASSWORDHERE";
- $dbh = DBI->connect("DBI:mysql:database=$database;host=$host", "$username", "$password", {RaiseError => 1});
- $sth = $dbh->prepare("SELECT id FROM character_ WHERE name = '$find_char'");
- $sth->execute();
- my $play_id = $sth->fetchrow_array();
- $sth->finish ();
- if($play_id > 0)
- {
- #$sth = $dbh->prepare("SELECT id FROM instance_lockout_player WHERE charid = '$play_id'");
- $sth = $dbh->prepare("SELECT instance_lockout_player.id, zone.short_name FROM instance_lockout_player INNER JOIN instance_lockout ON instance_lockout_player.id = instance_lockout.id INNER JOIN zone ON zone.zoneidnumber = instance_lockout.zone WHERE instance_lockout_player.charid = '$play_id'");
- $sth->execute();
- while (my ($each_id, $z_sn) = $sth->fetchrow_array())
- {
- my $saylink = quest::saylink("#zoneinstance $each_id",0, "Join");
- $client->Message(315,"$saylink -$find_char - ID $each_id - $z_sn");
- quest::AssignToInstance($each_id);
- $client->Message(315,"_");
- }
- $sth->finish ();
- $dbh->disconnect();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement