Large set of PHP Scripts to be used with DSP
Posted: Sun Dec 28, 2014 3:04 pm
Most of these are tinker scripts, things that I use to give myself an easily readable check on how the server is doing:
--------------------------
Firstly, mysql.php (I put this in a folder called secure, inside of my ffxi folder on my webserver
------------------------
Mob List (This gives you a LARGE read out of all mobs availible to be force spawned. Makes it super easy to search.. But should NOT be used on a weak ass server.. as it grabs all 65,200+ spawnable Monsters..... (I personally removed this from my web-server as I was worried it would kill the SQL server/webserver... if abused)
------------------------------
say.php -- While the php name doesn't imply this, this is a read out of the last 20 messages on the yell type, if you have chat logging on. VERY easy to adjust if you'd prefer LINKSHELL or something else.
----------------------------------
online.php -- Shows list of charactors and GM's online currently.
--------------------------------------
instances.php -- A script I made to find people "stuck" in instances that would log in and crash the server if they logged in and were still in the instance zone. (This was fixed with my @zone modification under "scripting" category)
------------------------
adoulin.php -- Same thing as instances, we were using this to monitor people getting stuck in Adoulin because of lack of having expansion installed and being curious about @zone command
----------------------
abyssea.php -- Same thing as above, but for Abyssea zones...
Images I use:
bnet.cc/ffxi/images/0.jpg --
bnet.cc/ffxi/images/1.jpg --
bnet.cc/ffxi/images/2.jpg --
bnet.cc/ffxi/images/GM-Icon.png --
--------------------------
Firstly, mysql.php (I put this in a folder called secure, inside of my ffxi folder on my webserver
Code: Select all
<?php
$sqlip = "ffxi.bnet.cc";
$sqluser = "SQLRemoteUserName";
$sqlpass = "SuperAwesomePasswordHere";
$sqldb = "dspdb";
?>
Mob List (This gives you a LARGE read out of all mobs availible to be force spawned. Makes it super easy to search.. But should NOT be used on a weak ass server.. as it grabs all 65,200+ spawnable Monsters..... (I personally removed this from my web-server as I was worried it would kill the SQL server/webserver... if abused)
Code: Select all
<?php
require("secure/mysql.php");
mysql_connect("$sqlip", "$sqluser", "$sqlpass") or die(mysql_error());
mysql_select_db("$sqldb") or die(mysql_error());
$count=0;
$query = "SELECT * FROM mob_spawn_points";
$result = mysql_query($query) or die(mysql_error());
// Print out the contents of each row into a table
while($row = mysql_fetch_array($result))
{
//var_dump($row);
$mobname = str_replace('_', ' ',$row['mobname']);
$mobid = $row['mobid'];
echo "**" . $mobname . " - " . $mobid . "";
echo "<br />";
$count=$count+1;
}
echo "<hr width=200><b>Total Mobs Databased:</b> " . $count;
?>
say.php -- While the php name doesn't imply this, this is a read out of the last 20 messages on the yell type, if you have chat logging on. VERY easy to adjust if you'd prefer LINKSHELL or something else.
Code: Select all
<?php
require("secure/mysql.php");
mysql_connect("$sqlip", "$sqluser", "$sqlpass") or die(mysql_error());
mysql_select_db("$sqldb") or die(mysql_error());
$querySay = "SELECT * FROM audit_chat WHERE type = 'YELL' order by lineid desc limit 20";
$resultSay = mysql_query($querySay) or die(mysql_error());
while($row = mysql_fetch_array($resultSay)){
echo "<b>" . $row['speaker']. "</b> : ". $row['message'];
echo "<br />";
}
?>
online.php -- Shows list of charactors and GM's online currently.
Code: Select all
<?php
require("secure/mysql.php");
mysql_connect("$sqlip", "$sqluser", "$sqlpass") or die(mysql_error());
mysql_select_db("$sqldb") or die(mysql_error());
$count=0;
$gmonline=0;
$query = "SELECT chars.charid, chars.charname, accounts_sessions.charid, zone_settings.zoneid, zone_settings.name, chars.pos_zone, chars.nation, chars.gmlevel FROM accounts_sessions, chars, zone_settings WHERE accounts_sessions.charid = chars.charid AND zone_settings.zoneid = chars.pos_zone";
$result = mysql_query($query) or die(mysql_error());
// Print out the contents of each row into a table
while($row = mysql_fetch_array($result))
{
If(($row['gmlevel']) > 0)
{
echo "<img src=images/" . $row['nation'] .".jpg> " . $row['charname'] . " <img src=images/GM-Icon.png><br><font color=#333333 size=1>" . str_replace('_', ' ',$row['name']);
echo "</font><br />";
$count=$count+1;
$gmonline=$gmonline+1;
}
else
{
echo "<img src=images/" . $row['nation'] .".jpg> " . $row['charname'] . "<br><font color=#333333 size=1>" . str_replace('_', ' ',$row['name']);
echo "</font><br />";
$count=$count+1;
}
}
echo "<hr width=200><b>Total Online:</b> " . $count . "<br><b>GMs Online</b> " . $gmonline;
?>
instances.php -- A script I made to find people "stuck" in instances that would log in and crash the server if they logged in and were still in the instance zone. (This was fixed with my @zone modification under "scripting" category)
Code: Select all
<?php
require("secure/mysql.php");
mysql_connect("$sqlip", "$sqluser", "$sqlpass") or die(mysql_error());
mysql_select_db("$sqldb") or die(mysql_error());
$query = "SELECT * FROM zone_settings WHERE zonetype = 6";
$query2 = "SELECT * FROM chars WHERE pos_zone IN (55,56,60,63,66,69,73,74,75,76,77,86,93,129,183,259,264,271)";
$result = mysql_query($query) or die(mysql_error());
$result2 = mysql_query($query2) or die(mysql_error());
echo "<b>Zones currently blocked (Instances ZoneType=6)<b><hr>";
while($row = mysql_fetch_array($result)){
echo "<b>" . $row['zoneid'] . " - " . $row['name'] . "</b><br />";
}
echo "<hr><b>Chars that need moved due to login/crash.</b><hr>";
while($row = mysql_fetch_array($result2)){
echo "<b>" . $row['pos_zone'] . " - " . $row['charname'] . " - CharID: " . $row['charid'] . " -- AccountID: " . $row['accid'] . "</b>";
echo " - <b><font color=blue>Command:<font color=red> @resetplayer " . $row['charname'] . "</font></font></b><br />";
}
?>
adoulin.php -- Same thing as instances, we were using this to monitor people getting stuck in Adoulin because of lack of having expansion installed and being curious about @zone command
Code: Select all
<?php
require("secure/mysql.php");
mysql_connect("$sqlip", "$sqluser", "$sqlpass") or die(mysql_error());
mysql_select_db("$sqldb") or die(mysql_error());
$query = "SELECT * FROM zone_settings WHERE zoneid IN (256,257,258,259,260,261,262,263,264,264,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285)";
$query2 = "SELECT * FROM chars WHERE pos_zone IN (256,257,258,259,260,261,262,263,264,264,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285)";
$result = mysql_query($query) or die(mysql_error());
$result2 = mysql_query($query2) or die(mysql_error());
echo "<b>Seekers of Adoulin Areas - The Ulbuka Continent<b><hr>";
while($row = mysql_fetch_array($result)){
echo "<b>" . $row['zoneid'] . " - " . $row['name'] . "</b><br />";
}
echo "<hr><b>Chars that need moved due to login/crash.</b><hr>";
while($row = mysql_fetch_array($result2)){
echo "<b>" . $row['pos_zone'] . " - " . $row['charname'] . " - CharID: " . $row['charid'] . " -- AccountID: " . $row['accid'] . "</b>";
echo " - <b><font color=blue>Command:<font color=red> @resetplayer " . $row['charname'] . "</font></font></b><br />";
}
?>
abyssea.php -- Same thing as above, but for Abyssea zones...
Code: Select all
<?php
require("secure/mysql.php");
mysql_connect("$sqlip", "$sqluser", "$sqlpass") or die(mysql_error());
mysql_select_db("$sqldb") or die(mysql_error());
$query = "SELECT * FROM zone_settings WHERE zoneid IN (15,45,132,215,216,217,218,253,254,255)";
$query2 = "SELECT * FROM chars WHERE pos_zone IN (15,45,132,215,216,217,218,253,254,255)";
$result = mysql_query($query) or die(mysql_error());
$result2 = mysql_query($query2) or die(mysql_error());
echo "<b>Abyssea Zones</b><hr>";
while($row = mysql_fetch_array($result)){
echo "<b>" . $row['zoneid'] . " - " . $row['name'] . "</b><br />";
}
echo "<hr><b>Players currently in, or logged out in Abyssea</b><hr>";
while($row = mysql_fetch_array($result2)){
echo "<b>" . $row['pos_zone'] . " - " . $row['charname'] . " - CharID: " . $row['charid'] . " -- AccountID: " . $row['accid'] . "</b>";
echo " - <b><font color=blue>Command:<font color=red> @resetplayer " . $row['charname'] . "</font></font></b><br />";
}
?>
bnet.cc/ffxi/images/0.jpg --
bnet.cc/ffxi/images/1.jpg --
bnet.cc/ffxi/images/2.jpg --
bnet.cc/ffxi/images/GM-Icon.png --