diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8285ff6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +Version 0.0.2 - 2025-09-15 + +* Add Release project for building version releases +* Add option for turning on or off email ad in footer and contact form submissions +* Add support for bot SASL connection and password to IRC server +* Update and implement new web settings +* Update and fix all PHP opening, closing and short tags +* Cleanup all PHP and HTML code +* Update docs +* Minor changes + +Version 0.0.1 - 2004-07-17 + +* The original 2004 version forked from idlerpg.net diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..41dd9eb --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,127 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3e0bb28 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +## Contributing +Let's work better together. We are looking to collaborate with like-minded people who want to contribute in any capacity. Collaboration is open to everyone and we need your help if you are a: +* Collector +* Database Administrator +* Datter +* Developer +* Dumper +* Graphic Artist +* Translator +* Player +* Tester + +Feel free to: +* Fork the repository +* Create an issue +* Branch your repository with the issue number and a meaningful name related to the changes you are making +* Create a pull request + +## Contact +GitEmAll: [https://gitemall.devemall.int.eu.org/TommySalami/IdleRPG](https://gitemall.devemall.int.eu.org/TommySalami/IdleRPG "GitEmAll") + +--- +###### Copyright (c) 2004-2025 IdleRPG - All Rights Reserved diff --git a/ISSUES.md b/ISSUES.md new file mode 100644 index 0000000..dc6ac3a --- /dev/null +++ b/ISSUES.md @@ -0,0 +1,2 @@ +### Issues +All issues, bugs and features are tracked using GitEmAll diff --git a/IdleRPG.sln b/IdleRPG.sln index 759a0c4..f0da533 100644 --- a/IdleRPG.sln +++ b/IdleRPG.sln @@ -1,53 +1,86 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.14.36414.22 d17.14 +VisualStudioVersion = 17.14.36414.22 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bot.v3.1.2", "bot.v3.1.2", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}" ProjectSection(SolutionItems) = preProject - bot.v3.1.2\.irpg.conf = bot.v3.1.2\.irpg.conf - bot.v3.1.2\bot.v3.1.2.pl = bot.v3.1.2\bot.v3.1.2.pl - bot.v3.1.2\ChangeLog.txt = bot.v3.1.2\ChangeLog.txt - bot.v3.1.2\events.txt = bot.v3.1.2\events.txt - bot.v3.1.2\irpgdbtool = bot.v3.1.2\irpgdbtool - bot.v3.1.2\modifiers.txt = bot.v3.1.2\modifiers.txt - bot.v3.1.2\questinfo.txt = bot.v3.1.2\questinfo.txt - bot.v3.1.2\README = bot.v3.1.2\README + .gitattributes = .gitattributes + .gitignore = .gitignore + CHANGELOG.md = CHANGELOG.md + CODE_OF_CONDUCT.md = CODE_OF_CONDUCT.md + CONTRIBUTING.md = CONTRIBUTING.md + ISSUES.md = ISSUES.md + LICENSE = LICENSE + README.md = README.md + TODO.md = TODO.md + screenshot2.png = screenshot2.png + screenshot1.png = screenshot1.png EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "irpg", "irpg", "{440DEC4B-57C9-4361-9949-7CF55F9CFED8}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "irpg-bot", "irpg-bot", "{3784E8C8-32DE-4740-8F55-324EF1EC4E86}" ProjectSection(SolutionItems) = preProject - irpg\admincomms.txt = irpg\admincomms.txt - irpg\ChangeLog = irpg\ChangeLog - irpg\commonfunctions.php = irpg\commonfunctions.php - irpg\config.php = irpg\config.php - irpg\contact.php = irpg\contact.php - irpg\db.php = irpg\db.php - irpg\down.png = irpg\down.png - irpg\dump.php = irpg\dump.php - irpg\footer.php = irpg\footer.php - irpg\g7.css = irpg\g7.css - irpg\head.png = irpg\head.png - irpg\header.php = irpg\header.php - irpg\hits.db = irpg\hits.db - irpg\idlerpg-adv.txt = irpg\idlerpg-adv.txt - irpg\index.php = irpg\index.php - irpg\makemap.php = irpg\makemap.php - irpg\makequestmap.php = irpg\makequestmap.php - irpg\makeworldmap.php = irpg\makeworldmap.php - irpg\maperror.png = irpg\maperror.png - irpg\newmap.png = irpg\newmap.png - irpg\players.php = irpg\players.php - irpg\playerview.php = irpg\playerview.php - irpg\quest.php = irpg\quest.php - irpg\README = irpg\README - irpg\tablegrad.gif = irpg\tablegrad.gif - irpg\up.png = irpg\up.png - irpg\worldmap.php = irpg\worldmap.php - irpg\xml.php = irpg\xml.php + irpg-bot\.irpg.conf = irpg-bot\.irpg.conf + irpg-bot\ChangeLog.txt = irpg-bot\ChangeLog.txt + irpg-bot\events.txt = irpg-bot\events.txt + irpg-bot\INSTALL.txt = irpg-bot\INSTALL.txt + irpg-bot\irpg.pl = irpg-bot\irpg.pl + irpg-bot\irpgdbtool = irpg-bot\irpgdbtool + irpg-bot\modifiers.txt = irpg-bot\modifiers.txt + irpg-bot\questinfo.txt = irpg-bot\questinfo.txt EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "irpg-web", "irpg-web", "{B2C6CD83-5E84-40A2-8D1A-A57517EC36D9}" + ProjectSection(SolutionItems) = preProject + irpg-web\admincomms.txt = irpg-web\admincomms.txt + irpg-web\ChangeLog.txt = irpg-web\ChangeLog.txt + irpg-web\commonfunctions.php = irpg-web\commonfunctions.php + irpg-web\config.php = irpg-web\config.php + irpg-web\contact.php = irpg-web\contact.php + irpg-web\db.php = irpg-web\db.php + irpg-web\down.png = irpg-web\down.png + irpg-web\dump.php = irpg-web\dump.php + irpg-web\footer.php = irpg-web\footer.php + irpg-web\g7.css = irpg-web\g7.css + irpg-web\header.php = irpg-web\header.php + irpg-web\hits.db = irpg-web\hits.db + irpg-web\idlerpg-adv.txt = irpg-web\idlerpg-adv.txt + irpg-web\idlerpg.png = irpg-web\idlerpg.png + irpg-web\idlerpg_000000.png = irpg-web\idlerpg_000000.png + irpg-web\idlerpg_025D30.png = irpg-web\idlerpg_025D30.png + irpg-web\idlerpg_ff0000.png = irpg-web\idlerpg_ff0000.png + irpg-web\index.php = irpg-web\index.php + irpg-web\INSTALL.txt = irpg-web\INSTALL.txt + irpg-web\makemap.php = irpg-web\makemap.php + irpg-web\makequestmap.php = irpg-web\makequestmap.php + irpg-web\makeworldmap.php = irpg-web\makeworldmap.php + irpg-web\maperror.png = irpg-web\maperror.png + irpg-web\newmap.png = irpg-web\newmap.png + irpg-web\players.php = irpg-web\players.php + irpg-web\playerview.php = irpg-web\playerview.php + irpg-web\quest.php = irpg-web\quest.php + irpg-web\rw.css = irpg-web\rw.css + irpg-web\tablegrad.gif = irpg-web\tablegrad.gif + irpg-web\up.png = irpg-web\up.png + irpg-web\wall.gif = irpg-web\wall.gif + irpg-web\worldmap.php = irpg-web\worldmap.php + irpg-web\xml.php = irpg-web\xml.php + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "irpg-release", "irpg-release\irpg-release.csproj", "{3C3C4730-9D32-418C-BFDC-CE89148AA6CA}" +EndProject Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Description = The Original Automated IRC Idle Role Playing Game + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3C3C4730-9D32-418C-BFDC-CE89148AA6CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C3C4730-9D32-418C-BFDC-CE89148AA6CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C3C4730-9D32-418C-BFDC-CE89148AA6CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C3C4730-9D32-418C-BFDC-CE89148AA6CA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..59760bb --- /dev/null +++ b/LICENSE @@ -0,0 +1,37 @@ +*************************************************************** +IdleRPG - License version 20250912 +Copyright (c) 2004-2025 IdleRPG - All Rights Reserved +*************************************************************** + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Redistributions in any form are not permitted whatsoever, +under any conditions. + +2. This software may not be reverse engineered, decompiled, +or disassembled. + +3. IdleRPG may publish revised and/or new versions of the +license from time to time. Each version will be given a +distinguishing version number. No one other than +IdleRPG has the right to modify the terms applicable +to covered code created under this License. + +4. It is your responsibility to use this software in accordance +with all applicable laws. + +*************************************************************** + +THIS SOFTWARE IS PROVIDED BY THE IDLERPG DEVELOPMENT TEAM +'AS IS' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE IDLERPG DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..90f71b1 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# @IdleRPG +### The Original Automated IRC Idle Role Playing Game + +## About +IdleRPG or IRPG is the original automated IRC idle role playing game. + +This is a modified and updated version of the 2004 version forked from idlerpg.net. + +IdleRPG comes with a bot written in Perl, a graphical web interface written in PHP and uses a file based database. + +## Screenshots +![IdleRPG Screenshot 1](screenshot1.png?raw=true "IdleRPG Screenshot 1") +![IdleRPG Screenshot 2](screenshot2.png?raw=true "IdleRPG Screenshot 2") + +## Installation +INSTALL.txt files are included in the irpg-bot and irpg-web directories + +## Dependencies +The following frameworks and SDKs are required to develop and build this app: +* Perl +* PHP +* GD 2.0+ (or have it enabled in your php.ini, on Win32) + +The following NPM Packages are required to develop and build this app: +* None yet + +The following tools and extensions are required to develop and build this app: +* None yet + +## Projects +* irpg-bot - Bot Source +* irpg-web - Web Source +* irpg-release - Release Project + +## Contributing +Let's work better together. We are looking to collaborate with like-minded people who want to contribute in any capacity. Collaboration is open to everyone and we need your help if you are a: +* Collector +* Database Administrator +* Datter +* Developer +* Dumper +* Graphic Artist +* Translator +* Player +* Tester + +Feel free to: +* Fork the repository +* Create an issue +* Branch your repository with the issue number and a meaningful name related to the changes you are making +* Create a pull request + +## Contact +GitEmAll: [https://gitemall.devemall.int.eu.org/TommySalami/IdleRPG](https://gitemall.devemall.int.eu.org/TommySalami/IdleRPG "GitEmAll") + +--- +###### Copyright (c) 2004-2025 IdleRPG - All Rights Reserved diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..dffd979 --- /dev/null +++ b/TODO.md @@ -0,0 +1,2 @@ +### ToDo +All ToDo lists and milestones are tracked using GitEmAll diff --git a/bot.v3.1.2/README b/bot.v3.1.2/README deleted file mode 100644 index b07a016..0000000 --- a/bot.v3.1.2/README +++ /dev/null @@ -1,62 +0,0 @@ --------------------------------------------------------------------------------- -First-time users: --------------------------------------------------------------------------------- - -1. Using your favorite text editor, open the bot's source. Read the file header. - If you don't agree with the license, please delete the source and remove - each of your brain cells associated with it. Kthx. -2. Open the file .irpg.conf and edit the bot's options to suit you. You must - also move this file into the same directory where the bot resides. -3. Run it with: perl bot.filename.pl -4. If you have problems, try running it in debug mode: - perl bot.filename.pl --debug - If you cannot diagnose the problem, post to http://idlerpg.net/forum.php -5. Thanks for your interest in Idle RPG! - --------------------------------------------------------------------------------- -IRPG 3.0 users looking to upgrade: --------------------------------------------------------------------------------- - -1. Using your favorite text editor, open the bot's source. Read the file header. - If you don't agree with the license, please delete the source and remove - each of your brain cells associated with it. Kthx. -2. Open the file .irpg.conf and edit the bot's options to suit you. You must - also move this file into the same directory where the bot resides. -3. Replace your old bot source with the new one, ie, rm -f that old, buggy crap. -4. Run it with: perl bot.filename.pl -5. If you have problems, try running it in debug mode: - perl bot.filename.pl --debug - If you cannot diagnose the problem, post to http://idlerpg.net/forum.php -6. Thanks for your interest in Idle RPG! - - --------------------------------------------------------------------------------- -IRPG 2.4 users looking to upgrade: --------------------------------------------------------------------------------- - -1. Using your favorite text editor, open the bot's source. Read the file header. - If you don't agree with the license, please delete the source and remove - each of your brain cells associated with it. Kthx. -2. Run the db conversion tool: perl irpgdbtool -3. Answer the questions to suit you. -4. Open the file .irpg.conf and edit the bot's options to suit you. You must - also move this file into the same directory where the bot resides. -5. Run it with: perl bot.filename.pl -6. If you have problems, try running it in debug mode: - perl bot.filename.pl --debug - If you cannot diagnose the problem, post to http://idlerpg.net/forum.php -7. Thanks for your interest in Idle RPG! - - --------------------------------------------------------------------------------- -Pre-2.4 users looking to upgrade: --------------------------------------------------------------------------------- - -1. Using your favorite text editor, open the bot's source. Read the file header. - If you don't agree with the license, please delete the source and remove - each of your brain cells associated with it. Kthx. -2. I don't think the irpgdbtool will help you unless you're comfortable with - Perl, sorry. :/ If you are, though, you can pull the loaddb() sub from the - bot that you're currently using instead of using the loaddb() supplied in - irpgdbtool. You'll also need to add code to add in the other missing fields - that exist in v2.4. diff --git a/bot.v3.1.2/.irpg.conf b/irpg-bot/.irpg.conf similarity index 79% rename from bot.v3.1.2/.irpg.conf rename to irpg-bot/.irpg.conf index b8a4d6d..3f4af50 100644 --- a/bot.v3.1.2/.irpg.conf +++ b/irpg-bot/.irpg.conf @@ -1,67 +1,95 @@ -# Configuration file for IRPG bot. Prefix comments with a #. Line must start -# with a # to be a comment (no leading spaces and no comments starting in the -# middle of a line). +# .irpg.conf +# +# Configuration file for the bot. +# +# Prefix comments with a #. Line must start with a # to be a comment. +# (no leading spaces and no comments starting in the middle of a line). # # If you don't personally know your admins, or you're just not the trusting # type, you may want to look at the ownerpevalonly, owneraddonly, and # ownerdelonly options. ownerpevalonly prevents non-owner accounts from using # the PEVAL command, which can allow admins to execute arbitrary code under the # username that the bot runs as. owneraddonly prevents non-owner accounts from -# assigning admin status to users. ownerdelonly prevents non-owner accounts from -# removing admin status from users -# -# 'disablepeval' option was renamed to 'ownerpevalonly' +# assigning admin status to users. ownerdelonly prevents non-owner accounts +# from removing admin status from users. # # Command line options override options in this file. -# remove or comment out this line so the bot knows that you edited the config -# file +# remove or comment out this line to prove that you edited the config file. die -# local hostname or address to bind to. leave blank or comment out if you don't -# want to use a vhost -#localaddr myvhost.domain.com +# local hostname or address to bind to. +# leave blank or comment out if you don't want to use a vhost. +#localaddr irc.mynet.org +#localaddr 10.10.23.23 # server name:port, enter as many as you like -server miami.fl.us.irc-network.org:6667 +#server miami.fl.us.irc-network.org:6667 server dallas.tx.us.irc-network.org:7000 server brussels.be.eu.irc-network.org:6660 +#server irc.mynet.org:7000 +#server 127.0.0.1:7000 # bot's nickname -botnick bot +botnick IdleBot + +# bot's password +# this is the normal password usually registered on IRC +botpass iL@ved1nk + +# bot's SASL password +# this is a different password than the one you usually register on IRC +# known working on current unrealircd and all others are untested +# please contact me if you know anything about the IRC connection +# and login procedure with SASL and the codes that are transmitted +botsaslpass iL@ved1nkMor3 # bot's username -botuser bot +botuser IdleBot -# real name field -botrlnm http://www.slashnet.org/~bot/ +# bot's real name field +botrlnm IdleBot -# channel name (followed by key, if your channel uses a key -botchan #irpg s3cr3t.p4ss +# channel name (followed by key, if your channel uses a key) +# botchan #IdleRPG s3cr3t.p4ss +botchan #IdleRPG # (identify) command to send upon successful connect. if using a privmsg -# command, you must begin the text of the message with a ":" -- see below -botident PRIVMSG NickServ :identify ilovedink +# command, you must begin the text of the message with a ":" +botidentcmd PRIVMSG NickServ :identify %botpass% # modes to set bot upon successful connect botmodes +ix -# command to send upon joining channel. %botnick% will evaluate to the bot's -# current nickname, so you don't have to worry about opping the wrong person. if -# using a privmsg command, you must begin the text of the message with a ":" -- -# see below -botopcmd PRIVMSG ChanServ :op #idlerpg %botnick% +# (op) command to send upon joining channel. %botnick% will evaluate to the +# bot's current nickname, so you don't have to worry about opping the wrong +# person. if using a privmsg command, you must begin the text of the message +# with a ":" +botopcmd PRIVMSG ChanServ :op %botchan% %botnick% -# command sent to recover nick if bot's primary nickname is in use if using a -# privmsg command, you must begin the text of the message with a ":" -- see -# below -botghostcmd PRIVMSG NickServ :ghost bot ilovedink +# (ghost) command sent to recover nick if bot's primary nickname is in use if +# using a privmsg command, you must begin the text of the message with a ":" +botghostcmd PRIVMSG NickServ :ghost %botnick% %botpass% -# URL to send users to for help -helpurl http://idlerpg.net/ +# URL where users can reach the help page +helpurl https://www.mynet.org/irpg/ -# admin commands list (for admin help) -admincommurl http://idlerpg.net/admincomms.txt +# URL where users can reach the admin commands list (for admin help) +admincommurl https://www.mynet.org/irpg/admincomms.txt + +# URL where users can reach the online quest map, if available. if not +# offering a map to users, leave this blank +mapurl https://www.mynet.org/irpg/quest.php + +# URLs containing these terms will not be banned by the 'http:' +# advertisement ban (if you have it turned on). enter as many as you like +okurl ultrazone.org +okurl idlerpg.net +okurl mynet.org + +# Use URL-type banning for non-logged-in users that have been on the channel +# less than 90 seconds? +doban on # base time to level up, 600 = 10 minutes rpbase 600 @@ -87,15 +115,6 @@ debug off # while the bot is in debug mode, in lieu of STDOUT debugfile debug.txt -# Use URL-type banning for non-logged-in users that have been on the channel -# less than 90 seconds? -doban on - -# URLs containing these terms will not be banned by the 'http:' -# advertisement ban (if you have it turned on). enter as many as you like -okurl ultrazone.org -okurl idlerpg.net - # modes of silence. in mode 0, bot sends all privmsgs. in mode 1, only # chanmsg() is disabled. in mode 2, only privmsg() to non-channels is # disabled. in mode 3, privmsgs to users and channels are disabled @@ -124,10 +143,6 @@ noccodes on # problems in the past with using binary hash keys nononp on -# URL where users can reach the online quest map, if available. if not -# offering a map to users, leave this blank -mapurl http://idlerpg.net/quest.php - # allow a STATUS command for users? this is a p0 command to view information # on an irpg user. useful if you don't have a website where users can view # their stats @@ -188,11 +203,11 @@ noscale off # allow bot to access http://jotun.ultrazone.org/g7/count.php?new=1 each # time someone registers a new username? it only takes a second, and I'd # really like to be able to keep up with the total player count :^) -phonehome on +phonehome off # username of the bot's owner. this account cannot be DELADMINed and has access # to PEVAL even if it is disabled -owner jotun +owner admin # disable the PEVAL command for non-owner accounts? this command allows the # execution of arbitrary Perl code by bot admins, effectively giving them @@ -211,7 +226,7 @@ ownerdelonly on # check for newer versions each time the bot starts up? this will access the # URL http://jotun.ultrazone.org/g7/version.php?version=$version and report on # any updated versions and what features there are/bugs have been fixed -checkupdates on +checkupdates off # send list of usernames that are automatically logged back in when we restart # (iff that list is < 1 k)? this should, hopefully, no longer cause the bot to diff --git a/bot.v3.1.2/ChangeLog.txt b/irpg-bot/ChangeLog.txt similarity index 99% rename from bot.v3.1.2/ChangeLog.txt rename to irpg-bot/ChangeLog.txt index 2985918..72c2f95 100644 --- a/bot.v3.1.2/ChangeLog.txt +++ b/irpg-bot/ChangeLog.txt @@ -1,7 +1,7 @@ -This is the changelog for the Idle RPG bot by jotun, jotun@idlerpg.net, -http://idlerpg.net. Entries are written backwards. That is, items at the bottom -of the file were added first, and each subsequent addition is placed on a line -before it. Don't ask me why I do it that way: I do not know. +This is the ChangeLog for the old Idle RPG Bot Code. +Entries are written backwards. That is, items at the bottom of the file +were added first, and each subsequent addition is placed on a line before it. +Don't ask me why I do it that way: I do not know. Thanks for your interest in the Idle RPG! Feel free to contact me with ideas and comments, or post them in the forum on the website for public view. diff --git a/irpg-bot/INSTALL.txt b/irpg-bot/INSTALL.txt new file mode 100644 index 0000000..dfbb14a --- /dev/null +++ b/irpg-bot/INSTALL.txt @@ -0,0 +1,30 @@ +------------------------------------------------------------------------------- +First-time Installation: +------------------------------------------------------------------------------- + +1. Copy all of the irpg-bot files to your private web folder. The folder must + be readable and writable by the web server and able to execute Perl and PHP. +2. Edit .irpg.conf with your favorite editor. This file must be in the same + private directory where the bot resides. +3. Run the bot with: perl irpg.pl +4. If you have problems, try running it in debug mode with: + perl irpg.pl --debug +5. Edit the bot ANY WAY you see fit. +6. All milestones, issues, bugs and features are tracked using GitEmAll. + Thanks for your interest in IdleRPG! :^) + +------------------------------------------------------------------------------- +Upgrading: +------------------------------------------------------------------------------- + +1. Remove your old bot source, ie, rm -rfv that old buggy crap and start over. +2. Copy all of the irpg-bot files to your private web folder. The folder must + be readable and writable by the web server and able to execute Perl and PHP. +2. Edit .irpg.conf with your favorite editor. This file must be in the same + private directory where the bot resides. +4. Run the bot with: perl irpg.pl +5. If you have problems, try running it in debug mode with: + perl irpg.pl --debug +6. Edit the bot ANY WAY you see fit. +7. All milestones, issues, bugs and features are tracked using GitEmAll. + Thanks for your interest in IdleRPG! :^) diff --git a/bot.v3.1.2/events.txt b/irpg-bot/events.txt similarity index 100% rename from bot.v3.1.2/events.txt rename to irpg-bot/events.txt diff --git a/bot.v3.1.2/bot.v3.1.2.pl b/irpg-bot/irpg.pl similarity index 98% rename from bot.v3.1.2/bot.v3.1.2.pl rename to irpg-bot/irpg.pl index 11d0bb1..1caba8d 100644 --- a/bot.v3.1.2/bot.v3.1.2.pl +++ b/irpg-bot/irpg.pl @@ -1,20 +1,17 @@ #!/usr/local/bin/perl -# irpg bot v3.1.2 by jotun, jotun@idlerpg.net, et al. See http://idlerpg.net/ +# irpg.pl # -# Some code within this file was written by authors other than myself. As such, -# distributing this code or distributing modified versions of this code is -# strictly prohibited without written authorization from the authors. Contact -# jotun@idlerpg.net. Please note that this may change (at any time, no less) if -# authorization for distribution is given by patch submitters. +# The bot modified, released and maintained by TommySalami +# https://gitemall.devemall.int.eu.org/TommySalami/IdleRPG +# based on +# The bot originally written and released by jotun, jotun@idlerpg.net, et al. +# http://idlerpg.net/ # -# As a side note, patches submitted for this project are automatically taken to -# be freely distributable and modifiable for any use, public or private, though -# I make no claim to ownership; original copyrights will be retained.. except as -# I've just stated. +# Thanks to everyone that's contributed! # -# Please mail bugs, etc. to me. Patches are welcome to fix bugs or clean up -# the code, but please do not use a radically different coding style. Thanks -# to everyone that's contributed! +# As a side note, contributions submitted for this project are automatically +# taken to be freely distributable and modifiable for any use, public or +# private, though I make no claim to ownership. # # NOTE: This code should NOT be run as root. You deserve anything that happens # to you if you run this code as a superuser. Also, note that giving a @@ -36,7 +33,7 @@ my %opts; readconfig(); -my $version = "3.1.2"; +my $version = "0.0.2"; # command line overrides .irpg.conf GetOptions(\%opts, @@ -46,10 +43,12 @@ GetOptions(\%opts, "debugfile=s", "server|s=s", "botnick|n=s", + "botpass|a=s", + "botsaslpass|z=s", "botuser|u=s", "botrlnm|r=s", "botchan|c=s", - "botident|p=s", + "botidentcmd|p=s", "botmodes|m=s", "botopcmd|o=s", "localaddr=s", @@ -365,13 +364,19 @@ sub parse { penalize(finduser($usernick),"kick"); delete($onchan{$usernick}); } + elsif ($arg[1] eq 'notice' && $arg[2] eq $opts{botnick} && $arg[8] eq 'authenticate' && $arg[9] eq 'now') { + # send our SASL info + # known working on current unrealircd and all others are untested + # please contact me if you know anything about the IRC connection + # and login procedure with SASL and the codes that are transmitted + sts("AUTH $opts{botnick}:$opts{botsaslpass}"); + } # don't penalize /notices to the bot elsif ($arg[1] eq 'notice' && $arg[2] ne $opts{botnick}) { penalize($username,"notice",length("@arg[3..$#arg]")-1); } elsif ($arg[1] eq '001') { # send our identify command, set our usermode, join channel - sts($opts{botident}); sts("MODE $opts{botnick} :$opts{botmodes}"); sts("JOIN $opts{botchan}"); $opts{botchan} =~ s/ .*//; # strip channel key if present @@ -424,8 +429,7 @@ sub parse { if (lc($arg[2]) eq lc($opts{botnick})) { # to us, not channel $arg[3] = lc(substr($arg[3],1)); # lowercase, strip leading : if ($arg[3] eq "\1version\1") { - notice("\1VERSION IRPG bot v$version by jotun; ". - "http://idlerpg.net/\1",$usernick); + notice("\1VERSION IdleRPG bot v$version\1", $usernick); } elsif ($arg[3] eq "peval") { if (!ha($username) || ($opts{ownerpevalonly} && @@ -933,12 +937,11 @@ sub parse { elsif ($arg[3] eq "info") { my $info; if (!ha($username) && $opts{allowuserinfo}) { - $info = "IRPG bot v$version by jotun, ". - "http://idlerpg.net/. On via server: ". + $info = "IdleRPG bot v$version, via server: ". $opts{servers}->[0].". Admins online: ". join(", ", map { $rps{$_}{nick} } grep { $rps{$_}{isadmin} && - $rps{$_}{online} } keys(%rps))."."; + $rps{$_}{online} } keys(%rps)); privmsg($info, $usernick); } elsif (!ha($username) && !$opts{allowuserinfo}) { @@ -1692,9 +1695,10 @@ usage: $prog [OPTIONS] --server, -s Specify IRC server:port to connect to --botnick, -n Bot's IRC nick --botuser, -u Bot's username + --botsaslpass -z Bot's SASL password --botrlnm, -r Bot's real name --botchan, -c IRC channel to join - --botident, -p Specify identify-to-services command + --botidentcmd, -p Specify identify-to-services command --botmodes, -m Specify usermodes for the bot to set upon connect --botopcmd, -o Specify command to send to server on successful connect --botghostcmd, -g Specify command to send to server to regain primary @@ -1703,8 +1707,9 @@ usage: $prog [OPTIONS] --okurl, -k Bot will not ban for web addresses that contain these strings --debug Debug on/off flag - --helpurl URL to refer new users to - --admincommurl URL to refer admins to + --helpurl URL where users can reach the help page + --admincommurl URL where users can reach the admin commands list + --mapurl URL where users can reach the online quest map Timing parameters: --rpbase Base time to level up diff --git a/bot.v3.1.2/irpgdbtool b/irpg-bot/irpgdbtool similarity index 100% rename from bot.v3.1.2/irpgdbtool rename to irpg-bot/irpgdbtool diff --git a/bot.v3.1.2/modifiers.txt b/irpg-bot/modifiers.txt similarity index 100% rename from bot.v3.1.2/modifiers.txt rename to irpg-bot/modifiers.txt diff --git a/bot.v3.1.2/questinfo.txt b/irpg-bot/questinfo.txt similarity index 100% rename from bot.v3.1.2/questinfo.txt rename to irpg-bot/questinfo.txt diff --git a/irpg-release/App.config b/irpg-release/App.config new file mode 100644 index 0000000..193aecc --- /dev/null +++ b/irpg-release/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/irpg-release/irpg-release.csproj b/irpg-release/irpg-release.csproj new file mode 100644 index 0000000..23c7702 --- /dev/null +++ b/irpg-release/irpg-release.csproj @@ -0,0 +1,75 @@ + + + + + Debug + AnyCPU + {3C3C4730-9D32-418C-BFDC-CE89148AA6CA} + + + AnyCPU + bin\Debug\ + + + AnyCPU + bin\Release\ + + + + + + + IdleRPG + 0.0.2 + IdleRPG-Bot + IdleRPG-Web + IdleRPG-Source + $(OutputPath)Bot\ + $(OutputPath)Web\ + $(OutputPath)Source\ + $(OutputPath)Releases\ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/irpg/ChangeLog b/irpg-web/ChangeLog.txt similarity index 95% rename from irpg/ChangeLog rename to irpg-web/ChangeLog.txt index 570b698..a2eb6be 100644 --- a/irpg/ChangeLog +++ b/irpg-web/ChangeLog.txt @@ -1,7 +1,7 @@ -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. +This is the ChangeLog for the old 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 :^) diff --git a/irpg-web/INSTALL.txt b/irpg-web/INSTALL.txt new file mode 100644 index 0000000..8fd3619 --- /dev/null +++ b/irpg-web/INSTALL.txt @@ -0,0 +1,48 @@ +------------------------------------------------------------------------------- +First-time Installation: +------------------------------------------------------------------------------- + +1. Make sure you have the irpg-bot functional and running. +2. Copy all of the irpg-web files to your public_html/irpg web folder. +3. Edit config.php with your favorite editor. This file must be in the same + public directory where the irpg web resides. +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. All milestones, issues, bugs and features are tracked using GitEmAll. + Thanks for your interest in IdleRPG! :^) + +------------------------------------------------------------------------------- +Upgrading: +------------------------------------------------------------------------------- + +1. Remove your old web source, ie, rm -rfv that old buggy crap and start over. +2. Make sure you have the irpg-bot functional and running. +3. Copy all of the irpg-web files to your public_html/irpg web folder. +4. Edit config.php with your favorite editor. This file must be in the same + public directory where the irpg web resides. +5. chmod 644 * && chmod 666 hits.db +6. 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. +7. 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. +8. 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 :^) +9. All milestones, issues, bugs and features are tracked using GitEmAll. + Thanks for your interest in IdleRPG! :^) diff --git a/irpg/admincomms.txt b/irpg-web/admincomms.txt similarity index 96% rename from irpg/admincomms.txt rename to irpg-web/admincomms.txt index 1f9e5f2..1a53de1 100644 --- a/irpg/admincomms.txt +++ b/irpg-web/admincomms.txt @@ -1,6 +1,5 @@ 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/ +of admin commands. INFO, retrieve some fairly useless stats about the bot. diff --git a/irpg/commonfunctions.php b/irpg-web/commonfunctions.php similarity index 100% rename from irpg/commonfunctions.php rename to irpg-web/commonfunctions.php diff --git a/irpg-web/config.php b/irpg-web/config.php new file mode 100644 index 0000000..2287f87 --- /dev/null +++ b/irpg-web/config.php @@ -0,0 +1,61 @@ + diff --git a/irpg-web/contact.php b/irpg-web/contact.php new file mode 100644 index 0000000..4efd232 --- /dev/null +++ b/irpg-web/contact.php @@ -0,0 +1,55 @@ +Contact"; + if (!$irpg_site_email) { + echo "
Config error. The config file was not loaded correctly.
\n"; + } + else if ($irpg_site_email == "disabled") { + echo "
Email is disabled.
\n"; + } + else if ($irpg_site_email == "php" && $_POST['from'] && $_POST['text']) { + $to = $admin_email; + $subject = "IdleRPG: ".$_POST['from']; + $message = "Name: ".$_POST['name']."\nE-mail: ".$_POST['from']."\n\n".$_POST['text']; + $additional_headers = "From: ".$_POST['from']."\r\n"; + mail($to, $subject, $message, $additional_headers); + echo "
Thanks for your submission.
\n"; + } + else if ($irpg_site_email == "smtp" && $_POST['from'] && $_POST['text']) { + echo "
SMTP Email is under construction. Your submission was not submitted.
\n"; + } + else { + 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"; + } + + include("footer.php"); +?> diff --git a/irpg/db.php b/irpg-web/db.php similarity index 97% rename from irpg/db.php rename to irpg-web/db.php index 78ba930..ab9c35c 100644 --- a/irpg/db.php +++ b/irpg-web/db.php @@ -1,12 +1,9 @@ - +
\n"; } - echo(' -
User @@ -248,10 +245,9 @@ "
-

- * Accounts created before Aug 29, 2003 may have incowrect data fields. - '); + echo " \n". + "

\n". + " * Accounts created before Aug 29, 2003 may have incorrect data fields.\n"; + include("footer.php"); ?> diff --git a/irpg/down.png b/irpg-web/down.png similarity index 100% rename from irpg/down.png rename to irpg-web/down.png diff --git a/irpg/dump.php b/irpg-web/dump.php similarity index 100% rename from irpg/dump.php rename to irpg-web/dump.php index 2f29898..193bc57 100644 --- a/irpg/dump.php +++ b/irpg-web/dump.php @@ -4,8 +4,8 @@ // should use the new xml.php to glean player info, which is much more // suited to db changes. header('Content-Type: text/plain'); - include("commonfunctions.php"); include("config.php"); + include("commonfunctions.php"); $file = file($irpg_db); $header = explode("\t",$file[0]); unset($header[1]); // password diff --git a/irpg-web/footer.php b/irpg-web/footer.php new file mode 100644 index 0000000..9c4d0d4 --- /dev/null +++ b/irpg-web/footer.php @@ -0,0 +1,39 @@ + + + + diff --git a/irpg/g7.css b/irpg-web/g7.css similarity index 100% rename from irpg/g7.css rename to irpg-web/g7.css diff --git a/irpg/head.png b/irpg-web/head.png similarity index 100% rename from irpg/head.png rename to irpg-web/head.png diff --git a/irpg-web/header.php b/irpg-web/header.php new file mode 100644 index 0000000..13b2982 --- /dev/null +++ b/irpg-web/header.php @@ -0,0 +1,44 @@ + + + + + <?php echo $irpg_page_title; ?> :: <?php echo $irpg_chan; ?> + + + + + +
+\n"; +?> +
+ +
diff --git a/irpg-web/hits.db b/irpg-web/hits.db new file mode 100644 index 0000000..fce6d51 --- /dev/null +++ b/irpg-web/hits.db @@ -0,0 +1,10 @@ +contact.php 420 Jul 4, 2016 +db.php 420 Jul 4, 2016 +forum.php 420 Jul 4, 2016 +index.php 420 Jul 4, 2016 +playerview.php 420 Jul 4, 2016 +players.php 420 Jul 4, 2016 +quest.php 420 Jul 4, 2016 +worldmap.php 420 Jul 4, 2016 +g7.css 420 Jul 4, 2016 +idlerpg.png 420 Jul 4, 2016 diff --git a/irpg/idlerpg-adv.txt b/irpg-web/idlerpg-adv.txt similarity index 100% rename from irpg/idlerpg-adv.txt rename to irpg-web/idlerpg-adv.txt diff --git a/irpg-web/idlerpg.png b/irpg-web/idlerpg.png new file mode 100644 index 0000000..d250b0a Binary files /dev/null and b/irpg-web/idlerpg.png differ diff --git a/irpg-web/idlerpg_000000.png b/irpg-web/idlerpg_000000.png new file mode 100644 index 0000000..d250b0a Binary files /dev/null and b/irpg-web/idlerpg_000000.png differ diff --git a/irpg-web/idlerpg_025D30.png b/irpg-web/idlerpg_025D30.png new file mode 100644 index 0000000..e9321ff Binary files /dev/null and b/irpg-web/idlerpg_025D30.png differ diff --git a/irpg-web/idlerpg_ff0000.png b/irpg-web/idlerpg_ff0000.png new file mode 100644 index 0000000..8b278ce Binary files /dev/null and b/irpg-web/idlerpg_ff0000.png differ diff --git a/irpg/index.php b/irpg-web/index.php similarity index 79% rename from irpg/index.php rename to irpg-web/index.php index 4ec015e..c44dfce 100644 --- a/irpg/index.php +++ b/irpg-web/index.php @@ -1,93 +1,72 @@ -

Game Info

-

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.

-

Location

-

- The Idle RPG can be played on the - SlashNET IRC Network in the - channel #G7. See this - link for a list of servers. -

- +

Idle RPG

-

Registering

- +

Game Info

+

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.

+ +

Location

+

The Idle RPG can be played on the + + in the channel + . +

+ +

Registering

To register, simply:

- - - /msg REGISTER <char name> <password> + + /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

- +

Logging In

To login, simply:

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

This is a p0 (see Penalties) command.

- -

Logging Out

- +

Logging Out

To logout, simply:

- - - /msg LOGOUT - - + + /msg LOGOUT +

This is a p20 (see Penalties) command.

- -

Changing Your Password

- +

Changing Your Password

To change your password, simply:

- - - /msg NEWPASS <new password> - - + + /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

- +

Removing Your Account

To remove your account, simply:

- - - /msg REMOVEME - - + + /msg REMOVEME +

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

- -

Changing Your Alignment

- +

Changing Your Alignment

To change your alignment, simply:

- - - /msg ALIGN <good|neutral|evil> - - + + /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 @@ -105,73 +84,54 @@ 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

- + + + +

Obtaining Bot Info

To see some simple information on the bot, simply:

- - - /msg INFO - - + + /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

- +

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) - +

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)) - +

(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

- +

Checking the Active Quest

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

- - - /msg QUEST - - + + /msg QUEST +

This is a p0 (see Penalties) command.

- -

Checking Your Online Status

- +

Checking Your Online Status

To see whether you are logged on, simply:

- - - /msg WHOAMI - - + + /msg WHOAMI +

This is a p0 (see Penalties) command.

- -

Penalties

+ - +

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:

- @@ -208,10 +168,8 @@

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

- +

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, @@ -223,82 +181,59 @@ 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 - - +

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

- +

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:

- -

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 - - +

((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 - - +

((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

- + + + +

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:

@@ -358,34 +293,28 @@
Nick change 1 / 40
- -

The Hand of God

- + +

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

- + + +

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 - +

((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

- +

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, @@ -393,34 +322,24 @@ 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

- +

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

- +

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

- +

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, @@ -433,48 +352,50 @@ 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

- + + + +

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

- + + + +

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

- +

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. +

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. + ChangeLog.

- - +

Source

+

The new source code, + modified, released and maintained by TommySalami

+

based on

+

The old source code, + originally written and released in 2004 by jotun, jotun@idlerpg.net, et al.

+ diff --git a/irpg/makemap.php b/irpg-web/makemap.php similarity index 95% rename from irpg/makemap.php rename to irpg-web/makemap.php index d5ace6a..d2b180d 100644 --- a/irpg/makemap.php +++ b/irpg-web/makemap.php @@ -1,20 +1,19 @@ - 0) { // $rgb is 0 on our parchment-colored areas @@ -54,6 +52,7 @@ // 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/irpg/makequestmap.php b/irpg-web/makequestmap.php similarity index 93% rename from irpg/makequestmap.php rename to irpg-web/makequestmap.php index 50bf488..c7342f5 100644 --- a/irpg/makequestmap.php +++ b/irpg-web/makequestmap.php @@ -1,15 +1,15 @@ - -

Players

Pick a player to view

[gray=offline]

@@ -15,23 +15,20 @@ usort($file, 'cmp_level_desc'); foreach ($file as $line) { list($user,,,$level,$class,$secs,,,$online) = explode("\t",trim($line)); - $class = htmlentities($class); $next_level = duration($secs); - - print " ".htmlentities($user). - ", the level $level $class. Next level in $next_level.\n"; - + echo " ".htmlentities($user). + ", the level $level $class. Next level in $next_level.\n"; } ?> -

For a script to view player stats from a terminal, try this perl script by +

For a script to view player stats from a terminal, try + this perl script by daxxar.

-

See player stats in table format.

- - + diff --git a/irpg/playerview.php b/irpg-web/playerview.php similarity index 93% rename from irpg/playerview.php rename to irpg-web/playerview.php index ca201f3..afc4431 100644 --- a/irpg/playerview.php +++ b/irpg-web/playerview.php @@ -1,18 +1,15 @@ Player Info"; $file = fopen($irpg_db,"r"); fgets($file,1024); // skip top comment @@ -101,7 +98,6 @@ "

". "

Penalties

\n". "

\n"; - ksort($pen); $sum = 0; foreach ($pen as $key => $val) { @@ -109,7 +105,6 @@ $sum += $val; } echo "
\n total: ".duration($sum)."

\n"; - $file = fopen($irpg_mod,"r"); $temp = array(); while ($line=fgets($file,1024)) { @@ -124,9 +119,9 @@ } fclose($file); if (!is_null($temp) && count($temp)) { - echo('

'); + echo "

"; echo $_GET['allmods']!=1?"Recent ":""; - echo('Character Modifiers

'); + echo "Character Modifiers

"; if ($_GET['allmods'] == 1 || count($temp) < 6) { foreach ($temp as $line) { $line=htmlentities(trim($line)); @@ -144,13 +139,10 @@ } } if ($_GET['allmods'] != 1 && count($temp) > 5) { -?> -
- [View all Character Modifiers ()] -

-\n". + " [View all Character Modifiers (".count($temp).")]\n". + "

\n"; } } include("footer.php"); ?> - diff --git a/irpg/quest.php b/irpg-web/quest.php similarity index 99% rename from irpg/quest.php rename to irpg-web/quest.php index e6aab1a..9429505 100644 --- a/irpg/quest.php +++ b/irpg-web/quest.php @@ -1,9 +1,10 @@ Current Quest\n"; - include("commonfunctions.php"); $file = fopen($irpg_qfile,"r"); $type=0; while ($line=fgets($file,1024)) { diff --git a/irpg-web/rw.css b/irpg-web/rw.css new file mode 100644 index 0000000..8384fcf --- /dev/null +++ b/irpg-web/rw.css @@ -0,0 +1,117 @@ +body { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + background-color: #202020; + background-image: url(wall.gif); + color: #c0c0c0; + 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: #FF4040; } +a:hover { text-decoration: underline; color: #FF8080; } + +div.head { + border: 1px solid #c0c0c0; + text-align: left; + width: 100%; + margin-bottom: 10px; + background: #151515; +} + +div.menu { + width: 120px; + position: relative; + float: left; + border: 1px solid #c0c0c0; + background: #151515; +} +div#menu a.home { color: #c0c0c0; background: #202020; border: 1px solid #c0c0c0; } +div#menu a.home:hover { background: #202020; border: 1px solid #c0c0c0; } +div#menu a { + text-align: center; + width: 118px; + margin: 0px; + display: block; + border: 1px solid #c0c0c0 +} + +div#menu a:hover { border: 1px solid #c0c0c0; background: #202020; text-decoration: none; } + +div.content { + border: 1px solid #c0c0c0; + margin-left: 130px; + margin-top: 0px; + padding: 10px; + background: #202020; +} + +div.footer { + border: 1px solid #c0c0c0; + margin-left: 130px; + margin-top: 10px; + padding: 10px; + background: #202020; + text-align: center +} + + +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: #202020; +} +.smallest { + font-size: 11px; +} + +table th { +white-space: nowrap; +} \ No newline at end of file diff --git a/irpg/tablegrad.gif b/irpg-web/tablegrad.gif similarity index 100% rename from irpg/tablegrad.gif rename to irpg-web/tablegrad.gif diff --git a/irpg/up.png b/irpg-web/up.png similarity index 100% rename from irpg/up.png rename to irpg-web/up.png diff --git a/irpg-web/wall.gif b/irpg-web/wall.gif new file mode 100644 index 0000000..645aba4 Binary files /dev/null and b/irpg-web/wall.gif differ diff --git a/irpg/worldmap.php b/irpg-web/worldmap.php similarity index 77% rename from irpg/worldmap.php rename to irpg-web/worldmap.php index 33e5b6b..e53f599 100644 --- a/irpg/worldmap.php +++ b/irpg-web/worldmap.php @@ -1,6 +1,7 @@ - @@ -11,12 +12,12 @@
IdleRPG World Map -\n"; } fclose($file); @@ -24,4 +25,6 @@
- + diff --git a/irpg/xml.php b/irpg-web/xml.php similarity index 72% rename from irpg/xml.php rename to irpg-web/xml.php index 4fbc158..cf0c901 100644 --- a/irpg/xml.php +++ b/irpg-web/xml.php @@ -1,20 +1,14 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/irpg/contact.php b/irpg/contact.php deleted file mode 100644 index bc29914..0000000 --- a/irpg/contact.php +++ /dev/null @@ -1,47 +0,0 @@ -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/irpg/footer.php b/irpg/footer.php deleted file mode 100644 index c7a33bb..0000000 --- a/irpg/footer.php +++ /dev/null @@ -1,35 +0,0 @@ -
- - - diff --git a/irpg/header.php b/irpg/header.php deleted file mode 100644 index 8b05113..0000000 --- a/irpg/header.php +++ /dev/null @@ -1,47 +0,0 @@ - - - - - <?echo $irpg_chan;?> Idle RPG: <?echo $irpg_page_title;?> - - - - - - - -
-'); -?> -
- - - -
diff --git a/irpg/hits.db b/irpg/hits.db deleted file mode 100644 index f05175c..0000000 --- a/irpg/hits.db +++ /dev/null @@ -1,16 +0,0 @@ -contact.php 3992 Apr 22, 2003 -db.php 5869 Jun 13, 2003 -index.php 66845 Apr 22, 2003 -playerview.php 144029 Apr 5, 2004 -players.php 51366 Apr 5, 2004 -source.php 13036 Apr 5, 2004 -sitesource.php 7956 Apr 5, 2004 -others.php 13649 Apr 5, 2004 -donate.php 1333 Apr 5, 2004 -donated.php 4 Apr 6, 2004 -forum.php 1799 Jul 13, 2004 -quest.php 242 Jul 13, 2004 -worldmap.php 235 Jul 13, 2004 -1 Jul 15, 2004 -g7.css 1 Jul 15, 2004 -idlerpg.png 1 Jul 15, 2004 diff --git a/screenshot1.png b/screenshot1.png new file mode 100644 index 0000000..a04967f Binary files /dev/null and b/screenshot1.png differ diff --git a/screenshot2.png b/screenshot2.png new file mode 100644 index 0000000..019bd25 Binary files /dev/null and b/screenshot2.png differ