commit 21e46903388b5bc2bba51876211632d6b033f37e Author: deepend Date: Sat Sep 30 07:13:16 2023 -0600 first commit diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..1bf90fc --- /dev/null +++ b/.htaccess @@ -0,0 +1,8 @@ + + +# php -- BEGIN cPanel-generated handler, do not edit +# Set the “ea-php81” package as the default “PHP” programming language. + + #AddHandler application/x-httpd-ea-php81 .php .php8 .phtml + +# php -- END cPanel-generated handler, do not edit diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..570b698 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,108 @@ +This is the ChangeLog for the Idle RPG Website Code. I'm not as religious about +making sure my updates make it here as I am about changes to the IRPG code +making it into that ChangeLog, so there may be changes between versions that you +don't see listed here. + +Also, please note that any use of "incowrect" or other cow-related "typos" are +NOT typos. I like cattle. A lot. Please stop fixing them :^) + +2004-07-17 Jon Honeycutt + * huge modification of the entire source by the original coder, res0 + . res0 has really helped this project through his many + contributions; it wouldn't be where it is today without him. thanks, res0! + * New site layout (valid XHTML 1.1 strict) using CSS + * Cleaned up PHP + * User maps do not display unless visitor clicks 'display' link + * changed fgets() calls to add the optional second parameter (for old PHPs) + * removed incorrect header() in makequestmap() (mikegrb) + * checked to make sure key $_SESSION['time'] was set before attempting to + reference it (HarK0nNeN) + * db.php's table tag now specifies the number of rows and columns to make + drawing faster in browsers that pay attention to it (res0) + * header("Location: ") directives now give full URIs + * made better use of htmlentities() and urlencode()s as relates to display + of usernames and classes + * users on quest and world maps are now clickable, leading to their player + info page (John Nielsen) + +2004-05-31 Jon Honeycutt + * changed players.php to show offline users as gray, this style is in + header.php, patch from Chewie + * changed map-drawing PHP scripts to draw a transparent image which is then + overlayed (using CSS) over the static newmap.png image. changed the map + drawing frequency to 1/user/20s as I think this greatly decreases CPU + usage. changed the maperror.png to something more appropriate. $mapx + and $mapy in config.php describe the dimensions of your map file (Rick) + * fixed quest.php to show proper coordinates; another evil c/p error (Rick) + +2004-05-23 Jon Honeycutt + * changed most everything to make sense with the new database + * edited dump.php to display data in the same format, despite the new + database format. + * added an xml.php page that takes a 'player' argument and displays + information on that user in xml 1.0 format. should allow a better API + as far as compatibility with newer dbs goes + * changed playerview.php to use fgets() to read from modifiers.txt. + hopefully this is much faster + * edited playerview.php to show map and XML data link + * changed the counter in footer.php to strip the leading path information + from $_SERVER['PHP_SELF'] before using it to identify the page + * removed some unused $i variable from players.php + * created quest.php which shows active quest info + * created makequestmap.php which draws a quest map if quest type is 2, + redirects otherwise + * created worldmap.php which shows the active state of the irpg world + * created makeworldmap.php which draws the world map + * created makemap.php which takes a 'player' argument and draws them on the + map + * commonfunctions.php now has functions to sort by isadmin flag and player + alignment + * index.php updated with information on the new game features + * changed titles on several pages to use $irpg_chan instead of hard-coded + #G7 + * updated header.php to link to new pages and idlerpg.net forum + * changed 'time modifiers' to 'character modifiers' as item modifiers are + now stored, also + +2004-05-23 Alexander Hirzel + * submitted a series of patches to correct, among other things, the horrible + use of where was more appropriate + +2004-04-22 Jon Honeycutt + * if $_GET['alltime'] wasn't set, < and > in time modifiers were not + translated to < and > (thanks DinTx) + * attempted to fix playerview.php from showing others' stats, traded + stristr() for strstr() matching either "^name ", " name ", or "^name's " + +2004-04-23 Jonathan Attwell + * created README, detailing how users are to install and what to edit. + * created config.php, which holds all the setup variables. + * cleaned up some of the php coding. + +2004-04-15 Jon Honeycutt + * we now stripslashes() on $_GET['player'] for players.php, + playerview.php, dump.php (thanks Diab) + +2004-04-05 Jon Honeycutt + * removed some of parallax's tabs :^) + * edited players.php to forward requests for specific players to the proper + playerview.php + * changed links in sitesource.php to be fully-qualified + * removed preg_grep in playerview.php, which insecurely used tainted + data. switched to stristr. (thanks mike@ethernal.org) + * stripped < and > from modifiers.txt output (thanks mike@ethernal.org) + * changed link to idlerpg-adv.txt in players.php to be fully-qualified. + (thanks daxxar) + * may've made other changes, not sure. + +2004-02-15 Jon Honeycutt + * edited source.php to provide fully-qualified URLs to source files; + easier for users to follow license. + * playerview.php's 'View all Time Modifiers' link now displays the + number of time modifiers. + * contact.php now sends a From: field in its headers parameter. + +2004-01-31 Titus Barik + * created ChangeLog, following Debian ChangeLog format. + * modified header.php to be location independent via $BASE_URL var. + * players.php and playerview.php are now separate files. diff --git a/README b/README new file mode 100644 index 0000000..ff5b259 --- /dev/null +++ b/README @@ -0,0 +1,42 @@ +------------------------------------------ +IRPG Website Code README v1.1 (2004-06-27) +------------------------------------------ + +----------- + Notes +----------- + +Homepage: http://idlerpg.net +License : Public Domain + +----------- + Versions +----------- + +Site: v0.5 [current/changes courtesy of res0], Released July 17th, 2004. +Bot : v3.1.2 [current], Released June 6th, 2004. + +------------ +Installation +------------ + +1. Make sure you have the bot functional and running. +2. Copy all the files here to your public_html or some folder. +3. Edit config.php with your favorite editor. +4. chmod 644 * && chmod 666 hits.db +5. If you change the default settings in the IRPG bot (for example, if you turn + off the option to write quest info to file, you'll have to manually edit + some scripts to take this into account. If you disable the INFO command, + you might want to remove it from the index.php page. +6. Some code in this package requires that your system have GD 2.0+ (or have it + enabled in your php.ini, on Win32). If you don't want this functionality to + be available, edit the script playerview.php to remove the use of the map + and header.php to remove the links to the world map and the quest info page. + You can also delete the worldmap.php, makeworldmap.php, makemap.php, + quest.php, and makequestmap.php scripts. +7. Edit the website ANY WAY you see fit. You don't have to keep all of the links + to me, I just thought they might be useful or interesting to users :^) +8. The best way to receive support for these scripts is to post to the Help + section of the forum, http://idlerpg.net/forum.php, not via e-mail or IRC. + If you notice a bug, however, you may use any method to contact me. + Thanks :^) diff --git a/admincomms.txt b/admincomms.txt new file mode 100644 index 0000000..1f9e5f2 --- /dev/null +++ b/admincomms.txt @@ -0,0 +1,65 @@ +This is not the full list of commands for the Idle RPG bot, but only the list +of admin commands. For more information on the Idle RPG bot, visit +http://idlerpg.net/ + +INFO, retrieve some fairly useless stats about the bot. + +DIE, kills the bot. + +HOG, summon the Hand of God spell. See the main help file. + +RESTART, restarts the bot. + +CHPASS , change a character's pass in the IRPG. + +CHCLASS , change a character's class in the IRPG. + +CHUSER , change a character's username in the IRPG. + Please only use in very special circumstances; otherwise, have them form + a new player and DEL the old one. This should not let you overwrite an + existing account, but is untested. + +PUSH , push a player toward his goal by subtracting time + from his next time to level. Please use this only if bot has mistakenly + penalized someone. You could also use this to punish a user by setting + the number of seconds to a negative number. Don't do that. + +DEL , remove a user's account. + +JUMP , move the bot to another server. + +SILENT , switch bot between 4 modes of silence. + - mode 0, bot sends all privmsgs. + - mode 1, only chanmsg() is disabled. + - mode 2, only privmsg()/notice() to non-channels is disabled. + - mode 3, privmsgs/notices to users and channels are disabled. + +BACKUP, tell bot to copy $opts{'dbfile'} to .dbbackup/$opts{'dbfile'}TIMESTAMP + +RELOADDB, force bot to reload player database file, rewriting all memory. + RELOADDB can only be used while in pause mode. + +PAUSE, toggle pause mode. + +PEVAL , execute arbitrary argument as Perl code. Queues output > 3 lines + or >1k of text. Some useful PEVAL commands: + - Delete all accounts not logged in in 4 weeks (See also: DELOLD): + /msg bot PEVAL delete $rps{$_} for grep { time()-$rps{$_}{lastlogin} > 3600*24*7*4 && !$rps{$_}{online} } keys %rps; + - Remove one hour from everyone's clocks: + /msg bot PEVAL $rps{$_}{next} -= 3600 for keys %rps; + - List all online users, separated by commas: + /msg bot PEVAL join(', ',grep { $rps{$_}{online} } keys %rps); + - View contents of a file on remote host: + /msg bot peval `cat file` + - Turn on debug mode: + /msg bot peval $opts{debug}=1; + - Force write-out of database: + /msg bot peval writedb(); + +DELOLD , remove all non-logged-in accounts inactive in the last + days. + +CLEARQ, clear the outgoing message queue. Useful to use if someone floods the + bot with a lot of text that it plans to respond to. + +MKADMIN , set the isadmin flag for a given username. diff --git a/commonfunctions.php b/commonfunctions.php new file mode 100644 index 0000000..13a72fe --- /dev/null +++ b/commonfunctions.php @@ -0,0 +1,94 @@ + $level2) ? -1 : 1; + } + function cmp_alignment_asc($a,$b) { return cmp_alignment_desc($b,$a); } + function cmp_alignment_desc($a,$b) { + list(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,$a1)=explode("\t",trim($a)); + list(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,$a2)=explode("\t",trim($b)); + if ($a1 == "g" || $a2 == "e") return -1; + if ($a1 == "e" || $a2 == "g") return 1; + return 0; + } + function cmp_isadmin_asc($a,$b) { return cmp_isadmin_desc($b,$a); } + function cmp_isadmin_desc($a,$b) { + list(,,$o1)=explode("\t",trim($a)); + list(,,$o2)=explode("\t",trim($b)); + return ($o1 > $o2) ? -1 : 1; + } + function cmp_ttl_asc($a,$b) { return cmp_ttl_desc($b,$a); } + function cmp_ttl_desc($a,$b) { + list(,,,,,$time1)=explode("\t",trim($a)); + list(,,,,,$time2)=explode("\t",trim($b)); + return ($time2 < $time1) ? -1 : 1; + } + function cmp_user_asc($a,$b) { return cmp_user_desc($b,$a); } + function cmp_user_desc($a,$b) { + list($u1)=explode("\t",trim($a)); + list($u2)=explode("\t",trim($b)); + return (strtolower($u1) > strtolower($u2)) ? -1 : 1; + } + function cmp_online_asc($a,$b) { return cmp_online_desc($b,$a); } + function cmp_online_desc($a,$b) { + list(,,,,,,,,$o1)=explode("\t",trim($a)); + list(,,,,,,,,$o2)=explode("\t",trim($b)); + return ($o1 > $o2) ? -1 : 1; + } + function cmp_idled_asc($a,$b) { return cmp_idled_desc($b,$a); } + function cmp_idled_desc($a,$b) { + list(,,,,,,,,,$i1)=explode("\t",trim($a)); + list(,,,,,,,,,$i2)=explode("\t",trim($b)); + return ($i1 > $i2) ? -1 : 1; + } + function cmp_created_asc($a,$b) { return cmp_created_desc($b,$a); } + function cmp_created_desc($a,$b) { + list(,,,,,,,,,,,,,,,,,,,$i1)=explode("\t",trim($a)); + list(,,,,,,,,,,,,,,,,,,,$i2)=explode("\t",trim($b)); + return ($i1 > $i2) ? -1 : 1; + } + function cmp_lastlogin_asc($a,$b) { return cmp_lastlogin_desc($b,$a); } + function cmp_lastlogin_desc($a,$b) { + list(,,,,,,,,,,,,,,,,,,,,$i1)=explode("\t",trim($a)); + list(,,,,,,,,,,,,,,,,,,,,$i2)=explode("\t",trim($b)); + return ($i1 > $i2) ? -1 : 1; + } + function cmp_uhost_asc($a,$b) { return cmp_uhost_desc($b,$a); } + function cmp_uhost_desc($a,$b) { + list(,,,,,,,$u1)=explode("\t",trim($a)); + list(,,,,,,,$u2)=explode("\t",trim($b)); + return (strtolower($u1) > strtolower($u2)) ? -1 : 1; + } + function cmp_pen_asc($a,$b) { return cmp_pen_desc($b,$a); } + function cmp_pen_desc($a,$b) { + list(,,,,,,,,,,,,$p1[0],$p1[1],$p1[2],$p1[3],$p1[4],$p1[5], + $p1[6])=explode("\t",trim($a)); + list(,,,,,,,,,,,,$p2[0],$p2[1],$p2[2],$p2[3],$p2[4],$p2[5], + $p2[6])=explode("\t",trim($b)); + $s1 = $s2 = 0; + foreach ($p1 as $pen) $s1 += $pen; + foreach ($p2 as $pen) $s2 += $pen; + return ($s1 > $s2) ? -1 : 1; + } + function cmp_sum_asc($a,$b) { return cmp_sum_desc($b,$a); } + function cmp_sum_desc($a,$b) { + list(,,,,,,,,,,,,,,,,,,,,,$i1[0],$i1[1],$i1[2],$i1[3],$i1[4],$i1[5], + $i1[6],$i1[7],$i1[8],$i1[9])=explode("\t",trim($a)); + list(,,,,,,,,,,,,,,,,,,,,,$i2[0],$i2[1],$i2[2],$i2[3],$i2[4],$i2[5], + $i2[6],$i2[7],$i2[8],$i2[9])=explode("\t",trim($b)); + $s1 = $s2 = 0; + foreach ($i1 as $item) { $s1 += $item; } + foreach ($i2 as $item) $s2 += $item; + return ($s1 > $s2) ? -1 : 1; + } +?> diff --git a/config.php b/config.php new file mode 100644 index 0000000..e592a14 --- /dev/null +++ b/config.php @@ -0,0 +1,39 @@ + diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..bc29914 --- /dev/null +++ b/contact.php @@ -0,0 +1,47 @@ +Contact"; + if ($_POST['from'] && $_POST['text']) { + mail($admin_email,"IRPG: ".$_POST['from'], + "Name: ".$_POST['name']."\nE-mail: ".$_POST['from']."\n\n". + $_POST['text'],"From: ".$_POST['from']."\r\n"); + echo('
Thanks for your submission.
'); + } + else { + echo(' +
+ + + + + + + + + + + + + + + +
: + +
: + +
+
+
+ +
+
+'); + } + include("footer.php"); +?> diff --git a/db.php b/db.php new file mode 100644 index 0000000..78ba930 --- /dev/null +++ b/db.php @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +",">",$class); + $user = str_replace(">",">",$user); + $sum = 0; + foreach ($item as $k => $v) $sum += $v; + $pentot = 0; + foreach ($pen as $k => $v) $pentot += $v; + echo " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n". + " \n"; + } + + echo(' +
+ User + ( + + + / + + + ) + + Level + ( + + + / + + + ) + + Admin + ( + + + / + + + ) + Class + TTL + ( + + + / + + + ) + + Nick!User@Host + ( + + + / + + + ) + + Online + ( + + + / + + + ) + + Total Time Idled + ( + + + / + + + ) + X PosY PosMesg Pen.Nick Pen.Part Pen.Kick Pen.Quit Pen.Quest Pen.LOGOUT Pen. + Total Pen. + ( + + + / + + + ) + + Acct. Created + ( + + + / + + + ) + + Last Login + ( + + + / + + + ) + AmuletCharmHelmBootsGlovesRingLeggingsShieldTunicWeapon + Sum + ( + + + / + + + ) + + Alignment + ( + + + / + + + ) +
$user$level".($isadmin?"Yes":"No")."$class".duration($secs)."$uhost".(($online == 1) ? "Yes" : "No")."".duration($idled)."$x$y".duration($pen['mesg'])."".duration($pen['nick'])."".duration($pen['part'])."".duration($pen['kick'])."".duration($pen['quit'])."".duration($pen['quest'])."".duration($pen['logout'])."".duration($pentot)."".date("D M j H:i:s Y",$created)."".date("D M j H:i:s Y",$lastlogin)."".$item['amulet']."".$item['charm']."".$item['helm']."".$item['boots']."".$item['gloves']."".$item['ring']."".$item['leggings']."".$item['shield']."".$item['tunic']."".$item['weapon']."$sum".($alignment=='e'?"Evil":($alignment=='n'?"Neutral":"Good"))."
+

+ * Accounts created before Aug 29, 2003 may have incowrect data fields. + '); + include("footer.php"); +?> diff --git a/down.png b/down.png new file mode 100644 index 0000000..e1a249d Binary files /dev/null and b/down.png differ diff --git a/dump.php b/dump.php new file mode 100644 index 0000000..2f29898 --- /dev/null +++ b/dump.php @@ -0,0 +1,118 @@ + diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..ae35d24 --- /dev/null +++ b/footer.php @@ -0,0 +1,35 @@ + + + + \ No newline at end of file diff --git a/g7.css b/g7.css new file mode 100644 index 0000000..8dc6836 --- /dev/null +++ b/g7.css @@ -0,0 +1,111 @@ +body { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + background-color: #FFFFF0; + color: black; + margin: 10px; + text-align: justify; +} + +h1 { margin-bottom: 0px; margin-top: 0px; } +h2 { margin-bottom: 0px; } + +p.small { margin: 0px; font-size: smaller; } + +a { text-decoration: none; color: #C69500; } +a:hover { text-decoration: underline; color: black; } + +div.head { + border: 1px solid #c0c0c0; + text-align: left; + width: 100%; + margin-bottom: 10px; + background: #FFFFFF; +} + +div.menu { + width: 120px; + position: relative; + float: left; + border: 1px solid #c0c0c0; + background: #FFFFFF; +} +div#menu a.home { color: #000000; background: #c0c0c0; border: 1px solid #000000; } +div#menu a.home:hover { background: #c0c0c0; border: 1px solid #000000; } +div#menu a { + text-align: center; + width: 118px; + margin: 0px; + display: block; + border: 1px solid #FFFFFF +} + +div#menu a:hover { border: 1px solid #000000; background: #c0c0c0; text-decoration: none; } + +div.content { + border: 1px solid #c0c0c0; + margin-left: 130px; + margin-top: 0px; + padding: 10px; + background: #FFFFFF; +} + +div.footer { + border: 1px solid #c0c0c0; + margin-left: 130px; + margin-top: 10px; + padding: 10px; + background: #FFFFFF; +} + + +table.uniques { + border: 1px solid #c0c0c0; + padding: 5px; + text-align: left; +} +table.uniques td { + padding-left: 10px; +} + +table.penalty { + border: 1px solid #c0c0c0; + padding: 5px; + text-align: left; +} +table.penalty th { + text-align: right; +} +table.penalty td { + +} + +/* Styles for the userlist */ +li.online { font-weight: bold; } +li.offline { color: #c0c0c0; } +a.offline { color: #707070; } +#map { + width: 500px; + height: 500px; + background-image: url(newmap.png); +} + + +table.forum { + border: 1px solid #c0c0c0; + table-layout: fixed; + overflow: auto; +} + +table.forum td,tr,caption,thead,tfoot,th { + padding-left: 10px; + padding-right: 10px; +} +.tdblue { background-color: #ffffdf; } +.tdgray { background-color: #eeeee0; } +.tdred { + border: 1px solid red; + background-color: #FFCCCC; +} +.smallest { + font-size: 11px; +} diff --git a/head.png b/head.png new file mode 100644 index 0000000..5d6a7c3 Binary files /dev/null and b/head.png differ diff --git a/header.php b/header.php new file mode 100644 index 0000000..dd227e0 --- /dev/null +++ b/header.php @@ -0,0 +1,21 @@ + + + + <?php echo $irpg_chan; ?> Idle RPG: <?php echo $irpg_page_title; ?> + + + + +
+ <?php echo $irpg_chan; ?> Idle RPG +
+ + +
diff --git a/help.php b/help.php new file mode 100644 index 0000000..29973a9 --- /dev/null +++ b/help.php @@ -0,0 +1,476 @@ + + +
+

Location

+

+ The Idle RPG can be played on the + Newnet IRC Network in the + channel #idleland. See this + link for a list of servers. +

+ + +

Registering

+ +

To register, simply:

+ + + /msg REGISTER <char name> <password> + <char class> + + +

Where 'char name' can be up to 16 chars long, 'password' can be up + to 8 characters, and 'char class' can be up to 30 chars.

+ + +

Logging In

+ +

To login, simply:

+ + + /msg LOGIN <char name> <password> + + +

This is a p0 (see Penalties) command.

+ + +

Logging Out

+ +

To logout, simply:

+ + + /msg LOGOUT + + +

This is a p20 (see Penalties) command.

+ + +

Changing Your Password

+ +

To change your password, simply:

+ + + /msg NEWPASS <new password> + + +

This is a p0 (see Penalties) command.

+

If you have forgotten your password, please use the + INFO command to find an online admin to help you. If your + administrator does not have the INFO command enabled, then just message + an op in the channel. They can probably help you.

+ + +

Removing Your Account

+ +

To remove your account, simply:

+ + + /msg REMOVEME + + +

This is a p0 (see Penalties) command :^)

+ + +

Changing Your Alignment

+ +

To change your alignment, simply:

+ + + /msg ALIGN <good|neutral|evil> + + +

This is a p0 (see Penalties) command.

+

Your alignment can affect certain aspects of the game. You may align + with good, neutral, or evil. 'Good' users have a 10% boost to their item + sum for battles, and a 1/12 chance each day that they, along with a + 'good' friend, will have the light of their god shine upon them, + accelerating them 5-12% toward their next level. 'Evil' users have a 10% + detriment to their item sum for battles (ever forsaken in their time of + most need...), but have a 1/8 chance each day that they will either a) + attempt to steal an item from a 'good' user (whom they cannot help but + hate) or b) be forsaken (for 1-5% of their TTL) by their evil god. After + all, we all know that crime doesn't pay. Also, 'good' users have only a + 1/50 chance of landing a Critical Strike when + battling, while 'evil' users (who always fight dirty) have a 1/20 + chance. Neutral users haven't had anything changed, and all users start + off as neutral.

+

I haven't run the numbers to see which alignment it is better to + follow, so the stats for this feature may change in the future.

+ + +

Obtaining Bot Info

+ +

To see some simple information on the bot, simply:

+ + + /msg INFO + + +

This is a p0 (see Penalties) command.

+

This command gives info such as to which server the bot is connected + and the nicknames of online bot admins.

+

This command is optional, and may be disabled by your bot admin.

+ + + +

Levelling

+ +

To gain levels, you must only be logged in and idle. The time + between levels is based on your character level, and is calculated + by the formula:

+ + 600*(1.16^YOUR_LEVEL) + +

Where ^ represents the exponentiation operator.

+

Very high levels are calculated differently as of version 3.0. Levels + after level 60 have a next time to level of:

+ + (time to level @ 60) + ((1 day) * (level - 60)) + +

The exponent method code had simply gotten to that point that levels + were taking too long to complete.

+ + +

Checking the Active Quest

+ +

To see the active quest, its users, and its time left to + completion:

+ + + /msg QUEST + + +

This is a p0 (see Penalties) command.

+ + +

Checking Your Online Status

+ +

To see whether you are logged on, simply:

+ + + /msg WHOAMI + + +

This is a p0 (see Penalties) command.

+ + +

Penalties

+ + +

If you do something other than idle, like part, quit, talk in the + channel, change your nick, or notice the channel, you are + penalized. The penalties are time, in seconds, added to your next + time to level and are based on your character level. The formulae + are as follows:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Nick change30*(1.14^(YOUR_LEVEL))
Part200*(1.14^(YOUR_LEVEL))
Quit20*(1.14^(YOUR_LEVEL))
LOGOUT command20*(1.14^(YOUR_LEVEL))
Being Kicked250*(1.14^(YOUR_LEVEL))
Channel privmsg[message_length]*(1.14^(YOUR_LEVEL))
Channel notice[message_length]*(1.14^(YOUR_LEVEL))
+
+

So, a level 25 character changing their nick would be penalized + 20*(1.14^25)=793 seconds towards their next level.

+

Penalty shorthand is p[num]. So, a nick change is a p30 event, + parting the channel is a p200 event, and quitting IRC is a p20 event. + Messages and notices are p[length of message in characters].

+ + +

Items

+ +

Each time you level, you find an item. You can find an item as + high as 1.5*YOUR_LEVEL (unless you find a + unique item). There are 10 types of items: rings, + amulets, charms, weapons, helms, tunics, gloves, leggings, + shields, and boots. You can find one of each type. When you find + an item with a level higher than the level of the item you already + have, you toss the old item and start using the new one. As of version + 3.0, there is an optional, p0 STATUS command that your admin may have + enabled, but you cannot see which items you have over IRC (only your + total item sum). You can, however, see which items you have on the web + here.

+ +

As you may guess, you have a higher chance of rolling an item of a + lower value than you do of rolling one of a higher value level. The exact + formula is as follows:

+ + + for each 'number' from 1 to YOUR_LEVEL*1.5
+   you have a 1 / ((1.4)^number) chance to find an + item at this level
+ end for + + +

As for item type, you have an equal chance to roll any type.

+ + + +

Battle

+ +

Each time you level, if your level is less than 25, you have a 25% + chance to challenge someone to combat. If your level is greater than or + equal to 25, you have a 100% chance to challenge someone. A pool of + opponents is chosen of all online players, and one is chosen randomly. If + there are no other online players, you fight no one. However, if you do + challenge someone, this is how the victor is decided:

+ +
    +
  • Your item levels are summed.
  • +
  • Their item levels are summed.
  • +
  • A random number between zero and your sum is taken.
  • +
  • A random number between zero and their sum is taken.
  • +
  • If your roll is larger than theirs, you win.
  • +
+ +

If you win, your time towards your next level is lowered. The amount + that it is lowered is based on your opponent's level. The formula is:

+ + + ((the larger number of (OPPONENT_LEVEL/4) and 7) / 100) * + YOUR_NEXT_TIME_TO_LEVEL + + +

This means that you lose no less than 7% from your next time to level. + If you win, your opponent is not penalized any time, unless you land a + Critical Strike.

+ +

If you lose, you will be penalized time. The penalty is calculated + using the formula:

+ + + ((the larger number of (OPPONENT_LEVEL/7) and 7) / 100) * + YOUR_NEXT_TIME_TO_LEVEL + + +

This means that you gain no less than 7% of your next time to level. + If you lose, your opponent is not awarded any time.

+ +

Battling the IRPG bot is a special case. The bot has an item sum of + 1+[highest item sum of all players]. The percent awarded if you win is a + constant 20%, and the percent penalized if you lose is a constant 10%.

+ +

As of version 3.0, if more than 15% of online players are level 45 or + higher, then a random level 45+ user will battle another random player + every hour. This is to speed up levelling among higher level players.

+ +

Also as of version 3.0, there is a grid system. The grid is a 500 x 500 + area in which players may walk. If you encounter another player on the + grid, you have a 1 / (NUMBER_OF_ONLINE_PLAYERS) chance to battle them. + Battle awards are calculated using the above formulae. More information + on the grid system is available here.

+ +

Also as of version 3.0, a successful battle may result an item being + stolen.

+ + +

Unique Items

+ +

As of v2.1.2, after level 25, you have a chance to roll items + significantly higher than items you would normally find at that level. + These are unique items, and have the following stats:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameItem Level RangeRequired User LevelChance to Roll
Mattt's Omniscience Grand Crown50-7425 or greater1 / 40
Juliet's Glorious Ring of Sparkliness50-7425 or greater1 / 40
Res0's Protectorate Plate Mail75-9930 or greater1 / 40
Dwyn's Storm Magic Amulet100-12435 or greater1 / 40
Jotun's Fury Colossal Sword150-17440 or greater1 / 40
Drdink's Cane of Blind Rage175-20045 or greater1 / 40
Mrquick's Magical Boots of Swiftness250-30048 or greater1 / 40
Jeff's Cluehammer of Doom300-35052 or greater1 / 40
+ +

The Hand of God

+ +

As of v3.0, every online user has a (roughly) 1/20 chance per day + of a "Hand of God" affecting them. A HoG can help or hurt your character + by carrying it between 5 and 75 percent towards or away from its next time + to level. The odds are in your favor, however, with an 80% chance to help + your character, and only a 20% chance of your character being smitten.

+ +

In addition to occurring randomly, admins may summon the HoG at their + whim.

+ + +

Critical Strike

+ +

As of v2.0.4, if a challenger beats his opponent in battle, he has a + 1/35 chance of landing a Critical Strike. If this occurs, his opponent + is penalized time towards his next time to level. This amount is + calculated by the formula:

+ + ((random number from 5 to 25) / 100) * OPPONENT'S_NEXT_TIME_TO_LEVEL + +

Meaning he gains no less than 5% and no more than 25% of his next time + to level.

+ + +

Team Battles

+ +

As of v3.0, every online user has (roughly) 1/4 chance per day of + being involved in a 'team battle.' Team battles pit three online + players against three other online players. Each side's items are summed, + and a winner is chosen as in regular battling. If the first group bests + the second group in combat, 20% of the lowest of the three's TTL is + removed from their clocks. If the first group loses, 20% of their lowest + member's TTL is added to their TTL.

+ + +

Calamities

+ +

As of v3.0, every online user has a (roughly) 1/8 chance per day of a + calamity occurring to them. A calamity is a bit of extremely bad luck that + either:
+ + a) slows a player 5-12% of their next time to level
+ b) lowers one of their item's value by 10% + +

+ + +

Godsends

+ +

As of v3.0, every online user has a (roughly) 1/8 chance per day of a + godsend occurring to them. A godsend is a bit of extremely good luck that + either:
+ + a) accelerates a player 5-12% of their next time to level
+ b) increases one of their item's value by 10% + +

+ + +

Quests

+ +

As of v2.3, there are Quests. Four level 40+ users that have been + online for more than ten hours are chosen to represent and assist the + Realm by going on a quest. If all four users make it to the quest's end, + all questers are awarded by removing 25% of their TTL (ie, their TTL at + quest's end). To complete a quest, no user can be penalized until the + quest's end. As of v3.0, there are two kinds of quests: grid-based quests + and time-based quests. Time-based quests last a random time between 12 and + 24 hours. Grid-based quests are based on the grid + system and do not have a set time to completion. Rather, the questers + must reach certain points on the map for their quest to be complete. If + the quest is not completed, ALL online users are penalized a p15 as + punishment.

+ + +

Grid System

+ +

As of v3.0, the IRPG has a grid system. The grid can be considered + a 500 x 500 point map on which the players may walk. Every second, each + player has an equal chance to step up, down, or neither, and an equal + chance to step left, right, or neither. If a user encounters another + player, there is a 1/(NUMBER_OF_ONLINE_PLAYERS) chance that they will + battle one another. Normal battling rules apply.

+ +

Some quests require that users walk to certain points on the map. In + the spirit of IRPG, of course, the trek is made for you. Your character + will automatically walk in the direction that it is supposed to, although + at a much slower than normal pace (to avoid accidents, of course. you + don't want to fall down and risk a Realm-wide p15!).

+ + +

Item Stealing

+ +

As of v3.0, the IRPG has item stealing. After each battle, if the + challenger wins, he has a slightly less than 2% chance of stealing an + item from the challengee. Only items of a higher value are stolen, and + the challenger's old item is given to the challengee in a moment of pity. +

+ + + +

Credits

+ +

Many thanks to version 3.0's map creators, res0 and Jeb! The game + wouldn't be the same without you.

+

+ The IRPG would not be possible without help from a lot of people. + To jwbozzy, yawnwraith, Tosirap, res0, dwyn, Parallax, protomek, + Bert, clavicle, drdink, jeff, rasher, Sticks, Nerje, Asterax, + emad, inkblot(!), schmolli, mikegrb, mumkin, sean, Minhiriath, + and Dan, I give many thanks. Unfortunately, this list has grown too + large to maintain. More user contributions can be seen in the + ChangeLog. +

+ +
+ + diff --git a/hits.db b/hits.db new file mode 100644 index 0000000..034c7f9 --- /dev/null +++ b/hits.db @@ -0,0 +1,10 @@ +index.php 928 Sep 3, 2023 +2023 +worldmap.php 145 Mar 20, 2023 +quest.php 128 Mar 24, 2023 +players.php 146 Mar 24, 2023 +playerview.php 1440 Apr 15, 2023 +index.php 4435 Apr 17, 2023 +contact.php 1421 Apr 17, 2023 +db.php 1135 Apr 18, 2023 +help.php 33 Sep 30, 2023 diff --git a/idlerpg-adv.txt b/idlerpg-adv.txt new file mode 100644 index 0000000..f6bf0f0 --- /dev/null +++ b/idlerpg-adv.txt @@ -0,0 +1,142 @@ +#!/usr/bin/perl -w +# idlerpg-adv (11-22-2003) by daxxar (http://mental.mine.nu) +# Usage: ./idlerpg-adv.pl [playernames] +# +# Call this script from the command line, or your login profile. +use strict; +use LWP::Simple; + +# Use cookies: +# %user - username, %class - class, %level - level, +# %next - time to next level, %status - online status, +# %uhost - nick!ident@host, %ca - created at, +# %llo - last logged on, %ti - total idletime, +# %items - list of items, %penalties - list of penalties (special; multiline) +# +# Each comma-separated element is printed with a newline at the end :) + +my @string = ( + '[User] %user', '[Class] %class', '[Level] %level', '[Next level] %next', + '[Status] %status', '[User@host] %uhost', '[Created at] %ca', + '[Last logged on] %llo', '[Total idle] %ti', '[Items] %items', + '[Penalties] %penalties' + ); + +### No need to change below ### +# For printing things in a columnized view +# print_col(\@list_of_entries, \@value_of_entries, $number_per_line) +sub make_col { + my $entryname = shift; + my $entryvalue = shift; + my $count = shift; + my @len; + my $ret; + # Find maximum length for each of the $count columns + for my $x (0 .. $#{$entryvalue}) { + my $col = $x % $count; + if (!defined($len[$col]) || $len[$col] < length($entryvalue->[$x] . $entryname->[$x])) { + $len[$col] = length("$entryvalue->[$x]"."$entryname->[$x]"); + } + } + for my $t (0 .. $#$entryvalue) { + if (!($t % $count)) { $ret .= "\n "; } + $ret .= "$entryname->[$t]\($entryvalue->[$t]\)"; + $ret .= ' ' x ($len[$t % $count] - length($entryname->[$t] . $entryvalue->[$t]) + 1); + } + return $ret; +} +sub time_to { + my @timeunits = ('yr', 'month', 'week', 'day', 'hr', 'min', 'sec'); + my @timecalc = (31104000, 2592000, 604800, 86400, 3600, 60, 1); + my $seconds = shift; my $output; + if ($seconds == 0) { return "0 seconds"; } + for my $x (0 .. $#timecalc) { + my $y = int($seconds / $timecalc[$x]); + if ($y != 0 && $seconds != 0 && $seconds >= $timecalc[$x]) { + $seconds = ($seconds % $timecalc[$x]); + $output .= "$y $timeunits[$x]"; + $output .= 's' unless $y == 1; + if ($seconds == 0) { last; } + $output .= ', ' if $x < $#timecalc - 1 && ($seconds % $timecalc[$x+1]) && $seconds != 0; + $output .= ' and ' if !($seconds % $timecalc[$x+1]); + } + } + return $output; +} +sub time_from { + my $seconds = shift; + my ($sec, $min, $hr, $day, $mo, $yr, $wday) = localtime($seconds); + $mo = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Oct', 'Sep', 'Nov', 'Dec')[$mo]; + $wday = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')[$wday]; + $yr += 1900; + if ($hr < 10) { $hr = "0$hr"; } + if ($min < 10) { $min = "0$min"; } + if ($sec < 10) { $sec = "0$sec"; } + if ($day < 10) { $day .= ' '; } + return "$wday $mo $day $hr:$min:$sec $yr"; +} +die "Usage: $0 \n" . + "Example: $0 daxxar cyb\n" if @ARGV == 0; + +start: +my $username = shift(@ARGV); +my $page = get "http://jotun.ultrazone.org/g7/dump.php?player=$username"; + +# Only line is commented if there is no such user +if ($page =~ /^#[^\n]+$/) { print "$username: no such user\n"; exit 1; } +($page) = ($page =~ /\n([^#].*)/); # Remove the comment + +# @ent = entries on page, \t separated. +my @ent = split(/\t/, $page); + +# Assign each tab-separated entry to its hash-key +my %values = ( + 'user' => $ent[0], 'level' => $ent[1], + 'class' => $ent[2], 'next' => $ent[3], + 'host' => $ent[4], 'status' => $ent[5], + 'totalidle'=> $ent[6], 'created'=> $ent[14], + 'lastlog' => $ent[15], + 'penaltynames' => [ qw(msg nick part kick quit quest logout) ], + 'penaltytimes' => [ @ent[7 .. 13] ], + 'itemnames' => [ qw(amulet charm helm boots gloves ring leggings shield tunic weapon sum) ], + 'itemlvls' => [ @ent[16 .. 25] ] +); +$values{'next'} = time_to ($values{'next'}); +$values{'totalidle'} = time_to ($values{'totalidle'}); +$values{'lastlog'} = time_from($values{'lastlog'}); +$values{'created'} = time_from($values{'created'}); +if ($values{'status'}) {$values{'status'} = 'Online'} +else {$values{'status'} = 'Offline'} + +foreach my $str (@{[ @string ]}) { + $str =~ s/%user/$values{'user'}/g; + $str =~ s/%class/$values{'class'}/g; + $str =~ s/%level/$values{'level'}/g; + $str =~ s/%next/$values{'next'}/g; + $str =~ s/%status/$values{'status'}/g; + $str =~ s/%uhost/$values{'host'}/g; + $str =~ s/%ca/$values{'created'}/g; + $str =~ s/%llo/$values{'lastlog'}/g; + $str =~ s/%ti/$values{'totalidle'}/g; + if ($str =~ /%penalties/) { + my @penaltyname = qw(msg nick part kick quit quest logout); + my @penaltytime = @ent[7 .. 13]; + for my $t (0 .. $#penaltytime) { $penaltytime[$t] = time_to($penaltytime[$t]); } + my $cols = make_col(\@penaltyname, \@penaltytime, 3); + $str =~ s/%penalties/$cols/g; + } + if ($str =~ /%items/) { + my @itemname = qw(amulet charm helm boots gloves ring leggings shield tunic weapon sum); + my @itemlvls = @ent[16 .. 25]; + # Yay, lets get a nice sum(sum) in output! :D + my $sum; map($sum += $_, @itemlvls); + my $cols = make_col(\@itemname, [ @itemlvls, $sum ], 3); + $str =~ s/%items/$cols/g; + } + $str =~ s///g; + $str =~ s///g; + print "$str\n"; +} + +print "\n" if @ARGV != 0; +goto start if @ARGV != 0; diff --git a/idlerpg.png b/idlerpg.png new file mode 100644 index 0000000..073c680 Binary files /dev/null and b/idlerpg.png differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..403440e --- /dev/null +++ b/index.php @@ -0,0 +1,63 @@ + +

Welcome

+

The Idle RPG is just what it sounds like: an RPG in which the players + idle. In addition to merely gaining levels, players can find items and + battle other players. However, this is all done for you; you just idle. + There are no set classes; you can name your character anything you like, and + have its class be anything you like, as well.

+
+ +
+

World Map

+

[Offline users are red, online users are blue]

+
+ IdleRPG World Map + + \n"; + } + fclose($file); + ?> + +
+
+ +
+

Players

+

Pick a player to view

+

[gray=offline]

+
    + ".htmlentities($user). + ", the level $level $class. Next level in $next_level.\n"; + + } + ?> +
+
+
+ + + diff --git a/makemap.php b/makemap.php new file mode 100644 index 0000000..d5ace6a --- /dev/null +++ b/makemap.php @@ -0,0 +1,60 @@ + 500) { + $stringx = $x - ((strlen($user)+1)*$width)-12; + } + if ($y+$height > 500) { + $stringy = $y - ($height/2)-2; + } + $magenta = imageColorAllocate($map,255,0,255); + imageColorTransparent($map,$magenta); + $brown = imagecolorallocate($map, 102, 51, 0); + $parchment = imagecolorallocate($map, 255, 255, 204); + + // Avoid drawing a brown dot on a brown area + $rgb = imageColorAt($map, $x, $y); + if ($rgb > 0) { // $rgb is 0 on our parchment-colored areas + $temp = $brown; + $brown = $parchment; + $parchment = $temp; + } + // YOU ARE HERE + imageFilledEllipse($map, $x, $y, 6, 6, $brown); + // background for text + imageFilledRectangle($map,$stringx+6,$stringy-($height/2),$stringx+6+$width*(strlen($user)+1),$stringy+($height/2),$brown); + // text itself + imageString($map,5,$stringx+7+($width/2),$stringy-($height/2)-1,$user,$parchment); + } + header("Content-type: image/png"); + imagePNG($map); + imageDestroy($map); +?> diff --git a/makequestmap.php b/makequestmap.php new file mode 100644 index 0000000..50bf488 --- /dev/null +++ b/makequestmap.php @@ -0,0 +1,79 @@ + diff --git a/makeworldmap.php b/makeworldmap.php new file mode 100644 index 0000000..9ad7c13 --- /dev/null +++ b/makeworldmap.php @@ -0,0 +1,26 @@ + diff --git a/maperror.png b/maperror.png new file mode 100644 index 0000000..11cc12b Binary files /dev/null and b/maperror.png differ diff --git a/newmap.png b/newmap.png new file mode 100644 index 0000000..46f947b Binary files /dev/null and b/newmap.png differ diff --git a/playerview.php b/playerview.php new file mode 100644 index 0000000..7d849bc --- /dev/null +++ b/playerview.php @@ -0,0 +1,187 @@ + + + + + + + +

Error

No such user.

+ + +
+

Player Info

+

User:

+

Class:

+

Admin?:

+

Level:

+

Next level:

+

Status:

+

Host:

+

Account Created:

+

Last login:

+

Total time idled:

+

Current position: [,]

+

Alignment:

+

XML: [link]

+

" : "Show map" ?>

+
+ +
+

Items

+ $val) { + $valInt = intval($val); // Extract integer value + $sum += $valInt; // Add to sum + $uniquecolor="#be9256"; + if ($key == "helm" && substr($val,-1,1) == "a") { + $val = intval($val)." [Mattt's Omniscience Grand Crown]"; + } + if ($key == "tunic" && substr($val,-1,1) == "b") { + $val = intval($val)." [Res0's Protectorate Plate Mail]"; + } + if ($key == "amulet" && substr($val,-1,1) == "c") { + $val = intval($val)." [Dwyn's Storm Magic Amulet]"; + } + if ($key == "weapon" && substr($val,-1,1) == "d") { + $val = intval($val)." [Jotun's Fury Colossal Sword]"; + } + if ($key == "weapon" && substr($val,-1,1) == "e") { + $val = intval($val)." [Drdink's Cane of Blind Rage]"; + } + if ($key == "boots" && substr($val,-1,1) == "f") { + $val = intval($val)." [Mrquick's Magical Boots of Swiftness]"; + } + if ($key == "weapon" && substr($val,-1,1) == "g") { + $val = intval($val)." [Jeff's Cluehammer of Doom]"; + } + if ($key == "ring" && substr($val,-1,1) == "h") { + $val = intval($val)." [Juliet's Glorious Ring of Sparkliness]"; + } echo "

$key: $val

"; + } + echo "

Sum: $sum

"; + ?> +
+ +
+

Penalties

+ $val) { + $sum += $val; // Add to sum + echo "

$key: " . duration($val) . "

"; + } + echo "

Total: " . duration($sum) . "

"; + ?> +
+ +
+

Character Modifiers

+ " . htmlentities(trim($line)) . "

"; + } + } else { + end($temp); + for ($i = 0; $i < 4; ++$i) prev($temp); + for ($line = trim(current($temp)); $line; $line = trim(next($temp))) { + echo "

" . htmlentities(trim($line)) . "

"; + } + } + } + if ($_GET['allmods'] != 1 && count($temp) > 5) { + echo "

[View all Character Modifiers (" . count($temp) . ")

"; + } + ?> +
+ + + + diff --git a/quest.php b/quest.php new file mode 100644 index 0000000..e6aab1a --- /dev/null +++ b/quest.php @@ -0,0 +1,118 @@ +Current Quest\n"; + include("commonfunctions.php"); + $file = fopen($irpg_qfile,"r"); + $type=0; + while ($line=fgets($file,1024)) { + $arg = explode(" ",trim($line)); + if ($arg[0] == "T") { + unset($arg[0]); + $text = implode(" ",$arg); + } + elseif ($arg[0] == "Y") { + $type = $arg[1]; + } + elseif ($arg[0] == "P") { + $p1[0] = $arg[1]; + $p1[1] = $arg[2]; + $p2[0] = $arg[3]; + $p2[1] = $arg[4]; + } + elseif ($arg[0] == "S") { + if ($type == 1) $time = $arg[1]; + elseif ($type == 2) $stage = $arg[1]; + } + elseif ($arg[0] == "P1") { + $player[1]['name'] = $arg[1]; + if ($type == 2) { + $player[1]['x'] = $arg[2]; + $player[1]['y'] = $arg[3]; + } + } + elseif ($arg[0] == "P2") { + $player[2]['name'] = $arg[1]; + if ($type == 2) { + $player[2]['x'] = $arg[2]; + $player[2]['y'] = $arg[3]; + } + } + elseif ($arg[0] == "P3") { + $player[3]['name'] = $arg[1]; + if ($type == 2) { + $player[3]['x'] = $arg[2]; + $player[3]['y'] = $arg[3]; + } + } + elseif ($arg[0] == "P4") { + $player[4]['name'] = $arg[1]; + if ($type == 2) { + $player[4]['x'] = $arg[2]; + $player[4]['y'] = $arg[3]; + } + } + } + if (!$type) { + echo "

Sorry, there is no active quest.

\n"; + } + else { + echo "

Quest: To $text.

\n"; + if ($type == 1) { + echo "

Time to completion: ".duration($time-time()). + "

\n"; + } + elseif ($type == 2) { + if ($stage == 1) { + echo "

Current goal: [$p1[0],$p1[1]]

\n"; + } + else { + echo "

Current goal: [$p2[0],$p2[1]]

>\n"; + } + } + echo "

Participant 1: ".htmlentities($player[1]['name']). + "
\n"; + if ($type == 2) { + echo " Position: [".$player[1]['x'].",".$player[1]['y']."]

\n"; + } + else echo "
\n"; + echo "

Participant 2: ".htmlentities($player[2]['name']). + "
\n"; + if ($type == 2) { + echo " Position: [".$player[2]['x'].",".$player[2]['y']."]

\n"; + } + else echo "
\n"; + echo "

Participant 3: ".htmlentities($player[3]['name']). + "
\n"; + if ($type == 2) { + echo " Position: [".$player[3]['x'].",".$player[3]['y']."]

\n"; + } + else echo "
\n"; + echo "

Participant 4: ".htmlentities($player[4]['name']). + "
\n"; + if ($type == 2) { + echo " Position: [".$player[4]['x'].",".$player[4]['y']."]

\n". + "

Quest Map:

\n". + "

[Questers are shown in blue, current goal in red]

\n". + "
\"Idle
\n". + " \n". + " \"".htmlentities($player[1]['name']).\n". + " \"".htmlentities($player[2]['name']).\n". + " \"".htmlentities($player[3]['name']).\n". + " \"".htmlentities($player[4]['name']).\n". + " \n"; + } + else echo "
\n"; + } + echo "
\n"; + include("footer.php"); +?> diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..e0042b9 --- /dev/null +++ b/styles.css @@ -0,0 +1,134 @@ +/* Existing Styles */ +body { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + background-color: #FFFFF0; + color: black; + margin: 10px; + text-align: justify; +} + +h1, h2 { margin-bottom: 0px; margin-top: 0px; } + +p.small { margin: 0px; font-size: smaller; } + +a { text-decoration: none; color: #C69500; } +a:hover { text-decoration: underline; color: black; } + +/* New Styles */ +.head { + background-color: #333; + color: #fff; + text-align: center; + padding: 10px; +} + +#menu { + background-color: #444; + color: #fff; + text-align: center; + padding: 10px; +} +/* Elegant File Menu-like Navigation */ +nav#menu { + background-color: #FFFFFF; + border: none; + padding: 0; + font-family: "Courier New", monospace; +} + +nav#menu ul { + list-style-type: none; + margin: 0; + padding: 0; + display: flex; +} + +nav#menu ul li { + margin: 0; + padding: 0; +} + +nav#menu ul li a { + text-decoration: none; + color: #000; + padding: 10px 20px; + display: block; + border-right: 1px solid #c0c0c0; +} + +nav#menu ul li a:last-child { + border-right: none; +} + +nav#menu ul li a:hover { + background-color: #c0c0c0; + color: #fff; +} + +.content { + padding: 20px; +} + +.footer { + background-color: #333; + color: #fff; + text-align: center; + padding: 10px; +} + +/* Map Styles */ +#map { + width: 500px; /* Original size */ + height: 500px; + background-image: url(newmap.png); + background-size: cover; + position: relative; +} + +/* Additional styles to ensure map functionality */ +area { + cursor: pointer; +} +/* Responsive layout */ +@media (max-width: 768px) { + #main-content { + flex-direction: column; + } + #map-container, #player-list { + width: 100%; + } + #map img { /* Add this selector */ + width: 100%; + height: auto; + } +} + +/* Regular layout */ +#main-content { + display: flex; + justify-content: space-between; +} +#content { + display: relative; +} +#map-container { + width: 500px; /* Set to the original size of the map */ +} +#player-list { + flex: 1; + padding-left: 20px; +} +/* New styles for offline players */ +li.offline, a.offline { + color: grey; +} +/* Code Styling */ +code { + background-color: #f4f4f4; + border: 1px solid #ddd; + border-radius: 4px; + font-family: "Courier New", monospace; + padding: 5px 10px; + display: inline-block; + margin: 5px 0; +} \ No newline at end of file diff --git a/tablegrad.gif b/tablegrad.gif new file mode 100644 index 0000000..71d43ca Binary files /dev/null and b/tablegrad.gif differ diff --git a/up.png b/up.png new file mode 100644 index 0000000..abcfdec Binary files /dev/null and b/up.png differ diff --git a/worldmap.php b/worldmap.php new file mode 100644 index 0000000..33e5b6b --- /dev/null +++ b/worldmap.php @@ -0,0 +1,27 @@ + + +

World Map

+

[offline users are red, online users are blue]

+ + +
+ IdleRPG World Map + +\n"; + } + fclose($file); +?> + +
+ + diff --git a/xml.php b/xml.php new file mode 100644 index 0000000..4fbc158 --- /dev/null +++ b/xml.php @@ -0,0 +1,82 @@ +"; +?> + + + + + + + + + + + + + + + $val) { + echo " <$key>$val\n"; + $sum += $val; + } + echo " $sum\n"; +?> + + + $val) { + echo " <$key>$val\n"; + $sum += $val; + } + echo " $sum\n"; +?> + +