Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
[MERVBot] "MySQL Substats" Plugin Request
Goto page 1, 2  Next
 
Post new topic   Reply to topic Printable version
 View previous topic  Plugin Request ! Post :: Post How To Make Bots  View next topic  
Author Message
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sat Jun 09, 2007 1:18 am    Post subject: [MERVBot] "MySQL Substats" Plugin Request Reply to topic Reply with quote

Invader-Zim told me to look for someone who would like to make a nostalgic kind of plugin for MERVBot.

Required Experiences or Languages:
-MySQL
-PHP (most favorable) or Perl
-HTML (maybe)
-C or C++ (I don't know)

I will provide the grounds for online testing (since I am a webhost myself) if it is needed.

What:
You're going to build a MERVBot plugin that will generate online scores statistics. The idea of this is to try replicate the old eDome/Bdvines scores website; and the objective of this is to provide the entire Subspace community for a free, professional, simple, and compact way to recieve their scores (although the bot has to be online for this to happen, so that is the limiting factor).

How:
If you are interested, I will share ideas of this with you. For now I will provide just a spoiler of a template file. The template file is what the software will use as a reference. It is extremely simple and basic, and highly customizable. To explain just this example, the software would look at this and read first for a <style></style> and take that to heart and make sure that it would put that before a <body> tag atleast. Then it will read the rest of the file -- whatever is the rest of the file is what it will use to generate the tabular data. The only part of this that is not complete is putting the correct PHP, shortcut syntax (ie. in between "<td class="row_alt1_player"></td>" might be "$player"), or whatever. It would pass through the code and replace things like $player with the correct thing. Both the first and second row would have $player, otherwise the generated output might look weird. It will manipulate the table to its needs. There should only be one header row (which is the first row of this table). It should recognize the first data and second data row (which is the second and third row of this table; the alternating pattern rows), and will manipulate these two rows, since it is inputting the real stuff into this. I could go on but I feel that I have spoiled too much already.
Code: Show/Hide
<style>
.hdr{background-color: #003366;}
.hdr_number{}
.hdr_player{}
.hdr_squad{}
.hdr_wins{}
.hdr_losses{}
.hdr_ratio{}
.hdr_average{}
.hdr_points{}
.hdr_flagpoints{}
.hdr_totalpoints{}
.row_alt1{background-color: #000033;}
.row_alt1_number{}
.row_alt1_player{}
.row_alt1_squad{}
.row_alt1_wins{}
.row_alt1_losses{}
.row_alt1_ratio{}
.row_alt1_average{}
.row_alt1_points{}
.row_alt1_flagpoints{}
.row_alt1_totalpoints{}
.row_alt2{background-color: #000000;}
.row_alt2_number{}
.row_alt2_player{}
.row_alt2_squad{}
.row_alt2_wins{}
.row_alt2_losses{}
.row_alt2_ratio{}
.row_alt2_average{}
.row_alt2_points{}
.row_alt2_flagpoints{}
.row_alt2_totalpoints{}
.statstable{width: 720px; border: 0;}
</style>
<table class="statstable">
  <tr class="hdr">
    <td class="hdr_number">#</td>
    <td class="hdr_player">Pilot</td>
    <td class="hdr_squad">Squad</td>
    <td class="hdr_wins">Wins</td>
    <td class="hdr_losses">Losses</td>
    <td class="hdr_ratio">Ratio</td>
    <td class="hdr_average">Average</td>
    <td class="hdr_points">Points</td>
   <td class="hdr_flagpoints">Flag Points</td>
   <td class="hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="row_alt1">
    <td class="row_alt1_number"></td>
    <td class="row_alt1_player"></td>
    <td class="row_alt1_squad"></td>
    <td class="row_alt1_wins"></td>
    <td class="row_alt1_losses"></td>
    <td class="row_alt1_ratio"></td>
    <td class="row_alt1_average"></td>
    <td class="row_alt1_points"></td>
    <td class="row_alt1_flagpoints"></td>
    <td class="row_alt1_totalpoints"></td>
  </tr>
  <tr class="row_alt2">
    <td class="row_alt2_number"></td>
    <td class="row_alt2_player"></td>
    <td class="row_alt2_squad"></td>
    <td class="row_alt2_wins"></td>
    <td class="row_alt2_losses"></td>
    <td class="row_alt2_ratio"></td>
    <td class="row_alt2_average"></td>
    <td class="row_alt2_points"></td>
    <td class="row_alt2_flagpoints"></td>
    <td class="row_alt2_totalpoints"></td>
  </tr>
</table>
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sat Jun 09, 2007 4:57 pm    Post subject: Reply to topic Reply with quote

Original Post is at http://forums.sscentral.com/index.php?showtopic=15600&st=0&gopid=174541&#entry174541
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Jun 10, 2007 4:50 am    Post subject: Reply to topic Reply with quote

Err? What?

Substats is work of Dustpuppy. How original.
Back to top
View users profile Send private message Add User to Ignore List
Dustpuppy
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 23 2003
Posts: 215
Location: England
Offline

PostPosted: Sun Jun 10, 2007 7:21 am    Post subject: Re: [MERVBot] "MySQL Substats" Plugin Request Reply to topic Reply with quote

L.C. wrote:
-HTML (maybe)

_________________
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sun Jun 10, 2007 7:30 am    Post subject: Reply to topic Reply with quote

Solo Ace wrote:
Substats is work of Dustpuppy. How original.
That's why it's in quotation marks, he wants a similar plugin.
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sun Jun 10, 2007 7:37 am    Post subject: Reply to topic Reply with quote

Like this is going to work anyway. icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sun Jun 10, 2007 10:22 am    Post subject: Reply to topic Reply with quote

I hate to say it but ffs do it server-side, do it on ASSS!
(Use Smong's ASSS stats module/stuff)
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sun Jun 10, 2007 5:36 pm    Post subject: Reply to topic Reply with quote

readme.txt
▪This file just goes over some things briefly (and some in detail).
Code: Show/Hide
Main Stuff:
$title         This is where the website title will be outputted.
$sortnumber      This is the number of players per page that will be displayed.
$sortcategory   This is the name of the category that the data is sorted by.
$cssfile      This is the filename and/or location of the CSS file to load.
$zonename      This is the name of the zone data is generated for.
$form         This is where the contents of a fully parsed and manipulated form.html is placed

Categories:
$number         This is where the place numbers will be outputted (ie "1." "2." "34." "53.").
$player         This is where the player name will appear.
$squad         This is where the squad name will appear.
$wins         This is where the number of wins (kills) will appear.
$losses         This is where the number of losses (deaths) will appear.
$ratio         This is where the ratio of wins (kills) to losses (deaths) in simplest form is outputted.
$rating         This is where the rating ((points(10)+(wins-losses)100)/(wins+100)) is displayed.
$average      This is where the average (points/kills) is outputted.
$points         This is where the number of points is displayed.
$flagpoints      This is where the number of flag points is displayed.
$totalpoints   This is where the number of total points (points+flag points) is displayed.

Form $sortcategory Explanation:
   <option value="$sortcategpry">$sortcategpry</option>
    See [Categories] in scoreman.ini. Those are what will be placed accordingly into this
    list. Everything under [Categories] will be inputted into the form during manipulation
    (which is in the process of generating the webpages for the scores). You can change the
    category strings as you please.

CSS ss_ Prefix Explanation:
You will notice that the prefix ss_ is the beginning of all the CSS styles. If you have a
website (hopefully taking advantage of CSS and using a CSS file), the CSS for this plugin
will not interfere with your website and it's CSS. There are less chances of this plugin
messing up someone's website if CSS style names are made unique by using a prefix. If your
website happens to use the same prefix, them you should change them. There is no reason for
anyone's website to be constructed with the ss_ prefix.

CSS Body Style Explanation:
   body.formpage{}
   body.statsbody{text-align: center;}
    You can put class="formpage" or class="statsbody" in a <body> tag to load the styles for this.
    The reason for having this is so that you could customize specific styles for the page that
    the form is on, and styles for the popup window where the statistical scores data is presented.

Scoreman.ini ArchiveEarly Explanation:
   SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
   ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
   ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
    There is an extremely good reason for having this command. ArchiveTime is like a season, period,
    or semester. If ArchiveEarly is set to 60 (1 hour), 60 minutes (1 hour) before ArchiveTime ends
    it will archive the current scores. ArchiveEarly should not exceed SaveTime. For example:
      SaveTime > ArchiveEarly
      360 > Any number within the range of 0 and 359
    Setting it to 360 is not allowed (it cannot be equal with SaveTime or more than SaveTime). Setting
    ArchiveEarly to 0 is basically disabling this feature; it means that it will regenerate data and
    create an archive after how ever many weeks ArchiveTime is set to.
    Archiving will automatically regenerate data (to make it the most up to date) before archiving this
    data for future reference.

Scoreman.ini ArchiveDates Explanation:
   ArchiveDates = 0;         // See the Readme file for details on using this
    This information is used for the form itself. By default a user views the "Current scores" but
    will also have a list of archived dates to choose from. These are the dates that the archive was
    made on. Use these numbers to help you customize exactly how you want the dates to be displayed.
     0 ... Apr 1, 2007
     1 ... April 1, 2007
     2 ... 4/1/2007
     3 ... 2007 Apr 1
     4 ... 2007 April 1


scoreman.ini
▪Of course most of this data will also be stored in the MySQL database. A config.php file will take care of connecting the PHP website to the MySQL database, then it will use some of the stored configurations to its advantage.
▪The bot will of course have this file (or something ultimately similar). It will always re-update the MySQL entries (for verification). The plugin is almost literally updating the entire MySQL database.
▪To put it in other words, when it transfers scores data to the MySQL database, it will also transfer and replace configuration stuff in the database too (like SaveTime or Statstable). Quite nice and convenient, isn't it? sa_tongue.gif
Code: Show/Hide
[MySQL]         // Information about connecting to a MySQL source is entered here
Host = localhost;         // The IP address of your MySQL host (localhost otherwise)
Database = scoreman;         // The MySQL database name
Username = scoreman;         // The MySQL Username
Password = "abc123";         // The MySQL User Pasword

[Notification]         // Information about how the bot should or could notify about fresh generations
NotifyType = 0;         // Do you want in-game notifications or not? (0) No, (1) Yes
NotifyMessage = "*arena Scores Statistics have just been updated! Find them at scores.sscidragonballz.net.";         // Type this as if you were chatting in Continuum, you are limited to one message or line only

[Website]         // Configurations about how the website should operate
FormPage = index.html;         // It will parse this page for $form
FormTemplate = form.html;         // $form = <content of form.html>
StatsTable = statstable.html;         // Template file to parse, use, and manipulate for data output
$title = "Page Title Here";         // The title of this website
ZoneName = "SSCI Dragonball Z";         // The name of the zone that statistics are being reported for goes here
$cssfile = /scoreman.css;         // The location and address of your *.css file
SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
ArchiveDates = 0;         // See the Readme file for details on using this

[Sortnumber]         // This is data for the form itself
List0 = 5;         // This is an option that will be included in the form
List1 = 10;         // Use this to limit the number of
List2 = 20;         // Sort by top 20 something
List3 = 50;         // Sort by top 50 sometimes
List5 = 100;         // Sort by top 100 something
Maxlist = 100;         // To prevent someone from ever being able to render like 999 entries in one page

[Categories]         // This is the data for the form itself
Category0 = "Player";         // These are an option on the form that you can sort your desired data request by
Category1 = "Squad";         // Sort by Squad name (alphabetical)
Category2 = "Wins";         // Sort by wins (from highest to lowest)
Category3 = "Losses";         // Sort by losses (from highest to lowest)
Category4 = "Ratio";         // Sort by ratio (from best ratio, which is highest wins to lowest losses, to worst ratio)
Category5 = "Rating";         // Sort by rating (from highest to lowest)
Category6 = "Average";         // Sort by average (from highest to lowest)
Category7 = "Points";         // Sort by points (from highest to lowest)
Category8 = "Flagpoints";         // Sort by flag points (from highest to lowest)
Category9 = "Totalpoints";         // Sort by total points (from highest to lowest)


scoreman.css
▪I think this may be as complete as the CSS could get. icon_smile.gif
Code: Show/Hide
.ss_formcontent{width: 220px; text-align: left; padding: 4px;}
.ss_formdiv{width: 229px; text-align: center; background-color: #000030; font-family: Verdana, Arial, Helvetica, sans-serif; color:#FFFFFF; font-size: 12px;}
.ss_formtitle{width: 229px; background-color: #101060; color: #FFFFFF; text-align: center;}
.ss_formzone{width: 109px;}
.ss_hdr_average{}
.ss_hdr_flagpoints{}
.ss_hdr_losses{}
.ss_hdr_number{}
.ss_hdr_player{}
.ss_hdr_points{}
.ss_hdr_rating{}
.ss_hdr_ratio{}
.ss_hdr_squad{}
.ss_hdr_totalpoints{}
.ss_hdr_wins{}
.ss_hdr{background-color: #003366;}
.ss_row_alt1_average{}
.ss_row_alt1_flagpoints{}
.ss_row_alt1_losses{}
.ss_row_alt1_number{}
.ss_row_alt1_player{}
.ss_row_alt1_points{}
.ss_row_alt1_rating{}
.ss_row_alt1_rating{}
.ss_row_alt1_ratio{}
.ss_row_alt1_squad{}
.ss_row_alt1_totalpoints{}
.ss_row_alt1_wins{}
.ss_row_alt1{background-color: #000033;}
.ss_row_alt2_average{}
.ss_row_alt2_flagpoints{}
.ss_row_alt2_losses{}
.ss_row_alt2_number{}
.ss_row_alt2_player{}
.ss_row_alt2_points{}
.ss_row_alt2_ratio{}
.ss_row_alt2_squad{}
.ss_row_alt2_totalpoints{}
.ss_row_alt2_wins{}
.ss_row_alt2{background-color: #000000;}
.ss_statstable{width: 720px; border: 0;}
a.ss:active{}
a.ss:hover{}
a.ss:link{}
a.ss:visited{}
body.ss_formpage{text-align: center; background-color: #000030;}
body.ss_statsbody{text-align: center;}
input.ss_formbutton{background-color: #000030; color:#c080c0;}
select.ss_formlist{background-color:#104020; color:#FFFFFF;}


index.html
▪Quite simple, really. In order to have an accurate copy, an individual must have the PHP/MySQL software for generating scores data on the same server.
▪Another trick might be to use an iFrame or something to display the form from another server.
▪But really, this is pretty much the frontpage of the web-based part of the plugin. All other modifications must be done through MySQL (phpMyAdmin), PHP, or HTML.
Code: Show/Hide
<html>
<head>
<title>$title</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_formpage">
$form
</body>
</html>


form.html
▪Obviously it isn't quite complete. I am not a PHP coder, so I just did as much as I could.
Code: Show/Hide
<div class="ss_formdiv">
   <form name="UntitledForm" method="post" action="">
      <div style="padding: 4px;">
         <select class="ss_formlist" name="date">
            <option value="0">Current scores</option>
            <option value="$datevalue">$date</option>
         </select>
      </div>
      <div class="ss_formtitle"><b>Top Pilots</b></div>
      <div class="ss_formcontent">Show top
         <select class="ss_formlist" name="sortnumber">
            <option value="$sortnumber">$sortnumber</option>
         </select>
         <select class="ss_formlist" name="sortcategpry">
            <option value="$sortcategpry">$sortcategpry</option>
         </select>
         <br />
         <div class="ss_formcontent" style="margin-bottom: -4px;">
            <div style="text-align: right; margin-right: 4px;">
               <select class="ss_formzone ss_formlist" name="zonename">
                  <option>$zonename</option>
               </select>
               <input class="ss_formbutton" value="Go!" type="submit">
            </div>
         </div>
      </div>
   </form>
</div>


statstable.html
▪This is like the webpage file of a popup-looking window. Or like having your website in a popup.
Code: Show/Hide
<html>
<head>
<title>$title - Top $sortnumber $sortcategory</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_statsbody">
<table class="ss_statstable">
  <tr class="ss_hdr">
    <td class="ss_hdr_number">#</td>
    <td class="ss_hdr_player">Pilot</td>
    <td class="ss_hdr_squad">Squad</td>
    <td class="ss_hdr_wins">Wins</td>
    <td class="ss_hdr_losses">Losses</td>
    <td class="ss_hdr_ratio">Ratio</td>
    <td class="ss_hdr_rating">Rating</td>
    <td class="ss_hdr_average">Average</td>
    <td class="ss_hdr_points">Points</td>
    <td class="ss_hdr_flagpoints">Flag Points</td>
    <td class="ss_hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="ss_row_alt1">
    <td class="ss_row_alt1_number">$number</td>
    <td class="ss_row_alt1_player">$player</td>
    <td class="ss_row_alt1_squad">$squad</td>
    <td class="ss_row_alt1_wins">$wins</td>
    <td class="ss_row_alt1_losses">$losses</td>
    <td class="ss_row_alt1_ratio">$ratio</td>
    <td class="ss_row_alt1_rating">$rating</td>
    <td class="ss_row_alt1_average">$average</td>
    <td class="ss_row_alt1_points">$points</td>
    <td class="ss_row_alt1_flagpoints">$flagpoints</td>
    <td class="ss_row_alt1_totalpoints">$totalpoints</td>
  </tr>
  <tr class="ss_row_alt2">
    <td class="ss_row_alt2_number">$number</td>
    <td class="ss_row_alt2_player">$player</td>
    <td class="ss_row_alt2_squad">$squad</td>
    <td class="ss_row_alt2_wins">$wins</td>
    <td class="ss_row_alt2_losses">$losses</td>
    <td class="ss_row_alt2_ratio">$ratio</td>
    <td class="ss_row_alt2_rating">$rating</td>
    <td class="ss_row_alt2_average">$average</td>
    <td class="ss_row_alt2_points">$points</td>
    <td class="ss_row_alt2_flagpoints">$flagpoints</td>
    <td class="ss_row_alt2_totalpoints">$totalpoints</td>
  </tr>
</table>
</body>
</html>




I will need a PHP Coder, some Javascript may be required (unless can be done fully in PHP), and perhaps light HTML knowledge needed (if you're a PHP coder though, you would have to know HTML then, wouldn't you? tongue.gif).

I happened to forget to add something to the scoreman.ini file about setting the X and Y dimensions of a popup window. Hehe.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sun Jun 10, 2007 5:38 pm    Post subject: Reply to topic Reply with quote

Quote:
but ffs do it server-side, do it on ASSS!

AS3 won't ever take over all of Subspace. You would only wish. Maybe when the plugin would be completed, released, open-sourced, then it could be ported to AS3. lol. What am I saying?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sun Jun 10, 2007 6:09 pm    Post subject: Reply to topic Reply with quote

I honestly don't wish for As3 to take over subspace icon_wink.gif I'm just saying it would be so much easier and more stable. (No more bot aka client dependency)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sun Jun 10, 2007 8:09 pm    Post subject: Reply to topic Reply with quote

Hmm, it could technically be coded to support more than 1 zone in the database. Not sure if anyone would want to do that (although it would make a create scores site). It would have to be in the hands of trusted individuals, and if something went wrong the password would have to be changed (which would be an exhaustive work having to go to each bot, etc). The way that could work out is if (for example), I, Confess+ or someone setup a dedicated bot server (maybe not strictly a bot server) and we hosted an almost "dummy" bot in whatever zones.

I will just use me as an example. Say I would have a dedicated server of my own. I could go to each SSC zone or something and request VIP-ship for a scores-monitoring bot that could periodically report to my webserver (two different physical servers). If I use this tactic, I could have a list of zones with their own scores being updated regularly.

Making a public scoring site (aka giving out the MySQL information to anybody and freely) creates a potential for a big mash and mess up of how things are organized in the system. You could spam the server to kingdom come through MySQL, spam up the zone list, you know.


Of course, if I did this I would have to make a few adjustments to the ini file. I'm thinking of adding an option where you could turn on a "shared" (support for multiple zones, will not send a few MySQL queries that standalone would) or "standalone" mode (standalone mode simply means just one zone in the system, no more than that). Some data that it might not send on shared could be like [Sortnumber] and [Categories], and would be globally defined by a super bot. Ah, that's a great idea.

There could be another thing in the ini, which could be a special password that it sends to the MySQL server or whatever. A password that could be set through phpMyAdmin; if this special password in the INI matches the one in the database, then it gains authority. By authority (if it is on the shared mode) it will be the one that dictates and sends the [Categories] and [Sortnumber].

EDIT :: Multi-pub zones would have problems regardless. There will always be some kind of confusion unless each public arena is split off in the zone list to something like: (Public 0), (Public 1), (Public 2).. Infact that's an excellent idea for Standalone mode. Multi-pub support wouldn't work for shared (it could, but there would be more work involved and I don't want to go that far; for shared the list is used as a zone listing a player could select from); multi-pub support would work for standalone (the list would be used as an arena list).
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Tue Jun 12, 2007 1:46 pm    Post subject: Reply to topic Reply with quote

Purge will be making a brand new bot instead of making this a plugin.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Jun 12, 2007 9:32 pm    Post subject: Reply to topic Reply with quote

L.C. wrote:
AS3 won't ever take over all of Subspace. You would only wish. Maybe when the plugin would be completed, released, open-sourced, then it could be ported to AS3. lol. What am I saying?

What are you saying?
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Wed Jun 13, 2007 2:19 am    Post subject: Reply to topic Reply with quote

Let's not listen to L.C. and just pretend this thread was never created.

Don't you guys see this is just another Qndre?

Look at what he's saying and how relevant that is to what he's trying to create at all.

L.C. wrote:
You could spam the server to kingdom come through MySQL, spam up the zone list, you know.

L.C., you go and spam up the zone list, homeboy.
Back to top
View users profile Send private message Add User to Ignore List
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Wed Jun 13, 2007 2:22 am    Post subject: Reply to topic Reply with quote

Nah, I don't want to start an AS3 arguement. ;o
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Jun 13, 2007 2:14 pm    Post subject: Reply to topic Reply with quote

Solo Ace wrote:
Don't you guys see this is just another Qndre?

Come on, you're just being mean to LC. icon_sad.gif

LC, I'm not trying to start an "AS3" argument either, but you are asking us to volunteer to write a program using a pretty much obsolete interface/toolset. That is not what programmers do for fun, that is what they do for their paid jobs.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Thu Jun 14, 2007 12:50 am    Post subject: Reply to topic Reply with quote

Before I had posted the thread, Invader-Zim had given me some advice. One of those were that if nobody were interested for a full week, then to setup a reward (in money) with a bunch of conditions. With a conversation between Purge and I, I accidentally conveyed the sense to Purge that he was getting paid no matter what. After I realized that he misinterpretted me, I just told him that I'll go ahead and pay him fairly for it. He's being paid $25 at the moment.

Quote:
Let's not listen to L.C. and just pretend this thread was never created.
Or you just don't post in this thread. Quite simple to ignore an entire thread rather than a sole reply or post. icon_smile.gif

EDIT :: And to mention that the bot will be completed by Saturday. After that I'll just need to hire a PHP coder to do the PHP side of things. -_-
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Fri Jun 15, 2007 12:29 pm    Post subject: Reply to topic Reply with quote

Looking for a PHP Coder, read for details

Hey, we are now going to be needing a PHP coder to pitch a hand on the PHP-side of things. We can negotiate on a fair price (your job should be reletively simple, should be accomplishable in either a few hours, a day or two; not more than two days -- one day is already enough). Become a mercanery TODAY! sa_tongue.gif (Don't be afraid to negotiate on how much you want to be paid; the current starting price is $25.)
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Fri Jun 15, 2007 5:03 pm    Post subject: Reply to topic Reply with quote

A day or two hmm. I will have a go at this, I got a lot of spare time recently biggrin.gif plus I'm already familiar with this kind of thing since I wrote DAWS. Is there anymore info or am I supposed to start work using the information that is already posted?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Fri Jun 15, 2007 6:37 pm    Post subject: Reply to topic Reply with quote

Why wouldn't you take the chance to learn it yourself? PHP is a language I found the easiest to learn.

Yeah. sa_tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Jun 15, 2007 8:16 pm    Post subject: Reply to topic Reply with quote

PHP is a walk in the park; secure-PHP is not.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Sat Jun 16, 2007 5:33 pm    Post subject: Reply to topic Reply with quote

Solo Ace wrote:
Why wouldn't you take the chance to learn it yourself? PHP is a language I found the easiest to learn.

Yeah. sa_tongue.gif

Aside from HTML icon_biggrin.gif haha
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sat Jun 16, 2007 6:30 pm    Post subject: Reply to topic Reply with quote

Well there is one more bit of information regarding payment, thought I better make a public note of this before anything happens on the PHP side of things. My first paycheck wasn't as big as I thought it would be (~$130 - $80 for 500w Power Supply - $25 for Purge+'s work). I had to urgently buy a 500w Power Supply (this one is a Thermaltake) from NewEgg because my 500w popped a cap on a strange overload.

Now for the PHP side of things regarding payment - I would be able to pay you in a week or two from yesterday (which is when I get my next paycheck; and it'll be larger than my first paycheck). If you can wait that long, that's great. Wish I had something to tie this down so that I could earn your trust on this. :X

Now to slap some words back.
Quote:
Why wouldn't you take the chance to learn it yourself? PHP is a language I found the easiest to learn.
I wrote about 2 or 3 large paragraphs to reply to those quote, but then I decided to delete them because it was too difficult for me.

Working environments, conditions, and abilities. It is NOT in my mental ability or capacity to learn languages like C++, PHP, and even language alone without someone to personally (face to face) tutor me. The internet does not and will not work, guaranteed. Books do not work and will not work, guaranteed. No matter how I try to look at it (attitude-wise), I simply am incapable to learn language without a personal tutor. Some people can do it better than I can, but unfortunately I am afraid I am one of those who has far more trouble than any average learner when it comes to language.

I have borderline-ADHD, but I don't think that matters.


Last edited by L.C. on Sat Jun 16, 2007 6:50 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
L.C.
Server Help Squatter


Age:34
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Sat Jun 16, 2007 6:49 pm    Post subject: Reply to topic Reply with quote

Quote:
Is there anymore info or am I supposed to start work using the information that is already posted?
It might be a good idea to get in touch with Purge+ so that it could be discussed how we can approach it. We have to debug this, so it will take us three to look at it (atleast you and Purge).



readme.txt
-This file just goes over some things briefly (and some in detail).
Code: Show/Hide
Main Stuff:
$title         This is where the website title will be outputted.
$sortnumber      This is the number of players per page that will be displayed.
$sortcategory   This is the name of the category that the data is sorted by.
$cssfile      This is the filename and/or location of the CSS file to load.
$zonename      This is the name of the zone data is generated for.
$form         This is where the contents of a fully parsed and manipulated form.html is placed

Categories:
$number         This is where the place numbers will be outputted (ie "1." "2." "34." "53.").
$player         This is where the player name will appear.
$squad         This is where the squad name will appear.
$wins         This is where the number of wins (kills) will appear.
$losses         This is where the number of losses (deaths) will appear.
$ratio         This is where the ratio of wins (kills) to losses (deaths) in simplest form is outputted.
$rating         This is where the rating ((points(10)+(wins-losses)100)/(wins+100)) is displayed.
$average      This is where the average (points/kills) is outputted.
$points         This is where the number of points is displayed.
$flagpoints      This is where the number of flag points is displayed.
$totalpoints   This is where the number of total points (points+flag points) is displayed.

Form $sortcategory Explanation:
   <option value="$sortcategpry">$sortcategpry</option>
    See [Categories] in scoreman.ini. Those are what will be placed accordingly into this
    list. Everything under [Categories] will be inputted into the form during manipulation
    (which is in the process of generating the webpages for the scores). You can change the
    category strings as you please.

CSS ss_ Prefix Explanation:
You will notice that the prefix ss_ is the beginning of all the CSS styles. If you have a
website (hopefully taking advantage of CSS and using a CSS file), the CSS for this plugin
will not interfere with your website and it's CSS. There are less chances of this plugin
messing up someone's website if CSS style names are made unique by using a prefix. If your
website happens to use the same prefix, them you should change them. There is no reason for
anyone's website to be constructed with the ss_ prefix.

CSS Body Style Explanation:
   body.formpage{}
   body.statsbody{text-align: center;}
    You can put class="formpage" or class="statsbody" in a <body> tag to load the styles for this.
    The reason for having this is so that you could customize specific styles for the page that
    the form is on, and styles for the popup window where the statistical scores data is presented.

Scoreman.ini ArchiveEarly Explanation:
   SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
   ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
   ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
    There is an extremely good reason for having this command. ArchiveTime is like a season, period,
    or semester. If ArchiveEarly is set to 60 (1 hour), 60 minutes (1 hour) before ArchiveTime ends
    it will archive the current scores. ArchiveEarly should not exceed SaveTime. For example:
      SaveTime > ArchiveEarly
      360 > Any number within the range of 0 and 359
    Setting it to 360 is not allowed (it cannot be equal with SaveTime or more than SaveTime). Setting
    ArchiveEarly to 0 is basically disabling this feature; it means that it will regenerate data and
    create an archive after how ever many weeks ArchiveTime is set to.
    Archiving will automatically regenerate data (to make it the most up to date) before archiving this
    data for future reference.

Scoreman.ini ArchiveDates Explanation:
   ArchiveDates = 0;         // See the Readme file for details on using this
    This information is used for the form itself. By default a user views the "Current scores" but
    will also have a list of archived dates to choose from. These are the dates that the archive was
    made on. Use these numbers to help you customize exactly how you want the dates to be displayed.
     0 ... Apr 1, 2007
     1 ... April 1, 2007
     2 ... 4/1/2007
     3 ... 2007 Apr 1
     4 ... 2007 April 1


scoreman.ini
-Of course most of this data will also be stored in the MySQL database. A config.php file will take care of connecting the PHP website to the MySQL database, then it will use some of the stored configurations to its advantage.
-The bot will of course have this file (or something ultimately similar). It will always re-update the MySQL entries (for verification). The plugin is almost literally updating the entire MySQL database.
-To put it in other words, when it transfers scores data to the MySQL database, it will also transfer and replace configuration stuff in the database too (like SaveTime or Statstable). Quite nice and convenient, isn't it? sa_tongue.gif
Code: Show/Hide
[MySQL]         // Information about connecting to a MySQL source is entered here
Host = localhost;         // The IP address of your MySQL host (localhost otherwise)
Database = scoreman;         // The MySQL database name
Username = scoreman;         // The MySQL Username
Password = "abc123";         // The MySQL User Pasword

[Notification]         // Information about how the bot should or could notify about fresh generations
NotifyType = 0;         // Do you want in-game notifications or not? (0) No, (1) Yes
NotifyMessage = "*arena Scores Statistics have just been updated! Find them at scores.sscidragonballz.net.";         // Type this as if you were chatting in Continuum, you are limited to one message or line only

[Website]         // Configurations about how the website should operate
Formpage = index.html;         // It will parse this page for $form
Formtemplate = form.html;         // $form = <content of form.html>
Statstable = statstable.html;         // Template file to parse, use, and manipulate for data output
$title = "Page Title Here";         // The title of this website
ZoneName = "SSCI Dragonball Z";         // The name of the zone that statistics are being reported for goes here
$cssfile = /scoreman.css;         // The location and address of your *.css file
SaveTime = 360;         // The amount of time in minutes to regenerate and update online scores
ArchiveTime = 1;         // The amount of time in weeks to archive the last set of data for historical reference
ArchiveEarly = 60;         // The amount of time in minutes to archive the last set of data early, see Readme for details
ArchiveDates = 0;         // See the Readme file for details on using this
PopupX = 750;         // The width of the scores popup window in pixels
PopupY = 550;         // The heighth of the scores popup window in pixels
Resizable = 1;         // Can the user resize the popup window manually? (0) No, (1) Yes

[Sortnumber]         // This is data for the form itself
List0 = 5;         // This is an option that will be included in the form
List1 = 10;         // Use this to limit the number of
List2 = 20;         // Sort by top 20 something
List3 = 50;         // Sort by top 50 sometimes
List5 = 100;         // Sort by top 100 something
Maxlist = 100;         // To prevent someone from ever being able to render like 999 entries in one page

[Categories]         // This is the data for the form itself
Category0 = "Player";         // These are an option on the form that you can sort your desired data request by
Category1 = "Squad";         // Sort by Squad name (alphabetical)
Category2 = "Wins";         // Sort by wins (from highest to lowest)
Category3 = "Losses";         // Sort by losses (from highest to lowest)
Category4 = "Ratio";         // Sort by ratio (from best ratio, which is highest wins to lowest losses, to worst ratio)
Category5 = "Rating";         // Sort by rating (from highest to lowest)
Category6 = "Average";         // Sort by average (from highest to lowest)
Category7 = "Points";         // Sort by points (from highest to lowest)
Category8 = "Flagpoints";         // Sort by flag points (from highest to lowest)
Category9 = "Totalpoints";         // Sort by total points (from highest to lowest)


scoreman.css
-I think this may be as complete as the CSS could get. icon_smile.gif
Code: Show/Hide
.ss_formcontent{width: 220px; text-align: left; padding: 4px;}
.ss_formdiv{width: 229px; text-align: center; background-color: #000030; font-family: Verdana, Arial, Helvetica, sans-serif; color:#FFFFFF; font-size: 12px;}
.ss_formtitle{width: 229px; background-color: #101060; color: #FFFFFF; text-align: center;}
.ss_formzone{width: 109px;}
.ss_hdr_average{}
.ss_hdr_flagpoints{}
.ss_hdr_losses{}
.ss_hdr_number{}
.ss_hdr_player{}
.ss_hdr_points{}
.ss_hdr_rating{}
.ss_hdr_ratio{}
.ss_hdr_squad{}
.ss_hdr_totalpoints{}
.ss_hdr_wins{}
.ss_hdr{background-color: #003366;}
.ss_row_alt1_average{}
.ss_row_alt1_flagpoints{}
.ss_row_alt1_losses{}
.ss_row_alt1_number{}
.ss_row_alt1_player{}
.ss_row_alt1_points{}
.ss_row_alt1_rating{}
.ss_row_alt1_rating{}
.ss_row_alt1_ratio{}
.ss_row_alt1_squad{}
.ss_row_alt1_totalpoints{}
.ss_row_alt1_wins{}
.ss_row_alt1{background-color: #000033;}
.ss_row_alt2_average{}
.ss_row_alt2_flagpoints{}
.ss_row_alt2_losses{}
.ss_row_alt2_number{}
.ss_row_alt2_player{}
.ss_row_alt2_points{}
.ss_row_alt2_ratio{}
.ss_row_alt2_squad{}
.ss_row_alt2_totalpoints{}
.ss_row_alt2_wins{}
.ss_row_alt2{background-color: #000000;}
.ss_statstable{width: 720px; border: 0;}
a.ss:active{}
a.ss:hover{}
a.ss:link{}
a.ss:visited{}
body.ss_formpage{text-align: center; background-color: #000030;}
body.ss_statsbody{text-align: center;}
input.ss_formbutton{background-color: #000030; color:#c080c0;}
select.ss_formlist{background-color:#104020; color:#FFFFFF;}


index.html
-Quite simple, really. In order to have an accurate copy, an individual must have the PHP/MySQL software for generating scores data on the same server.
-Another trick might be to use an iFrame or something to display the form from another server.
-But really, this is pretty much the frontpage of the web-based part of the plugin. All other modifications must be done through MySQL (phpMyAdmin), PHP, or HTML.
Code: Show/Hide
<html>
<head>
<title>$title</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_formpage">
$form
</body>
</html>


form.html
-Obviously it isn't quite complete. I am not a PHP coder, so I just did as much as I could.
Code: Show/Hide
<div class="ss_formdiv">
   <form name="UntitledForm" method="post" action="">
      <div style="padding: 4px;">
         <select class="ss_formlist" name="date">
            <option value="0">Current scores</option>
            <option value="$datevalue">$date</option>
         </select>
      </div>
      <div class="ss_formtitle"><b>Top Pilots</b></div>
      <div class="ss_formcontent">Show top
         <select class="ss_formlist" name="sortnumber">
            <option value="$sortnumber">$sortnumber</option>
         </select>
         <select class="ss_formlist" name="sortcategpry">
            <option value="$sortcategpry">$sortcategpry</option>
         </select>
         <br />
         <div class="ss_formcontent" style="margin-bottom: -4px;">
            <div style="text-align: right; margin-right: 4px;">
               <select class="ss_formzone ss_formlist" name="zonename">
                  <option>$zonename</option>
               </select>
               <input class="ss_formbutton" value="Go!" type="submit">
            </div>
         </div>
      </div>
   </form>
</div>


statstable.html
-This is like the webpage file of a popup-looking window. Or like having your website in a popup.
Code: Show/Hide
<html>
<head>
<title>$title - Top $sortnumber $sortcategory</title>
<link rel="stylesheet" type="text/css" href="$cssfile" />
<style type="text/css" media="screen">
<!--
@import url($cssfile) screen;
-->
</style>
</head>
<body class="ss_statsbody">
<table class="ss_statstable">
  <tr class="ss_hdr">
    <td class="ss_hdr_number">#</td>
    <td class="ss_hdr_player">Pilot</td>
    <td class="ss_hdr_squad">Squad</td>
    <td class="ss_hdr_wins">Wins</td>
    <td class="ss_hdr_losses">Losses</td>
    <td class="ss_hdr_ratio">Ratio</td>
    <td class="ss_hdr_rating">Rating</td>
    <td class="ss_hdr_average">Average</td>
    <td class="ss_hdr_points">Points</td>
    <td class="ss_hdr_flagpoints">Flag Points</td>
    <td class="ss_hdr_totalpoints">Total Points</td>
  </tr>
  <tr class="ss_row_alt1">
    <td class="ss_row_alt1_number">$number</td>
    <td class="ss_row_alt1_player">$player</td>
    <td class="ss_row_alt1_squad">$squad</td>
    <td class="ss_row_alt1_wins">$wins</td>
    <td class="ss_row_alt1_losses">$losses</td>
    <td class="ss_row_alt1_ratio">$ratio</td>
    <td class="ss_row_alt1_rating">$rating</td>
    <td class="ss_row_alt1_average">$average</td>
    <td class="ss_row_alt1_points">$points</td>
    <td class="ss_row_alt1_flagpoints">$flagpoints</td>
    <td class="ss_row_alt1_totalpoints">$totalpoints</td>
  </tr>
  <tr class="ss_row_alt2">
    <td class="ss_row_alt2_number">$number</td>
    <td class="ss_row_alt2_player">$player</td>
    <td class="ss_row_alt2_squad">$squad</td>
    <td class="ss_row_alt2_wins">$wins</td>
    <td class="ss_row_alt2_losses">$losses</td>
    <td class="ss_row_alt2_ratio">$ratio</td>
    <td class="ss_row_alt2_rating">$rating</td>
    <td class="ss_row_alt2_average">$average</td>
    <td class="ss_row_alt2_points">$points</td>
    <td class="ss_row_alt2_flagpoints">$flagpoints</td>
    <td class="ss_row_alt2_totalpoints">$totalpoints</td>
  </tr>
</table>
</body>
</html>




sub.js
-I was looking around on archive.org and managed to peak into this file. The following is just a small portion of it (the rest was useless).
-The main reason I'm pointing this out so that "menubar=no,scrollbars=yes,resizable=yes" is not forgotten in the coding of the popup function.
Code: Show/Hide
function sub(f)
{
  if ( score != null ) score.close() ;
  var score=window.open("", "score", "width=750,height=550,menubar=no,scrollbars=yes,resizable=yes"); 
  score.focus() ;
  return true;
}
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Dustpuppy
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 23 2003
Posts: 215
Location: England
Offline

PostPosted: Sat Jun 16, 2007 10:16 pm    Post subject: Reply to topic Reply with quote

Solo Ace wrote:
sa_tongue.gif
D1st0rt: you are a patient, patient man.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 50 page(s) served in previous 5 minutes.

phpBB Created this page in 0.591654 seconds : 49 queries executed (74.8%): GZIP compression disabled