This commit is contained in:
2025-09-15 16:30:24 -06:00
parent a4ff18076a
commit 6e23de8f12
61 changed files with 1103 additions and 687 deletions

14
CHANGELOG.md Normal file
View File

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

127
CODE_OF_CONDUCT.md Normal file
View File

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

23
CONTRIBUTING.md Normal file
View File

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

2
ISSUES.md Normal file
View File

@@ -0,0 +1,2 @@
### Issues
All issues, bugs and features are tracked using GitEmAll

View File

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

37
LICENSE Normal file
View File

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

57
README.md Normal file
View File

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

2
TODO.md Normal file
View File

@@ -0,0 +1,2 @@
### ToDo
All ToDo lists and milestones are tracked using GitEmAll

View File

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

View File

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

View File

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

30
irpg-bot/INSTALL.txt Normal file
View File

@@ -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! :^)

View File

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

6
irpg-release/App.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3C3C4730-9D32-418C-BFDC-CE89148AA6CA}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<ReleaseName>IdleRPG</ReleaseName>
<ReleaseVersion>0.0.2</ReleaseVersion>
<ReleaseBotSourceName>IdleRPG-Bot</ReleaseBotSourceName>
<ReleaseWebSourceName>IdleRPG-Web</ReleaseWebSourceName>
<ReleaseSolutionSourceName>IdleRPG-Source</ReleaseSolutionSourceName>
<BotSourcePath>$(OutputPath)Bot\</BotSourcePath>
<WebSourcePath>$(OutputPath)Web\</WebSourcePath>
<SolutionSourcePath>$(OutputPath)Source\</SolutionSourcePath>
<ReleasesPath>$(OutputPath)Releases\</ReleasesPath>
</PropertyGroup>
<Target Name="Build">
<CallTarget Targets="Clean" />
<CallTarget Targets="CreateBotSourceFiles" />
<CallTarget Targets="CreateWebSourceFiles" />
<CallTarget Targets="CreateSolutionSourceFiles" />
<CallTarget Targets="CreateReleasesFiles" />
</Target>
<Target Name="Clean">
<RemoveDir Directories="$(BotSourcePath)" />
<MakeDir Directories="$(BotSourcePath)" />
<RemoveDir Directories="$(WebSourcePath)" />
<MakeDir Directories="$(WebSourcePath)" />
<RemoveDir Directories="$(SolutionSourcePath)" />
<MakeDir Directories="$(SolutionSourcePath)" />
<RemoveDir Directories="$(ReleasesPath)" />
<MakeDir Directories="$(ReleasesPath)" />
</Target>
<Target Name="CreateBotSourceFiles">
<ItemGroup>
<MyBotSourceFiles Include="$(SolutionDir)irpg-bot\**\*;$(SolutionDir)README.md;$(SolutionDir)CHANGELOG.md;" />
</ItemGroup>
<Copy SourceFiles="@(MyBotSourceFiles)" DestinationFiles="@(MyBotSourceFiles->'$(BotSourcePath)%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CreateWebSourceFiles">
<ItemGroup>
<MyWebSourceFiles Include="$(SolutionDir)irpg-web\**\*;$(SolutionDir)README.md;$(SolutionDir)CHANGELOG.md;" />
</ItemGroup>
<Copy SourceFiles="@(MyWebSourceFiles)" DestinationFiles="@(MyWebSourceFiles->'$(WebSourcePath)%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CreateSolutionSourceFiles">
<ItemGroup>
<MySolutionSourceFiles Include="$(SolutionDir)**\*;" Exclude="$(SolutionDir)**\obj\**\*;$(SolutionDir)**\bin\**\*;$(SolutionDir)**\misc\**\*;$(SolutionDir)**\packages\**\*;$(SolutionDir)**\.git\**\*;$(SolutionDir)**\.vs\**\*;" />
</ItemGroup>
<Copy SourceFiles="@(MySolutionSourceFiles)" DestinationFiles="@(MySolutionSourceFiles->'$(SolutionSourcePath)\%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CreateReleasesFiles">
<Delete Files="$(ReleasesPath)$(ReleaseBotSourceName).$(ReleaseVersion).zip" />
<ZipDirectory SourceDirectory="$(BotSourcePath)" DestinationFile="$(ReleasesPath)$(ReleaseBotSourceName).$(ReleaseVersion).zip" />
<Delete Files="$(ReleasesPath)$(ReleaseWebSourceName).$(ReleaseVersion).zip" />
<ZipDirectory SourceDirectory="$(WebSourcePath)" DestinationFile="$(ReleasesPath)$(ReleaseWebSourceName).$(ReleaseVersion).zip" />
<Delete Files="$(ReleasesPath)$(ReleaseSolutionSourceName).$(ReleaseVersion).zip" />
<ZipDirectory SourceDirectory="$(SolutionSourcePath)" DestinationFile="$(ReleasesPath)$(ReleaseSolutionSourceName).$(ReleaseVersion).zip" />
</Target>
</Project>

View File

@@ -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 :^)

48
irpg-web/INSTALL.txt Normal file
View File

@@ -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! :^)

View File

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

61
irpg-web/config.php Normal file
View File

@@ -0,0 +1,61 @@
<?php
// admin nick
$admin_nick="admin";
// admin email
$admin_email="admin@mynet.org";
// your game's bot nickname
$irpg_bot="IdleBot";
// your game's server to connect to
$irpg_network="irc.mynet.org:7000";
// your game's channel
$irpg_chan="#IdleRPG";
// your server's network name advertisement
$irpg_irc_network_name="MyNet IRC Network";
// your server's network address advertisement
$irpg_irc_network_address="ircs://irc.mynet.org:7000";
// base directory of your game's url
// my site is https://www.mynet.org/irpg/, so it's "/irpg/"
$irpg_base_dir="/irpg/";
// url of your forum site
$irpg_forum_url="https://www.mynet.org/";
// type of site email disabled/smtp/php
$irpg_site_email="disabled";
// full or relative pathname to the DBs:
// character database
$irpg_db="/home/user/private/idlerpg/irpg.db";
// time modifiers file
$irpg_mod="/home/user/private/idlerpg/modifiers.txt";
// active quest info file
$irpg_qfile="/home/user/private/idlerpg/questinfo.txt";
// image to use for the top logo
$irpg_logo="idlerpg_ff0000.png";
// stylesheet to use g7/rw
$irpg_stylesheet = "rw.css";
// width-wise dimension of your map file
// this does not appear to be used anywhere in the web
// it appears that all PHP map files use 500,500 images,
// regardless of what you set here
$irpg_mapx=500;
// length-wise dimension of your map file
// this does not appear to be used anywhere in the web
// it appears that all PHP map files use 500,500 images,
// regardless of what you set here
$irpg_mapy=500;
?>

55
irpg-web/contact.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
include("config.php");
$irpg_page_title = "Contact";
$irpg_page_desc = "IdleRPG Contact";
include("header.php");
echo "<h1>Contact</h1>";
if (!$irpg_site_email) {
echo " <blockquote>Config error. The config file was not loaded correctly.</blockquote>\n";
}
else if ($irpg_site_email == "disabled") {
echo " <blockquote>Email is disabled.</blockquote>\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 " <blockquote>Thanks for your submission.</blockquote>\n";
}
else if ($irpg_site_email == "smtp" && $_POST['from'] && $_POST['text']) {
echo " <blockquote>SMTP Email is under construction. Your submission was not submitted.</blockquote>\n";
}
else {
echo " <form method=\"post\" action=\"contact.php\">\n".
" <table border=\"0\">\n".
" <tr>\n".
" <th align=\"left\"><label for=\"from\">Your e-mail address</label>:</th>\n".
" <td align=\"right\">\n".
" <input type=\"text\" size=\"20\" maxlength=\"50\" name=\"from\" id=\"from\" />\n".
" </td>\n".
" </tr>\n".
" <tr>\n".
" <th align=\"left\"><label for=\"name\">Your name</label>:</th>\n".
" <td align=\"right\">\n".
" <input type=\"text\" size=\"20\" maxlength=\"50\" name=\"name\" id=\"name\" />\n".
" </td>\n".
" </tr>\n".
" <tr>\n".
" <td colspan=\"2\">\n".
" <textarea name=\"text\" rows=\"6\" cols=\"44\"></textarea><br />\n".
" </td>\n".
" </tr>\n".
" <tr>\n".
" <td colspan=\"2\" align=\"right\">\n".
" <input type=\"submit\" value=\"Send\" />\n".
" </td>\n".
" </tr>\n".
" </table>\n".
" </form>\n";
}
include("footer.php");
?>

View File

@@ -1,12 +1,9 @@
<?php
include("config.php");
$irpg_page_title = "DB-style Player Listing";
include("header.php");
include("commonfunctions.php");
$irpg_page_title = "DB-style Player Listing";
$irpg_page_desc = "IdleRPG DB-style Player Listing";
include("header.php");
$file = file($irpg_db);
unset($file[0]);
@@ -37,7 +34,7 @@
($_GET['sort'] != "cmp_sum_desc"))) $_GET['sort'] = "cmp_level_desc";
usort($file,$_GET['sort']);
?>
<table border=1 cellpadding=2 cellspacing=2 cols="32" rows="<?php print count($file); ?>">
<table border=1 cellpadding=2 cellspacing=2 cols="32" rows="<?php echo count($file); ?>">
<tr>
<th NOWRAP>
User
@@ -248,10 +245,9 @@
" </tr>\n";
}
echo('
</table>
<br><br>
* Accounts created before Aug 29, 2003 may have incowrect data fields.
');
echo " </table>\n".
" <br><br>\n".
" * Accounts created before Aug 29, 2003 may have incorrect data fields.\n";
include("footer.php");
?>

View File

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 86 B

View File

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

39
irpg-web/footer.php Normal file
View File

@@ -0,0 +1,39 @@
</div>
<div class="footer">
<p class="small">
Questions? Comments? Suggestions? Bugs? Naked pics?
<?php
if ($irpg_site_email != null && $irpg_site_email != "disabled") {
echo " <a href=\"contact.php\">$admin_email</a> or\n";
}
echo " ".$admin_nick."@IRC.\n";
?>
<?php
$hits = file("hits.db");
$fp = fopen("hits.db", "w");
$thispage = explode("/",$_SERVER['PHP_SELF']);
$thispage = array_pop($thispage);
if ($fp == false) {
echo " Error: could not open file hits.db.";
}
foreach ($hits as $line) {
list($page,$numhits,$date) = explode("\t",trim($line));
if ($page == $thispage) {
++$numhits;
echo " $numhits hits since $date\n";
$found = 1;
}
if ($fp) {
fwrite($fp,"$page\t$numhits\t$date\n");
}
}
if (!$found && $fp) {
echo " 1 hit since ".date("M j, Y",time())."\n";
fwrite($fp,$thispage."\t1\t".date("M j, Y",time())."\n");
}
fclose($fp);
?>
</p>
</div>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

44
irpg-web/header.php Normal file
View File

@@ -0,0 +1,44 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title><?php echo $irpg_page_title; ?> :: <?php echo $irpg_chan; ?></title>
<meta name="description" content="<?php echo $irpg_page_desc; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo $irpg_stylesheet; ?>" />
</head>
<body>
<div class="head">
<?php
echo " <img src=\"$irpg_logo\" alt=\"$irpg_chan\" title=\"$irpg_chan\" width=\"400\" height=\"56\" />\n";
?>
</div>
<div id="menu" class="menu">
<?php
$topbarurl = array(
'Game Info' => $irpg_base_dir . 'index.php',
'Player Info' => $irpg_base_dir . 'players.php',
'World Map' => $irpg_base_dir . 'worldmap.php',
'Quest Info' => $irpg_base_dir . 'quest.php',
);
if ($irpg_site_email && $irpg_site_email != "disabled") {
$topbarurl['Contact'] = $irpg_base_dir . 'contact.php';
}
if ($irpg_forum_url) {
$topbarurl['Forum'] = $irpg_forum_url;
}
foreach ($topbarurl as $key => $value) {
if ($value == $_SERVER['PHP_SELF']) {
echo " <a class=\"home\" href=\"$value\">$key</a>\n";
}
else {
echo " <a href=\"$value\">$key</a>\n";
}
}
?>
</div>
<div class="content">

10
irpg-web/hits.db Normal file
View File

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

BIN
irpg-web/idlerpg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
irpg-web/idlerpg_000000.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
irpg-web/idlerpg_025D30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
irpg-web/idlerpg_ff0000.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -1,93 +1,72 @@
<?php
include("config.php");
$irpg_page_title = "Game Info";
$irpg_page_desc = "IdleRPG Game Info";
include("header.php");
?>
<h1>Game Info</h1>
<p>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.</p>
<h2>Location</h2>
<p>
The Idle RPG can be played on the
<a href="http://www.slashnet.org/">SlashNET IRC Network</a> in the
channel #G7. See <a href="http://www.slashnet.org/servers/">this</a>
link for a list of servers.
</p>
<h1>Idle RPG</h1>
<h2>Registering</h2>
<h2>Game Info</h2>
<p>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.</p>
<h2>Location</h2>
<p>The Idle RPG can be played on the
<a href="<?php echo $irpg_irc_network_address; ?>"><?php echo $irpg_irc_network_name; ?></a>
in the channel
<a href="<?php echo $irpg_irc_network_address; ?>/<?php echo $irpg_chan; ?>"><?php echo $irpg_chan; ?></a>.
</p>
<h2>Registering</h2>
<p>To register, simply:</p>
<code>
/msg <?echo $irpg_bot;?> REGISTER &lt;char name&gt; &lt;password&gt;
<code>
/msg <?php echo $irpg_bot; ?> REGISTER &lt;char name&gt; &lt;password&gt;
&lt;char class&gt;
</code>
</code>
<p>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.</p>
<h2>Logging In</h2>
<h2>Logging In</h2>
<p>To login, simply:</p>
<code>
/msg <?echo $irpg_bot;?> LOGIN &lt;char name&gt; &lt;password&gt;
</code>
<code>
/msg <?php echo $irpg_bot; ?> LOGIN &lt;char name&gt; &lt;password&gt;
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command.</p>
<h2>Logging Out</h2>
<h2>Logging Out</h2>
<p>To logout, simply:</p>
<code>
/msg <?echo $irpg_bot;?> LOGOUT
</code>
<code>
/msg <?php echo $irpg_bot; ?> LOGOUT
</code>
<p>This is a p20 (see <a href="#penalties">Penalties</a>) command.</p>
<h2>Changing Your Password</h2>
<h2>Changing Your Password</h2>
<p>To change your password, simply:</p>
<code>
/msg <?echo $irpg_bot;?> NEWPASS &lt;new password&gt;
</code>
<code>
/msg <?php echo $irpg_bot; ?> NEWPASS &lt;new password&gt;
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command.</p>
<p>If you have forgotten your password, please use the <a href="#info">
INFO</a> 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.</p>
<h2>Removing Your Account</h2>
<h2>Removing Your Account</h2>
<p>To remove your account, simply:</p>
<code>
/msg <?echo $irpg_bot;?> REMOVEME
</code>
<code>
/msg <?php echo $irpg_bot; ?> REMOVEME
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command :^)</p>
<h2>Changing Your Alignment</h2>
<h2>Changing Your Alignment</h2>
<p>To change your alignment, simply:</p>
<code>
/msg <?echo $irpg_bot;?> ALIGN &lt;good|neutral|evil&gt;
</code>
<code>
/msg <?php echo $irpg_bot; ?> ALIGN &lt;good|neutral|evil&gt;
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command.</p>
<p>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.</p>
<p>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.</p>
<a name="info"></a><h2>Obtaining Bot Info</h2>
<a name="info"></a>
<h2>Obtaining Bot Info</h2>
<p>To see some simple information on the bot, simply:</p>
<code>
/msg <?echo $irpg_bot;?> INFO
</code>
<code>
/msg <?php echo $irpg_bot; ?> INFO
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command.</p>
<p>This command gives info such as to which server the bot is connected
and the nicknames of online bot admins.</p>
<p>This command is optional, and may be disabled by your bot admin.</p>
<h2>Levelling</h2>
<h2>Levelling</h2>
<p>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:</p>
600*(1.16^YOUR_LEVEL)
<p>600*(1.16^YOUR_LEVEL)</p>
<p>Where ^ represents the exponentiation operator.</p>
<p>Very high levels are calculated differently as of version 3.0. Levels
after level 60 have a next time to level of:</p>
(time to level @ 60) + ((1 day) * (level - 60))
<p>(time to level @ 60) + ((1 day) * (level - 60))</p>
<p>The exponent method code had simply gotten to that point that levels
were taking too long to complete.</p>
<h2>Checking the Active Quest</h2>
<h2>Checking the Active Quest</h2>
<p>To see the active quest, its users, and its time left to
completion:</p>
<code>
/msg <?echo $irpg_bot;?> QUEST
</code>
<code>
/msg <?php echo $irpg_bot; ?> QUEST
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command.</p>
<h2>Checking Your Online Status</h2>
<h2>Checking Your Online Status</h2>
<p>To see whether you are logged on, simply:</p>
<code>
/msg <?echo $irpg_bot;?> WHOAMI
</code>
<code>
/msg <?php echo $irpg_bot; ?> WHOAMI
</code>
<p>This is a p0 (see <a href="#penalties">Penalties</a>) command.</p>
<a name="penalties"></a><h2>Penalties</h2>
<a name="penalties"></a>
<h2>Penalties</h2>
<p>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:</p>
<table id="penalty" class="penalty">
<tr>
<th>Nick change</th>
@@ -208,10 +168,8 @@
<p>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].</p>
<h2>Items</h2>
<h2>Items</h2>
<p>Each time you level, you find an item. You can find an item as
high as 1.5*YOUR_LEVEL (unless you find a <a href="#uniqueitems">
unique item</a>). 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
<a href="players.php">here</a>.</p>
<p>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:</p>
for each 'number' from 1 to YOUR_LEVEL*1.5<br />
&nbsp;&nbsp;you have a 1 / ((1.4)^number) chance to find an
item at this level<br />
end for
<p>for each 'number' from 1 to YOUR_LEVEL*1.5<br />
&nbsp;&nbsp;you have a 1 / ((1.4)^number) chance to find an
item at this level<br />
end for<p>
<p>As for item type, you have an equal chance to roll any type.</p>
<h2>Battle</h2>
<h2>Battle</h2>
<p>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:</p>
<ul>
<li>Your item levels are summed.</li>
<li>Their item levels are summed.</li>
<li>A random number between zero and your sum is taken.</li>
<li>A random number between zero and their sum is taken.</li>
<li>If your roll is larger than theirs, you win.</li>
<li>Your item levels are summed.</li>
<li>Their item levels are summed.</li>
<li>A random number between zero and your sum is taken.</li>
<li>A random number between zero and their sum is taken.</li>
<li>If your roll is larger than theirs, you win.</li>
</ul>
<p>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:</p>
((the larger number of (OPPONENT_LEVEL/4) and 7) / 100) *
YOUR_NEXT_TIME_TO_LEVEL
<p>((the larger number of (OPPONENT_LEVEL/4) and 7) / 100) *
YOUR_NEXT_TIME_TO_LEVEL</p>
<p>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
<a href="#critstrike">Critical Strike</a>.</p>
<p>If you lose, you will be penalized time. The penalty is calculated
using the formula:</p>
((the larger number of (OPPONENT_LEVEL/7) and 7) / 100) *
YOUR_NEXT_TIME_TO_LEVEL
<p>((the larger number of (OPPONENT_LEVEL/7) and 7) / 100) *
YOUR_NEXT_TIME_TO_LEVEL</p>
<p>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.</p>
<p>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%.</p>
<p>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.</p>
<p>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 <a href="#grid">here</a>.</p>
<p>Also as of version 3.0, a successful battle may result an item being
<a href="#stealing">stolen</a>.</p>
<a name="uniqueitems"></a><h2>Unique Items</h2>
<a name="uniqueitems"></a>
<h2>Unique Items</h2>
<p>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:</p>
@@ -358,34 +293,28 @@
<td>1 / 40</td>
</tr>
</table>
<h2>The Hand of God</h2>
<h2>The Hand of God</h2>
<p>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.</p>
<p>In addition to occurring randomly, admins may summon the HoG at their
whim.</p>
<a name="critstrike"></a><h2>Critical Strike</h2>
<a name="critstrike"></a>
<h2>Critical Strike</h2>
<p>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:</p>
((random number from 5 to 25) / 100) * OPPONENT'S_NEXT_TIME_TO_LEVEL
<p>((random number from 5 to 25) / 100) * OPPONENT'S_NEXT_TIME_TO_LEVEL</p>
<p>Meaning he gains no less than 5% and no more than 25% of his next time
to level.</p>
<h2>Team Battles</h2>
<h2>Team Battles</h2>
<p>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.</p>
<h2>Calamities</h2>
<h2>Calamities</h2>
<p>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:<br />
a) slows a player 5-12% of their next time to level<br />
b) lowers one of their item's value by 10%
</p>
<h2>Godsends</h2>
<h2>Godsends</h2>
<p>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:<br />
a) accelerates a player 5-12% of their next time to level<br />
b) increases one of their item's value by 10%
</p>
<h2>Quests</h2>
<h2>Quests</h2>
<p>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.</p>
<a name="grid"></a><h2>Grid System</h2>
<a name="grid"></a>
<h2>Grid System</h2>
<p>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.</p>
<p>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!).</p>
<a name="stealing"></a><h2>Item Stealing</h2>
<a name="stealing"></a>
<h2>Item Stealing</h2>
<p>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.
</p>
<h2>Credits</h2>
<h2>Credits</h2>
<p>Many thanks to version 3.0's map creators, res0 and Jeb! The game
wouldn't be the same without you.</p>
<p>
The IRPG would not be possible without help from a lot of people.
<p>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
<a href="http://idlerpg.net/ChangeLog.txt">ChangeLog</a>.
ChangeLog.
</p>
<?include("footer.php");?>
<h2>Source</h2>
<p><a href="https://gitemall.devemall.int.eu.org/TommySalami/IdleRPG">The new source code</a>,
modified, released and maintained by TommySalami</p>
<p>based on</p>
<p><a href="http://idlerpg.net/">The old source code</a>,
originally written and released in 2004 by jotun, jotun@idlerpg.net, et al.</p>
<?php
include("footer.php");
?>

View File

@@ -1,20 +1,19 @@
<?
<?php
include("config.php");
session_start(); // sessions to generate only one map / person / 20s
// use sessions to generate only one map / person / 20s
session_start();
if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) {
header("Location: maperror.png");
exit(0);
}
$_SESSION['time']=time();
$map = imageCreate(500,500);
$user = substr($_GET['player'],0,30);
$stringx=$stringy=-1;
$file = file($irpg_db);
unset($file[0]);
foreach ($file as $line) {
list($username,,,,,,,,,,$x,$y) = explode("\t",trim($line));
if ($username == $user) {
@@ -39,7 +38,6 @@
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
@@ -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);

View File

@@ -1,15 +1,15 @@
<?
<?php
include("config.php");
$file = fopen($irpg_db,"r");
fgets($file,1024);
session_start(); // sessions to generate only one map / person / 20s
// use sessions to generate only one map / person / 20s
session_start();
if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) {
header("Location: maperror.png");
exit(0);
}
$_SESSION['time']=time();
$file = fopen($irpg_qfile,"r");
$file = fopen($irpg_qfile,"r");
$type=0;
while ($line=fgets($file,1024)) {
$arg = explode(" ",trim($line));

View File

@@ -1,15 +1,16 @@
<?
<?php
include("config.php");
$file = fopen($irpg_db,"r");
fgets($file);
session_start(); // sessions to generate only one map / person / 20s
// use sessions to generate only one map / person / 20s
session_start();
if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) {
header("Location: maperror.png");
exit(0);
}
$_SESSION['time']=time();
$file = fopen($irpg_db,"r");
fgets($file);
$map = imageCreate(500,500);
$magenta = ImageColorAllocate($map, 255, 0, 255);
$blue = imageColorAllocate($map, 0, 128, 255);
@@ -20,6 +21,7 @@
if ($online == 1) imageFilledEllipse($map, $x, $y, 3, 3, $blue);
else imageFilledEllipse($map, $x, $y, 3, 3, $red);
}
header("Content-type: image/png");
imagePNG($map);
imageDestroy($map);

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,10 +1,10 @@
<?
<?php
include("config.php");
include("commonfunctions.php");
$irpg_page_title = "Player Info";
$irpg_page_title = "Players";
$irpg_page_desc = "IdleRPG Players";
include("header.php");
?>
<h1>Players</h1>
<h2>Pick a player to view</h2>
<p class="small">[gray=offline]</p>
@@ -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 " <li".(!$online?" class=\"offline\"":"")."><a".
(!$online?" class=\"offline\"":"").
" href=\"playerview.php?player=".urlencode($user).
"\">".htmlentities($user).
"</a>, the level $level $class. Next level in $next_level.</li>\n";
echo " <li".(!$online?" class=\"offline\"":"")."><a".
(!$online?" class=\"offline\"":"").
" href=\"playerview.php?player=".urlencode($user).
"\">".htmlentities($user).
"</a>, the level $level $class. Next level in $next_level.</li>\n";
}
?>
</ol>
<p>For a script to view player stats from a terminal, try <a
href="idlerpg-adv.txt">this</a> perl script by
<p>For a script to view player stats from a terminal, try
<a href="idlerpg-adv.txt">this</a> perl script by
<a href="mailto:daxxar@mental.mine.nu">daxxar</a>.</p>
<p>See player stats in <a href="db.php">table format</a>.</p>
<?include("footer.php")?>
<?php
include("footer.php");
?>

View File

@@ -1,18 +1,15 @@
<?php
include("config.php");
$_GET['player'] = substr($_GET['player'],0,30);
/* Determine if a Player was entered. If not, redirect. */
if ($_GET['player']=="") header('Location: http://'.$_SERVER['SERVER_NAME'].
($_SERVER['SERVER_PORT']!=80?':'.$_SERVER['SERVER_PORT']:'').$BASEURL.
'players.php');
$_GET['player'] = substr($_GET['player'],0,30);
if ($_GET['player']=="") header('Location: '.$irpg_base_dir.'players.php');
$irpg_page_title = "Player Info: " . htmlentities($_GET['player']);
$showmap = $_GET['showmap'];
include("header.php");
include("commonfunctions.php");
$irpg_page_title = "Player Info: " . htmlentities($_GET['player']);
$irpg_page_desc = "IdleRPG Player Info";
$showmap = $_GET['showmap'];
include("header.php");
echo "<h1>Player Info</h1>";
$file = fopen($irpg_db,"r");
fgets($file,1024); // skip top comment
@@ -101,7 +98,6 @@
" </p>".
" <h2>Penalties</h2>\n".
" <p>\n";
ksort($pen);
$sum = 0;
foreach ($pen as $key => $val) {
@@ -109,7 +105,6 @@
$sum += $val;
}
echo " <br />\n total: ".duration($sum)."</p>\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('<h2>');
echo "<h2>";
echo $_GET['allmods']!=1?"Recent ":"";
echo('Character Modifiers</h2><p>');
echo "Character Modifiers</h2><p>";
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) {
?>
<br />
[<a href="<?php echo $_SERVER['PHP_SELF']."?player=".urlencode($user);?>&amp;allmods=1">View all Character Modifiers</a> (<?=count($temp)?>)]
</p>
<?php
echo " <br />\n".
" [<a href=\"".$_SERVER['PHP_SELF']."?player=".urlencode($user)."&amp;allmods=1\">View all Character Modifiers</a> (".count($temp).")]\n".
" </p>\n";
}
}
include("footer.php");
?>

View File

@@ -1,9 +1,10 @@
<?php
include("config.php");
include("commonfunctions.php");
$irpg_page_title = "Quest Info";
$irpg_page_desc = "IdleRPG Quest Info";
include("header.php");
echo " <h1>Current Quest</h1>\n";
include("commonfunctions.php");
$file = fopen($irpg_qfile,"r");
$type=0;
while ($line=fgets($file,1024)) {

117
irpg-web/rw.css Normal file
View File

@@ -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;
}

View File

Before

Width:  |  Height:  |  Size: 829 B

After

Width:  |  Height:  |  Size: 829 B

View File

Before

Width:  |  Height:  |  Size: 88 B

After

Width:  |  Height:  |  Size: 88 B

BIN
irpg-web/wall.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,6 +1,7 @@
<?
<?php
include("config.php");
$irpg_page_title = "World Map";
$irpg_page_desc = "IdleRPG World Map";
include("header.php");
?>
@@ -11,12 +12,12 @@
<div id="map">
<img src="makeworldmap.php" alt="IdleRPG World Map" title="IdleRPG World Map" usemap="#world" border="0" />
<map id="world" name="world">
<?
<?php
$file = fopen($irpg_db,"r");
fgets($file);
while($location=fgets($file)) {
list($who,,,,,,,,,,$x,$y) = explode("\t",trim($location));
print " <area shape=\"circle\" coords=\"".$x.",".$y.",4\" alt=\"".htmlentities($who).
echo " <area shape=\"circle\" coords=\"".$x.",".$y.",4\" alt=\"".htmlentities($who).
"\" href=\"playerview.php?player=".urlencode($who)."\" title=\"".htmlentities($who)."\" />\n";
}
fclose($file);
@@ -24,4 +25,6 @@
</map>
</div>
<?include("footer.php");?>
<?php
include("footer.php");
?>

View File

@@ -1,20 +1,14 @@
<?php
header("Content-Type: text/xml");
header("Pragma: no-cache");
include("config.php");
$_GET['player'] = substr($_GET['player'],0,30);
/* Determine if a Player was entered. If not, redirect. */
if ($_GET['player']=="") header('Location: http://'.$_SERVER['SERVER_NAME'].
($_SERVER['SERVER_PORT']!=80?':'.$_SERVER['SERVER_PORT']:'').$BASEURL.
'players.php');
$_GET['player'] = substr($_GET['player'],0,30);
if ($_GET['player']=="") header('Location: '.$irpg_base_dir.'players.php');
$file = fopen($irpg_db,"r");
fgets($file,1024); // skip top comment
while ($line=fgets($file,1024)) {
if (substr($line,0,strlen($_GET['player'])+1) == $_GET['player']."\t") {
list($user,,$isadmin,$level,$class,$secs,,$uhost,$online,$idled,
@@ -48,17 +42,17 @@
?>
<player>
<username><?php print $user?></username>
<isadmin><?php print $isadmin?></isadmin>
<level><?php print $level?></level>
<class><?php print $class?></class>
<ttl><?php print $secs?></ttl>
<userhost><?php print $uhost?></userhost>
<online><?php print $online?></online>
<totalidled><?php print $idled?></totalidled>
<xpos><?php print $x?></xpos>
<ypos><?php print $y?></ypos>
<alignment><?php print $alignment?></alignment>
<username><?php echo $user; ?></username>
<isadmin><?php echo $isadmin; ?></isadmin>
<level><?php echo $level; ?></level>
<class><?php echo $class; ?></class>
<ttl><?php echo $secs; ?></ttl>
<userhost><?php echo $uhost; ?></userhost>
<online><?php echo $online; ?></online>
<totalidled><?php echo $idled; ?></totalidled>
<xpos><?php echo $x; ?></xpos>
<ypos><?php echo $y; ?></ypos>
<alignment><?php echo $alignment; ?></alignment>
<penalties>
<?php
$sum=0;

View File

@@ -1,42 +0,0 @@
------------------------------------------
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 :^)

View File

@@ -1,39 +0,0 @@
<?php
$admin_email="you@host.com";
$admin_nick="HiASL";
// nickname of your bot
$irpg_bot="bot";
// your game's server
$irpg_network="irc.mynet.org";
// your game's channel
$irpg_chan="#G7";
// full or relative pathname to the DBs:
// character database
$irpg_db="/home/jotun/irpg.db";
// time modifiers file
$irpg_mod="/home/jotun/modifiers.txt";
// active quest info file
$irpg_qfile="/home/jotun/questinfo.txt";
// image to use for the top logo
$irpg_logo="idlerpg.png";
// directory in which your site is located from the root directory. my site
// is http://jotun.ultrazone.org/g7/, so it's "/g7/"
$BASEURL="/g7/";
// width-wise dimension of your map file
$mapx = 500;
// length-wise dimension of your map file
$mapy = 500;
?>

View File

@@ -1,47 +0,0 @@
<?php
include("config.php");
$irpg_page_title = "Contact";
include("header.php");
echo "<h1>Contact</h1>";
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(' <blockquote>Thanks for your submission.</blockquote>');
}
else {
echo('
<form method="post" action="contact.php">
<table border="0">
<tr>
<th align="left"><label for="from">Your e-mail address</label>:</th>
<td align="right">
<input type="text" size="20" maxlength="50" name="from" id="from" />
</td>
</tr>
<tr>
<th align="left"><label for="name">Your name</label>:</th>
<td align="right">
<input type="text" size="20" maxlength="50" name="name" id="name" />
</td>
</tr>
<tr>
<td colspan="2">
<textarea name="text" rows="6" cols="44"></textarea><br />
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="submit" value="Send" />
</td>
</tr>
</table>
</form>
');
}
include("footer.php");
?>

View File

@@ -1,35 +0,0 @@
</div>
<div class="footer">
<p class="small">
Questions? Comments? Suggestions? Bugs? Naked pics?
<a href="contact.php"><?php print $admin_email?></a> or <?php print $admin_nick?>@IRC.
<?php
$hits = file("hits.db");
$fp = fopen("hits.db", "w");
$thispage = explode("/",$_SERVER['PHP_SELF']);
$thispage = array_pop($thispage);
if ($fp == false) {
echo "Error: could not open file hits.db.";
}
foreach ($hits as $line) {
list($page,$numhits,$date) = explode("\t",trim($line));
if ($page == $thispage) {
++$numhits;
echo " $numhits hits since $date";
$found = 1;
}
if ($fp) {
fwrite($fp,"$page\t$numhits\t$date\n");
}
}
if (!$found && $fp) {
echo " 1 hit since ".date("M j, Y",time());
fwrite($fp,$thispage."\t1\t".date("M j, Y",time())."\n");
}
fclose($fp);
?>
</p>
</div>
</body>
</html>

View File

@@ -1,47 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title><?echo $irpg_chan;?> Idle RPG: <?echo $irpg_page_title;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="g7.css" />
</head>
<body>
<!-- Idle RPG Logo -->
<div class="head">
<?php
echo(' <img src="'. $irpg_logo .'" alt="'. $irpg_chan .' Idle RPG" title="'. $irpg_chan .' Idle RPG" width="338" height="115" />');
?>
</div>
<div id="menu" class="menu">
<?php
$topbarurl = array(
'Game Info' => $BASEURL . 'index.php',
'Player Info' => $BASEURL . 'players.php',
'Contact' => $BASEURL . 'contact.php',
'Source' => 'http://idlerpg.net/source.php',
'Other IRPGs' => 'http://idlerpg.net/others.php',
'Site Source' => 'http://idlerpg.net/sitesource.php',
'World Map' => $BASEURL . 'worldmap.php',
'Quest Info' => $BASEURL . 'quest.php',
'Forum' => 'http://idlerpg.net/forum.php',
'moo.' => 'http://cowcult.org',
);
foreach ($topbarurl as $key => $value) {
if ($topbarurl[$key] == $_SERVER['PHP_SELF']) {
echo " <a class=\"home\" href=\"$value\">$key</a>\n";
}
else {
echo " <a href=\"$value\">$key</a>\n";
}
}
?>
</div>
<div class="content">

View File

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

BIN
screenshot1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
screenshot2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB