Help Files Online

Revenge of the Jedi has a very robust in-game help system assessed to through the help command. Here you can browse through our In-Game help files online using either a keyword search or searching for a specific topic alphabetically.


SEARCH TOPIC:

SHOW ALL FOR:


[insert_php]
/*
Name: Online Help Files
Author: Jeremy Pothast
For: www.rotjmud.com
*/

//–No direct access
define(“ALLOW_ACCESS”, true);
defined(“ALLOW_ACCESS”) or

die(“Access Denied”);

$conn = mysql_connect(‘localhost’, ‘rotjmud_webphp’, ‘Kant33na’);
mysql_select_db(‘rotjmud_web’, $conn);

[/insert_php]

[insert_php]
$url_link = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”;
$data = parse_url($url_link);
$parameters = $data[‘query’];

if ($parameters != “”) {
$findme = “&”;
$andPos = stripos($parameters,$findme);

if ($andPos > 0) {
$searchTerm = substr($parameters,7,$andPos-7);
if (substr($parameters,$andPos+1,6) == “Letter”) {
$letter = substr($parameters,$andPos+8);
}
else {
$letter = “”;
}
}
else {
$searchTerm = substr($parameters,7);
$letter = “”;
}
$searchTerm = str_replace(“+”,” “,$searchTerm);
$searchTerm = str_replace(“%20″,” “,$searchTerm);
}
else {
$searchTerm = “”;
$letter = “”;
}

if ($searchTerm != “”) {
if ($andPos > 0)
$result = mysql_query(“SELECT help_name, help_text, help_links FROM rotj_help WHERE help_keywords like(‘%” . $searchTerm . “%’) ORDER BY help_name”,$conn);
else
$result = mysql_query(“SELECT help_name, help_text, help_links FROM rotj_help WHERE help_keywords =’” . $searchTerm . “‘ ORDER BY help_name”,$conn);

$num_rows = mysql_num_rows($result);
}
else if ($letter != “”) {
$result = mysql_query(“SELECT help_name, help_text, help_links FROM rotj_help WHERE help_name like(‘” . $letter. “%’) ORDER BY help_name”,$conn);
$num_rows = mysql_num_rows($result);
}
else {
$num_rows = 0;
}

echo “\n”;
echo ‘

‘;
if($num_rows > 0) {
if ($num_rows > 1) {
while($row = mysql_fetch_array($result))
{
$print_name = “” . $row[‘help_name’] . ““;
echo $print_name;
echo “\n”;
}
}
else {
$row = mysql_fetch_array($result);
echo “

” . $row[‘help_name’] . “

“;
echo $row[‘help_text’];
if ($row[‘help_links’] != “”) {
echo “\n”;
$comma = “,”;
$pos1 = stripos($row[‘help_links’],$comma);
if ($pos1 > 0) {
$link1 = substr($row[‘help_links’],0,$pos1);
$pos2 = stripos(substr($row[‘help_links’],$pos1+1),$comma);
if ($pos2 > 0) {
$link2 = trim(substr($row[‘help_links’],$pos1+1,$pos2));
$pos3 = stripos(substr($row[‘help_links’],$pos1+$pos2+2),$comma);

if ($pos3 > 0) {
echo “See Also: ” . $row[‘help_links’];
}
else {
echo “See Also: ” . $link1 . “” . “, ” . “” . $link2 . “” . “, ” . “” . substr($row[‘help_links’],$pos1+$pos2+2) . ““;
}
}
else {
echo “See Also: ” . $link1 . “” . “, ” . “” . substr($row[‘help_links’],$pos1+1) . ““;
}
}
else {
echo “See Also: ” . $row[‘help_links’] . ““;
}
}
}
}
else {
if ($searchTerm != “”) {
echo “No help topics for the term ‘” . $searchTerm . “‘. Try looking alphabetically.”;
}
else if ($letter != “”) {
echo “There are no help topics under the letter ‘” . $letter . “‘.”;
}
}
echo ‘

‘;
mysql_close($conn);
[/insert_php]

1 comment

  1. Avatar
    Amy September 11, 2019 9:40 am  Reply

    I may be doing something wrong but have not been able to connect via a MUD client I use in Windows. It fluttered in and out intermittently over the last few days and didn’t work at all for about two. My Internet is up and running with no issues. I have saved the connection file in my client, and I can definitely say that using it worked, even during the days when the ability to connect fluctuated. I haven’t changed any part of it. Have connection details changed, and where might I find them to verify I didn’t make any type-o’s? Thanks so much.

Leave a comment

Your email address will not be published. Required fields are marked *