GunBound pv server make own

Hacking GunBound

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

GunBound pv server make own

Postby gamemaster » Fri Jan 30, 2009 4:25 am

[size=18]FILES:[/size]http://www.megaupload.com/nl/?d=DGL9NPGO


CLIENTS:


http://www.megaupload.com/nl/?d=I97022IY

other downloads

Patch http://www.mediafire.com/?5zzqjmdeydd

PartnerFix http://rapidshare.com/files/57217032/PartnerFix.exe

web http://www.mediafire.com/?4mxkwmzfyon



setting set up

Oh oh its long time since i promise to write a guide,disappointed me? sorry about that.I'm very busy

This guide is for advanced member,if you're newbie,should read it carefully and dont forget to ask if you dont understand,when you do somethings,should check it now,should not continue install if you bypass any step.
If you dont know anythings about MySQL and Webservices,you should....:punch:

I-Setup Server
First you must have server Gunbound WC 5.85 (Release by f1l1p1nho and reconfiged by me),Client <=5.85 and my Patch,a tool Parner Agent Fix,and a Web to reg account (this Web also contain files to disable fetch and nProtect)

Install MySQL 4.x ( dont use 5.x i dont know what will happen) and configure account root with null password (you can do another way but it should be later).Use any MySQL management create 4 database (admin ; batch ; gunbound ; user ) and import data from backup SQL file( included in Server)

There are nothing to change in 3 database,we only change some columns in database gunbound.Open table applicationsetting and config
Notice and BaseURL: Your Server IP
FUlldownloadURL : Your Server IP\fetch.php

Remeber that after we install MySQL it creates account root only for IP localhost (127.0.0.1) and certain this security only apply for 127.0.0.1 if you use another IP ( i use 192.168.159.1 by Loopback adapter) you must add account root for new IP ( use MySQL management to do,at here i use MySQLyog)

End database here

Goto Server’s Folders:
BuddyCenteràsetting.txt : Reconfigure all IP and Account use to access MySQL is root with null password

BuddyServàSetting.txt: Reconfigure all IP and version should be from 0 to 9*** account for MySQL too
CentralàGameServerlist.txt and Setting.txt: Like above

Folders Server 8360à8363: Reconfigure file Setting.txt like above, warning:don’t change Accept line.After that,use Parner Agent Fix to reconfigure 4 files GunboundServ3 in these folders (change into root user with null password)
* Folder batchgis: configure file Batchgis.inf with MySQL account,and run batchgis.exe
Use 4 main services i provided ( included in this server) to manage your server,at now you can run file install Services and Start Services,don’t forget to see their reports.

II-Setup Web Server ( to disable Fetch and send right infos for GameGuard)

Install any Web services,I use IIS and PHP. Copy folder nProtect to root server,and copy 2 file fetch.php and fetch.dll into root folder too.It’s must be like this
http://your Server IP/nProtect
http://your serverIP/fetch.dll and http://yourserverIP/fetch.php
Use my Web to create account,you can install now or use any MySQL management to create account. I provided (9-30-2007 but its still beta use it to create account only)

III-Setup Client
Install your Client normaly then apply my patch
Reconfigure file Nxlaucher.inf : Your IP Server ; the Url_fetch should be http://yourip/fetch.php (default is .dll,change into .php),remember it has 2line URL_Fetch in this file
Reconfigure file Gunbound.inf : so easy J (only configure IP)
Important Step: Go to Windows\System32\Drivers\etc\ open file host.ics with notepad,insert these lines into that file and save as read only file
192.168.159.1 update.nprotect.com
192.168.159.1 update.nprotect.net
192.168.159.1 guard.gunbound.net

You should make a backup file before doing this step ( 192.168.159.1 is IP use for this server ,you must change it into your serverIP if you use original Server and edit it

Now you run your Game
Remember that,you should use 192.168.159.1 if this is the first time you are trying to install this Game.You can change all configurations after have experiences
Good luck

- lehaimien



HOW TO CONFIGURE THE GUNBOUND.INI & NYX-LAUNCHER.INI:



LAUNCHER INI

[NyxLauncher]
Url_Fetch=http://fetch.stoleyour.net/fetch.php
Url_ForgotPwd=http://www.yoursite.com/
Url_Signup=http://www.yoursite.com/register.html
Url_FindId=http://www.yoursite.com/
Url_Softnyx=http://www.yoursite.com/
Url_Ad=http://www.yoursite.com/
Ip=YOURIP
Port=8372
AppId=400
Version=401
CookieDomain=http://www.yoursite.com/
CookieName=Softnyx_Eng
LastGame=Gunbound

[Gunbound]
AppId=2101
Url_Notice=http://www.yoursite.com/notice/note_wc.htm
Url_ManualPatch=http://www.yoursite.com/
Url_FullDownload=http://www.yoursite.com/
Url_Fetch=http://fetch.stoleyour.net/fetch.php

[Rakion]
AppId=11001
Url_Notice=http://softnyx.net/fetch_note/note_rakion.htm
Url_ManualPatch=http://rakion.softnyx.net/download/client.asp
Url_FullDownload=http://gunbound.softnyx.net/03_how/00_download.asp
Url_Fetch=http://fetch.gunbound.net:844/fetch/fetch.dll
Option=risoption.exe

Answer about 202 error while entering in the server:

Other way by this error can be generated is:
Missing set the properly permission, inside the GUNBOUND DB while use navicat or other tool, see the screenshot for see what im talking about.

Screenshot:
Most user only make permission in this part only


but you need setup in this part too.





GBWC REGISTRATION PAGE:


Just something I quickly wrote for you guys with WC servers.

The only thing you really need to touch is at the very beginning of the file. The rest is done automatically. Includes:
- Super Power User
- Administrative Registering
- Editing starting gold
- Admins can choose not to have a country displayed at all
- TOS with customizable "i accept"
- Edit starting GP
- Edit starting Cash
- Edit starting AUTH (no point really, but I threw it in there anyways)
- Choose which item the script will send to the user

Just throw in your SQL host, user, pass, and the GunBound database name and you're all good to go. It's defaulted to "root" without a password. Enjoy.

Save as "index.php" and throw it somewhere on your webhost.

Edit: Forgot to upload the ranks. Just throw the ranks folder in the root directory of the registration page.


PHP Code:
<?php

/*
Just edit everything below to set everything up for your server. Else, don't touch the script
unless you know what you're doing.
*/



/*SQL Creditenials*/
$host = "localhost"; //The host of your SQL server. Usually localhost
$user = "root"; //The user of your SQL server.
$password = ""; //The password to the user of your SQL server.
$database = "gunbound"; //Your GunBound database name

/*Administrator Override*/
$admin = 0; //If the value is 0, the registrant will be registered as a regular user. If 1, their AUTH will be 100 and with admin hammer rank. Default is 0.
$superuser = 0; //Gives the registrant "Super Power User". Default is 0.
$superuseritem = 204801; //The item that enables a user to have "super power user"
$reg = 0; //Turns the registration form on and off.
$admingold = 999999999;
$admincash = 999999999;

/*Registration defaults*/
$rank = 19; //If the value is 19, they will be a CHICK. If 18, hammer, etc...etc.. Can be overridden by the admin override
$gp = 1000; //Starting GP of the account. Default is 1000
$gold = 0; //Starting GOLD for the account. Default is 0.
$cash = 0; //Starting CASH for the account. Default is 0.
$auth = 1; //Default: 1, GM: *** (override) Admin: 100

/*Misc*/
$acpt = "i accept";
$srvname = "GunBound Private Server";

/*
Just edit everything above to set everything up for your server. Else, don't touch the script
unless you know what you're doing.
*/










$link = mysql_connect($host,$user,$password);

if(!$link){ mysql_error(); die();}
mysql_select_db($database) or mysql_error() and die();

$register = $_POST['action'];

$countrysel = " <option value=1 >Afghanistan</option>
<option value=2 >Albania</option>
<option value=3 >Algeria</option>
<option value=4 >Andorra</option>
<option value=5 >Angola</option>
<option value=6 >Anguilla</option>
<option value=7 >Antarctica</option>
<option value=8 >Antigua and Barbuda</option>
<option value=220 >APO</option>
<option value=9 >Argentina</option>
<option value=10 >Armenia</option>
<option value=11 >Aruba</option>
<option value=12 >Australia</option>
<option value=13 >Austria</option>
<option value=14 >Azerbaijan</option>
<option value=15 >Bahamas</option>
<option value=16 >Bahrain</option>
<option value=17 >Bangladesh</option>
<option value=18 >Barbados</option>
<option value=21 >Belarus</option>
<option value=19 >Belgium</option>
<option value=20 >Belize</option>
<option value=22 >Benin</option>
<option value=23 >Bermuda</option>
<option value=24 >Bhutan</option>
<option value=25 >Bolivia</option>
<option value=26 >Bosnia and Herzegovina</option>
<option value=27 >Botswana</option>
<option value=223 >Bouvet Island</option>
<option value=28 >Brazil</option>
<option value=224 >British Indian Ocean Territory</option>
<option value=241 >British Virgin Islands</option>
<option value=29 >Brunei</option>
<option value=30 >Bulgaria</option>
<option value=31 >Burkina Faso</option>
<option value=32 >Burundi</option>
<option value=33 >Cambodia</option>
<option value=34 >Cameroon</option>
<option value=35 >Canada</option>
<option value=36 >Cape Verde</option>
<option value=37 >Cayman Islands</option>
<option value=38 >Central African Republic</option>
<option value=225 >Chad</option>
<option value=39 >Chile</option>
<option value=41 >Christmas Island</option>
<option value=226 >Cocos(Keeling) Islands</option>
<option value=42 >Colombia</option>
<option value=43 >Comoros</option>
<option value=44 >Congo</option>
<option value=46 >Cook Islands</option>
<option value=47 >Costa Rica</option>
<option value=48 >Cote D'Ivoire</option>
<option value=49 >Croatia</option>
<option value=50 >Cuba</option>
<option value=51 >Cyprus</option>
<option value=52 >Czech Republic</option>
<option value=45 >Democratic Republic of the Congo</option>
<option value=53 >Denmark</option>
<option value=54 >Djibouti</option>
<option value=55 >Dominica</option>
<option value=56 >Dominican Republic</option>
<option value=227 >East Timor</option>
<option value=57 >Ecuador</option>
<option value=58 >Egypt</option>
<option value=59 >El Salvador</option>
<option value=60 >Equatorial Guinea</option>
<option value=61 >Eritrea</option>
<option value=62 >Estonia</option>
<option value=63 >Ethiopia</option>
<option value=242 >EU</option>
<option value=64 >Falkland Islands</option>
<option value=228 >Faroe Islands</option>
<option value=65 >Fiji</option>
<option value=66 >Finland</option>
<option value=221 >FPO</option>
<option value=67 >France</option>
<option value=68 >French Guiana</option>
<option value=69 >French Polynesia</option>
<option value=229 >French Southern Territories</option>
<option value=70 >Gabon</option>
<option value=71 >Gambia</option>
<option value=73 >Georgia</option>
<option value=72 >Germany</option>
<option value=75 >Ghana</option>
<option value=230 >Gibraltar</option>
<option value=76 >Greece</option>
<option value=77 >Greenland</option>
<option value=78 >Grenada</option>
<option value=79 >Guadeloupe</option>
<option value=80 >Guam</option>
<option value=81 >Guatemala</option>
<option value=82 >Guinea</option>
<option value=83 >Guinea-Bissau</option>
<option value=84 >Guyana</option>
<option value=85 >Haiti</option>
<option value=231 >Heard and McDonald Islands</option>
<option value=86 >Honduras</option>
<option value=87 >Hong Kong</option>
<option value=88 >Hungary</option>
<option value=89 >Iceland</option>
<option value=90 >India</option>
<option value=91 >Indonesia</option>
<option value=92 >Iran</option>
<option value=93 >Iraq</option>
<option value=94 >Ireland</option>
<option value=95 >Israel</option>
<option value=96>Italy</option>
<option value=97 >Jamaica</option>
<option value=98 >Japan</option>
<option value=99 >Jordan</option>
<option value=\"100\" >Kazakhstan</option>
<option value=\"101\" >Kenya</option>
<option value=\"102\" >Kiribati</option>
<option value=\"103\" >Kitts and Nevis</option>
<option value=\"107\" >Kuwait</option>
<option value=\"106\" >Kyrgyzstan</option>
<option value=\"108\" >Laos</option>
<option value=\"109\" >Latvia</option>
<option value=\"110\" >Lebanon</option>
<option value=\"111\" >Lesotho</option>
<option value=\"112\" >Liberia</option>
<option value=\"113\" >Libya</option>
<option value=\"114\" >Liechtenstein</option>
<option value=\"115\" >Lithuania</option>
<option value=\"116\" >Luxembourg</option>
<option value=\"117\" >Macau</option>
<option value=\"118\" >Macedonia</option>
<option value=\"119\" >Madagascar</option>
<option value=\"126\" >Malawi</option>
<option value=\"120\" >Malaysia</option>
<option value=\"121\" >Maldives</option>
<option value=\"122\" >Mali</option>
<option value=\"124\" >Malta</option>
<option value=\"123\" >Marshall Islands</option>
<option value=\"127\" >Martinique</option>
<option value=\"128\" >Mauritania</option>
<option value=\"129\" >Mauritius</option>
<option value=\"130\" >Mayotte</option>
<option value=\"131\" >Mexico</option>
<option value=\"132\" >Micronesia</option>
<option value=\"133\" >Moldova</option>
<option value=\"232\" >Monaco</option>
<option value=\"134\" >Mongolia</option>
<option value=\"135\" >Montserrat</option>
<option value=\"136\" >Morocco</option>
<option value=\"137\" >Mozambique</option>
<option value=\"138\" >Myanmar</option>
<option value=\"139\" >Namibia</option>
<option value=\"140\" >Nauru</option>
<option value=\"141\" >Nepal</option>
<option value=\"142\" >Netherlands</option>
<option value=\"143\" >Netherlands Antilles</option>
<option value=\"144\" >New Caledonia</option>
<option value=\"145\" >New Zealand</option>
<option value=\"146\" >Nicaragua</option>
<option value=\"147\" >Niger</option>
<option value=\"148\" >Nigeria</option>
<option value=\"149\" >Niue</option>
<option value=\"233\" >Norfolk Island</option>
<option value=\"104\" >North Korea</option>
<option value=\"125\" >Northern Mariana Islands</option>
<option value=\"150\" >Norway</option>
<option value=\"151\" >Oman</option>
<option value=\"222\" >Other</option>
<option value=\"152\" >Pakistan</option>
<option value=\"153\" >Palau</option>
<option value=\"244\" >Palestine</option>
<option value=\"154\" >Panama</option>
<option value=\"155\" >Papua New Guinea</option>
<option value=\"156\" >Paraguay</option>
<option value=\"40\" >People's Rep. of China</option>
<option value=\"157\" >Peru</option>
<option value=\"158\" >Philippines</option>
<option value=\"159\" >Pitcairn Island</option>
<option value=\"160\" >Poland</option>
<option value=\"161\" >Portugal</option>
<option value=\"162\" >Puerto Rico</option>
<option value=\"163\" >Qatar</option>
<option value=\"164\" >Reunion</option>
<option value=\"165\" >Romania</option>
<option value=\"166\" >Russia</option>
<option value=\"167\" >Rwanda</option>
<option value=\"74\" >S. Georgia and the S. Sandwich Is.</option>
<option value=\"234\" >Saint Helena</option>
<option value=\"168\" >Saint Lucia</option>
<option value=\"235\" >Saint Pierre and Miquelon</option>
<option value=\"169\" >Saint Vincent and the Grenadines</option>
<option value=\"170\" >Samoa-American</option>
<option value=\"171\" >Samoa-Western</option>
<option value=\"172\" >San Marino</option>
<option value=\"173\" >Sao Tome and Principe</option>
<option value=\"174\" >Saudi Arabia</option>
<option value=\"175\" >Senegal</option>
<option value=\"245\" >Serbia and Montenegro</option>
<option value=\"176\" >Seychelles</option>
<option value=\"177\" >Sierra Leone</option>
<option value=\"178\" >Singapore</option>
<option value=\"179\" >Slovakia</option>
<option value=\"180\" >Slovenia</option>
<option value=\"181\" >Solomon Islands</option>
<option value=\"182\" >Somalia</option>
<option value=\"183\" >South Africa</option>
<option value=\"105\" >South Korea</option>
<option value=\"184\" >Spain</option>
<option value=\"185\" >Sri Lanka</option>
<option value=\"186\" >Sudan</option>
<option value=\"187\" >Suriname</option>
<option value=\"236\" >Svalbard and Jan Mayen Islands</option>
<option value=\"188\" >Swaziland</option>
<option value=\"189\" >Sweden</option>
<option value=\"190\" >Switzerland</option>
<option value=\"191\" >Syria</option>
<option value=\"192\" >Taiwan</option>
<option value=\"193\" >Tajikistan</option>
<option value=\"194\" >Tanzania</option>
<option value=\"195\" >Thailand</option>
<option value=\"196\" >Togo</option>
<option value=\"237\" >Tokelau</option>
<option value=\"197\" >Tonga</option>
<option value=\"198\" >Trinidad and Tobago</option>
<option value=\"199\" >Tunisia</option>
<option value=\"200\" >Turkey</option>
<option value=\"201\" >Turkmenistan</option>
<option value=\"238\" >Turks and Caicos Islands</option>
<option value=\"202\" >Tuvalu</option>
<option value=\"203\" >Uganda</option>
<option value=\"204\" >Ukraine</option>
<option value=\"205\" >United Arab Emirates</option>
<option value=\"206\" >United Kingdom</option>
<option value=\"239\" >United States Minor Outlying Islands</option>
<option value=\"208\" >Uruguay</option>
<option value=\"207\" >United States of America</option>
<option value=\"209\" >Uzbekistan</option>
<option value=\"210\" >Vanuatu</option>
<option value=\"211\" >Vatican City</option>
<option value=\"212\" >Venezuela</option>
<option value=\"214\" >Vietnam</option>
<option value=\"213\" >Virgin Islands</option>
<option value=\"240\" >Wallis and Futuna</option>
<option value=\"215\" >Western Sahara</option>
<option value=\"216\" >Yemen</option>
<option value=\"217\" >Yugoslavia</option>
<option value=\"218\" >Zambia</option>
<option value=\"219\" >Zimbabwe</option>";


if(!$register){
if(!$admin){
echo "Please register an account using the form below:<p>";
if($superuser){ echo "<b>This user will be a super power user upon registration</b><p>";}
echo "<form action=index.php method=post>
<input type=hidden name=action value=1>
ID: <input name=id type=text maxlength=12 width=20><br>
Password: <input name=pw type=password maxlength=12 width=20><br>
E-mail: <input name=email type=text maxlength=12 width=20><br>
Gender: <input name=gender type=radio value=0 checked> Male <input name=gender type=radio value=1> Female<br>
<select name=country>$countrysel</select><p><p>

By typing in \"$acpt\", you agree to the following conditions that:<br>
- we may terminate your account at any given time and date for any reason or no reason at all.<br>
- your account or it's items have no cash value whatsoever.<br>
- you do not work for Softnyx, or any of it's licensed affiliates including, but not limited to Mobius, ijji, etc.<br>
- you do not work for anyone related to law-enforcement, copyright-enforcement, or government agency (including, but not
limited to ESA, MPAA, RIAA, CIA, FBI, etc..)<br>
- you understand that this server is not meant to be as a replacement for the real and official servers and
that it may be shut down at any given time.<p>
Do you agree? <input name=accept type=text maxlength=50 width=20><br>

<input type=submit value=\"Register\"></form>";
}
if($admin){
echo "Please register an account using the form below:<p>
<b><font color='red'>WARNING:</b> Administrator enabled registration</font><p>";
if($superuser){ echo "<b>This user will be a super power user upon registration</b><p>";}
echo "<form action=index.php method=post>
<input type=hidden name=action value=1>
ID: <input name=id type=text maxlength=12 width=20><br>
Password: <input name=pw type=password maxlength=12 width=20><br>
E-mail: <input name=email type=text maxlength=12 width=20><br>
Gender: <input name=gender type=radio value=0 checked> Male <input name=gender type=radio value=1> Female<br>
<select name=country><option value=\"246\" >ADMIN (Undisclosed Country)</option>
$countrysel</select><p><p>
By typing in \"<b>$acpt</b>\", you agree to the following conditions that:<br>
- we may terminate your account at any given time and date for any reason or no reason at all.<br>
- your account or it's items have no cash value whatsoever.<br>
- you do not work for Softnyx, or any of it's licensed affiliates including, but not limited to Mobius, ijji, etc.<br>
- you do not work for anyone related to law-enforcement, copyright-enforcement, or government agency (including, but not
limited to ESA, MPAA, RIAA, CIA, FBI, etc..)<br>
- you understand that this server is not meant to be as a replacement for the real and official servers and
that it may be shut down at any given time.<p>
Do you agree? <input name=accept type=text maxlength=50 width=20><br>
<input type=submit value=\"Register\"></form>";
}}
$accept = mysql_escape_string(stripslashes($_POST['accept']));
$regid = mysql_escape_string(stripslashes($_POST['id']));
$regpass = mysql_escape_string(stripslashes($_POST['pw']));
$regemail = mysql_escape_string(stripslashes($_POST['email']));
$regcountry = mysql_escape_string(stripslashes($_POST['country']));
$reggender = mysql_escape_string(stripslashes($_POST['gender']));

if($register){
if($accept!=$acpt){ echo "You failed or forgot to agree to our terms of service."; die();} else { echo "Thanks for accepting our Terms Of Service!<p>";}
echo "Now registering your account, please wait...<p>";

if($admin){
echo "We're creating an administrator account for you..<p>";

$reguser = "INSERT INTO `$database`.`user` (
`Id` ,`user` ,`Gender` ,`NickName` ,`Password` ,`Status` ,`MuteTime` ,`RestrictTime` ,`Authority` ,`E_Mail` ,`Country` ,`User_Level` ,`Authority2`)
VALUES (
'$regid', '$regid', '$reggender', '$regid', '$regpass', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '100', '$regemail', '$regcountry', '1', '100');";

$reggunwcuser = "INSERT INTO `$database`.`gunwcuser` (
`Id` ,`user` ,`Gender` ,`NickName` ,`Password` ,`Status` ,`MuteTime` ,`RestrictTime` ,`Authority` ,`E_Mail` ,`Country` ,`User_Level` ,`Authority2`,`AuthorityBackup`)
VALUES (
'$regid', '$regid', '$reggender', '$regid', '$regpass', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '100', '$regemail', '$regcountry', '1', '100', '100');";

$reggame = " INSERT INTO `$database`.`game` (
`Id` ,`Nickname` ,`Guild` ,`MemberCount` ,`GuildRank` ,`Money` ,`EventScore0` ,`EventScore1` ,`EventScore2` ,`EventScore3` ,`AvatarWear` ,`Prop1` ,`Prop2` ,`AdminGift` ,`TotalScore` ,`SeasonScore` ,`TotalGrade` ,`SeasonGrade` ,`TotalRank` ,`SeasonRank` ,`AccumShot` ,`AccumDamage` ,`StageRecords` ,`MobileRecords` ,`LastUpdateTime` ,`NoRankUpdate` ,`ClientData` ,`Country` ,`CountryGrade` ,`CountryRank` ,`GiftProhibitTime`)
VALUES ('$regid', '$regid', '', '', '', '$admingold', '0', '0', '0', '0', '0', '0', '0', '0', '$gp', '$gp', '20', '20', '0', '0', '0', '0', '0', '0', '0000-00-00 00:00:00', '0', '0', '$regcountry', '20', '0', '0000-00-00 00:00:00'
) ";

$regcash = "INSERT INTO `$database`.`cash` (`Id`,`Cash`) VALUES ('$regid','$admincash')";

} else {
$reguser = "INSERT INTO `$database`.`user` (
`Id` ,`user` ,`Gender` ,`NickName` ,`Password` ,`Status` ,`MuteTime` ,`RestrictTime` ,`Authority` ,`E_Mail` ,`Country` ,`User_Level` ,`Authority2`)
VALUES (
'$regid', '$regid', '$reggender', '$regid', '$regpass', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '$auth', '$regemail', '$regcountry', '1', '$auth');";

$reggunwcuser = "INSERT INTO `$database`.`gunwcuser` (
`Id` ,`user` ,`Gender` ,`NickName` ,`Password` ,`Status` ,`MuteTime` ,`RestrictTime` ,`Authority` ,`E_Mail` ,`Country` ,`User_Level` ,`Authority2`,`AuthorityBackup`)
VALUES (
'$regid', '$regid', '$reggender', '$regid', '$regpass', '1', '0000-00-00 00:00:00', '0000-00-00 00:00:00', '$auth', '$regemail', '$regcountry', '1', '$auth', '$auth');";

$reggame = " INSERT INTO `$database`.`game` (
`Id` ,`Nickname` ,`Guild` ,`MemberCount` ,`GuildRank` ,`Money` ,`EventScore0` ,`EventScore1` ,`EventScore2` ,`EventScore3` ,`AvatarWear` ,`Prop1` ,`Prop2` ,`AdminGift` ,`TotalScore` ,`SeasonScore` ,`TotalGrade` ,`SeasonGrade` ,`TotalRank` ,`SeasonRank` ,`AccumShot` ,`AccumDamage` ,`StageRecords` ,`MobileRecords` ,`LastUpdateTime` ,`NoRankUpdate` ,`ClientData` ,`Country` ,`CountryGrade` ,`CountryRank` ,`GiftProhibitTime`)
VALUES ('$regid', '$regid', '', '', '', '$gold', '0', '0', '0', '0', '0', '0', '0', '0', '$gp', '$gp', '$rank', '$rank', '0', '0', '0', '0', '0', '0', '0000-00-00 00:00:00', '0', '0', '$regcountry', '$rank', '0', '0000-00-00 00:00:00'
) ";

$regcash = "INSERT INTO `$database`.`cash` (`Id`,`Cash`) VALUES ('$regid','$cash')";
}

if($superuser){ $regsuperuser = "INSERT INTO $database.chest (`Item`,`Wearing`,`Acquisition`,`Volume`,`Owner`,`ExpireType`) VALUES ('$superuseritem','1','C','1','$regid','I')";} else {$regsuperuser = "";}

$sql = "SELECT Id FROM user WHERE Id='$regid'";
$runsql = mysql_query($sql);
$infosql = mysql_fetch_array($runsql, MYSQL_ASSOC);

$checkid = $infosql['Id'];

if($checkid==$regid){ echo "<script>
alert('This ID already exists. Please try again')
history.back()
</script>This ID already exists. Please try again."; die();}
if(!$regid){echo "You must input an ID!"; die();}
if(!$regpass){echo "You must input a password!"; die();}
if(!$regemail){echo "You must input an email address!"; die();}
mysql_query($reguser) or die("SQL USER ERROR!");
mysql_query($reggunwcuser) or die("SQL GUNWCUSER ERROR!");;
mysql_query($reggame) or die("SQL GAME ERROR!");
mysql_query($regcash); //Should be able to continue even if an error occurs
mysql_query($regsuperuser); //Should be able to continue even if an error occurs
if($admin){ $rank = 20; }

echo "Congratulations! Your account has been created!<br>
Your information is as follows (please keep for record keeping)<p>

<img src='rank/$rank.png'> <b>$regid</b><br>
Password: $regpass<br>
E-mail: $regemail<br>";
if(!$reggender){echo "Gender: Male<br>";} else {echo "Gender: Female<br>";}
if($superuser){ echo "And you are also a super user!";}
if($admin){ echo " And an administrator!";}
echo "<p><p>
Thank you for registering on $srvname";
}
?>
- Leo The Fox



GUIDE: QUICK GAME FIX:


Quote:
run sv, enter game with Admin account
first type :
/qsman [number_player_wanna_to_play] ( 1 ~ 8 )
then type :
/qsopt number_here ( 1 : solo ; 2 : score ; 3 : tag ; 4 : jewel )
restart your server and happy with new bug fixed =))
=))
-guide by nguyenhuy!


GB TOOLZ (portuguese):


Send big files the easy way. Files too large for email attachments? No problem!



GUNBOUND GM COMMANDS:



/server - check server status
/bcm - broadcast a message
/qsman - quickstart man and new quickstart man
/qsopt - computer icon?
/ban - ban someone
/disconnect - disconnect someone
/close - close a room
/version - version first and last
/limit - grade limit, guild restrict, and functrestrict
/room - room number, number of users, title, password, waiting time, and users
/time - server time
/toid - user id

how to use some of them
/bcm message
/ban -e -d# -h# ID REASON
/disconnect id
/close room#
/room room#
/toid nickname

HOW TO START GAMES:



/shrduatlwkr

note: You have to be room master. Use this for "un-fair" games or if your start button doesn't work :p



mySQL & easyPHP Files!:

MySQL/SQLyog ( Same thing ) : MySQL GUI Tools, MySQL Monitor, MySQL Manager, MySQL Performance Tuning and Optimization

Just put in your email and download, or unless someone else has another URL you can post it here.

EasyPHP: http://sourceforge.net/project/download ... ilename=ea syphp1-8_setup.exe&use_mirror=internap



GUNBOUND RANKING SCRIPTS!:




Quote: Originally Posted by LeoTheFox
Hello.

I'll be posting a rank update script here. Just so you know, it does have leech protection, however the difficulty for removing/disabling it is very simple. If you don't know how to remove it, I suggest you start studying PHP.

World Champion Version
PHP Code:

<?php
echo "Static GP/Grade Updater by Leo The Fox<p>

<b>World Champion Version</b><p>";

//Edit below for your MySQL information
$username = "root";
$password = "";
$host = "localhost";
$database = "gunbound";

//File/Database protection - YOU MUST CHANGE THE FOLLOWING INFORMATION!
$setip = "127.0.0.1";



//Edit below to change the requirements for your server. Make sure it's +1 to what you want it at.
$sdragon = 15001; //Silver Dragon GP Requirement
$rdragon = 13001; //Red Dragon GP Requirement
$bdragon = 11001; //Blue Dragon GP Requirement
$dwand = 9001; //Diamond Wand GP Requirement
$rwand = 8501; //Ruby Wand GP Requirement
$swand = 8001; //Sapphire Wand GP Requirement
$vwand = 7801; //Violet Wand GP Requirement
$gbxp = 7601; //Gold B.AXE + GP Requirement
$gbx = 7501; //Gold B.AXE GP Requirement
$sbxp = 7301; //Silver B.AXE + GP Requirement
$sbx = 7201; //Silver B.AXE GP Requirement
$bxp = 7001; //B.AXE + GP Requirement
$bx = 6901; //B.AXE GP Requirement
$gdx = 6001; //Double Gold GP Requirement
$gx = 5101; //Gold GP Requirement
$sdx = 4201; //Double Silver GP Requirement
$sx = 3501; //Silver GP Requirement
$dmx = 2801; //Double Metal GP Requirement
$mx = 2301; //Metal GP Requirement
$ds = 1801; //Double Stone GP Requirement
$s = 1501; //Stone GP Requirement
$dw = 1201; //Double Wooden GP Requirement
$w = 1101; //Wooden GP Requirement
$c = 1001; //Chick GP Requirement




$ip = $_SERVER["REMOTE_ADDR"];

$connect = mysql_connect($host,$username,$password);
if(!$connect){
echo mysql_error();
die(" Connection failed.");
}
$chr = 0;

mysql_select_db($database) or die("Error selecting database");

if($chr==1){
echo "<u><b>Updating Rank by Number</u></b><p>";
if($ip==$setip)
{

$rank = 0;
$findusr1 = mysql_query("SELECT Id,TotalScore,TotalRank FROM Game ORDER BY TotalScore DESC");

while($row = mysql_fetch_array($findusr1, MYSQL_ASSOC)){
$rank++;
$sql = "UPDATE Game SET TotalRank='$rank' WHERE Id='".$row["Id"]."'";
mysql_query($sql) or die("Rank number update failed.");
echo " - The user <b>'".$row["Id"]."'</b> is rank <b>".$row["TotalRank"]."</b><br>";

}
} else {

echo "Your IP must be $setip to use this file!<p>";

}

echo "<p>";

echo "<u><b>Updating Rank by Grade</u></b><p>"; //lol the lower the rank, they get updated a bunch of times. Wee for coding laziness!
if($ip==$setip)
{

mysql_query("UPDATE Game SET TotalGrade=-4 WHERE TotalScore < $sdragon AND NoRankUpdate=0");
echo " - Updated <b>Silver Dragon</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=-3 WHERE TotalScore < $rdragon AND NoRankUpdate=0");
echo " - Updated <b>Red Dragon</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=-2 WHERE TotalScore < $bdragon AND NoRankUpdate=0");
echo " - Updated <b>Blue Dragon</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=-1 WHERE TotalScore < $dwand AND NoRankUpdate=0");
echo " - Updated <b>Diamond Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=0 WHERE TotalScore < $rwand AND NoRankUpdate=0");
echo " - Updated <b>Ruby Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=1 WHERE TotalScore < $swand AND NoRankUpdate=0");
echo " - Updated <b>Sapphire Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=2 WHERE TotalScore < $vwand AND NoRankUpdate=0");
echo " - Updated <b>Violet Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=3 WHERE TotalScore < $gbxp AND NoRankUpdate=0");
echo " - Updated <b>Gold Battle Axe +</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=4 WHERE TotalScore < $gbx AND NoRankUpdate=0");
echo " - Updated <b>Gold Battle Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=5 WHERE TotalScore < $sbxp AND NoRankUpdate=0");
echo " - Updated <b>Silver Battle Axe +</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=6 WHERE TotalScore < $sbx AND NoRankUpdate=0");
echo " - Updated <b>Silver Battle Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=7 WHERE TotalScore < $bxp AND NoRankUpdate=0");
echo " - Updated <b>Battle Axe +</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=8 WHERE TotalScore < $bx AND NoRankUpdate=0");
echo " - Updated <b>Battle Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=9 WHERE TotalScore < $gdx AND NoRankUpdate=0");
echo " - Updated <b>Double Gold Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=10 WHERE TotalScore < $gx AND NoRankUpdate=0");
echo " - Updated <b>Gold Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=11 WHERE TotalScore < $sdx AND NoRankUpdate=0");
echo " - Updated <b>Double Silver Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=12 WHERE TotalScore < $sx AND NoRankUpdate=0");
echo " - Updated <b>Silver Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=13 WHERE TotalScore < $dmx AND NoRankUpdate=0");
echo " - Updated <b>Double Metal Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=14 WHERE TotalScore < $mx AND NoRankUpdate=0");
echo " - Updated <b>Metal Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=15 WHERE TotalScore < $ds AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=16 WHERE TotalScore < $s AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=17 WHERE TotalScore < $dw AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=18 WHERE TotalScore < $w AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=19 WHERE TotalScore < $c AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";

} else { echo "Your IP must be $setip to use this file!<p>";
}


echo "<p>";

echo "<u><b>Updating Country Grade</u></b><p>";
if($ip==$setip){
$findusr1 = mysql_query("SELECT Id,TotalGrade,CountryGrade FROM Game");
while($row = mysql_fetch_array($findusr1, MYSQL_ASSOC)){
$grade = $row["TotalGrade"];
mysql_query("UPDATE Game SET CountryGrade=$grade");

}
echo "- Updated<p>";
} else {

echo "Your IP must be $setip to use this file!<p>";
}

if($ip==$setip){
echo "<p>Done.";
} else {echo "<p>Your IP did not match our records. Please check the PHP code and try again.";}
} else {
echo "Leech protection enabled. Please disable it first.";
}
?>

Thor's Hammer Version
PHP Code:

<?php
echo "Static GP/Grade Updater by Leo The Fox<p>

<b>Thor's Hammer Version</b><p>";

//Edit below for your MySQL information
$username = "root";
$password = "";
$host = "localhost";
$database = "gunbound";

//File/Database protection - YOU MUST CHANGE THE FOLLOWING INFORMATION!
$setip = "127.0.0.1";



//Edit below to change the requirements for your server. Make sure it's +1 to what you want it at.
$sdragon = 15001; //Silver Dragon GP Requirement
$rdragon = 13001; //Red Dragon GP Requirement
$bdragon = 11001; //Blue Dragon GP Requirement
$dwand = 9001; //Diamond Wand GP Requirement
$rwand = 8501; //Ruby Wand GP Requirement
$swand = 8001; //Sapphire Wand GP Requirement
$vwand = 7801; //Violet Wand GP Requirement
$gbxp = 7601; //Gold B.AXE + GP Requirement
$gbx = 7501; //Gold B.AXE GP Requirement
$sbxp = 7301; //Silver B.AXE + GP Requirement
$sbx = 7201; //Silver B.AXE GP Requirement
$bxp = 7001; //B.AXE + GP Requirement
$bx = 6901; //B.AXE GP Requirement
$gdx = 6001; //Double Gold GP Requirement
$gx = 5101; //Gold GP Requirement
$sdx = 4201; //Double Silver GP Requirement
$sx = 3501; //Silver GP Requirement
$dmx = 2801; //Double Metal GP Requirement
$mx = 2301; //Metal GP Requirement
$ds = 1801; //Double Stone GP Requirement
$s = 1501; //Stone GP Requirement
$dw = 1201; //Double Wooden GP Requirement
$w = 1101; //Wooden GP Requirement
$c = 1001; //Chick GP Requirement




$ip = $_SERVER["REMOTE_ADDR"];

$connect = mysql_connect($host,$username,$password);
if(!$connect){
echo mysql_error();
die(" Connection failed.");
}
$chr = 0;

mysql_select_db($database) or die("Error selecting database");

if($chr==1){
echo "<u><b>Updating Rank by Number</u></b><p>";
if($ip==$setip)
{

$rank = 0;
$findusr1 = mysql_query("SELECT Id,TotalScore,TotalRank FROM Game ORDER BY TotalScore DESC");

while($row = mysql_fetch_array($findusr1, MYSQL_ASSOC)){
$rank++;
$sql = "UPDATE Game SET TotalRank='$rank' WHERE Id='".$row["Id"]."'";
mysql_query($sql) or die("Rank number update failed.");
echo " - The user <b>'".$row["Id"]."'</b> is rank <b>".$row["TotalRank"]."</b><br>";

}
} else {

echo "Your IP must be $setip to use this file!<p>";

}

echo "<p>";

echo "<u><b>Updating Rank by Grade</u></b><p>"; //lol the lower the rank, they get updated a bunch of times. Wee for coding laziness!
if($ip==$setip)
{

mysql_query("UPDATE Game SET TotalGrade=-4 WHERE TotalScore < $sdragon AND NoRankUpdate=0");
echo " - Updated <b>Silver Dragon</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=-3 WHERE TotalScore < $rdragon AND NoRankUpdate=0");
echo " - Updated <b>Red Dragon</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=-2 WHERE TotalScore < $bdragon AND NoRankUpdate=0");
echo " - Updated <b>Blue Dragon</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=-1 WHERE TotalScore < $dwand AND NoRankUpdate=0");
echo " - Updated <b>Diamond Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=0 WHERE TotalScore < $rwand AND NoRankUpdate=0");
echo " - Updated <b>Ruby Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=1 WHERE TotalScore < $swand AND NoRankUpdate=0");
echo " - Updated <b>Sapphire Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=2 WHERE TotalScore < $vwand AND NoRankUpdate=0");
echo " - Updated <b>Violet Wand</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=3 WHERE TotalScore < $gbxp AND NoRankUpdate=0");
echo " - Updated <b>Gold Battle Axe +</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=4 WHERE TotalScore < $gbx AND NoRankUpdate=0");
echo " - Updated <b>Gold Battle Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=5 WHERE TotalScore < $sbxp AND NoRankUpdate=0");
echo " - Updated <b>Silver Battle Axe +</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=6 WHERE TotalScore < $sbx AND NoRankUpdate=0");
echo " - Updated <b>Silver Battle Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=7 WHERE TotalScore < $bxp AND NoRankUpdate=0");
echo " - Updated <b>Battle Axe +</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=8 WHERE TotalScore < $bx AND NoRankUpdate=0");
echo " - Updated <b>Battle Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=9 WHERE TotalScore < $gdx AND NoRankUpdate=0");
echo " - Updated <b>Double Gold Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=10 WHERE TotalScore < $gx AND NoRankUpdate=0");
echo " - Updated <b>Gold Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=11 WHERE TotalScore < $sdx AND NoRankUpdate=0");
echo " - Updated <b>Double Silver Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=12 WHERE TotalScore < $sx AND NoRankUpdate=0");
echo " - Updated <b>Silver Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=13 WHERE TotalScore < $dmx AND NoRankUpdate=0");
echo " - Updated <b>Double Metal Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=14 WHERE TotalScore < $mx AND NoRankUpdate=0");
echo " - Updated <b>Metal Axe</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=15 WHERE TotalScore < $ds AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=16 WHERE TotalScore < $s AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=17 WHERE TotalScore < $dw AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=18 WHERE TotalScore < $w AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";
mysql_query("UPDATE Game SET TotalGrade=19 WHERE TotalScore < $c AND NoRankUpdate=0");
echo " - Updated <b>Double Stone Hammer</b> grade<br>";

} else { echo "Your IP must be $setip to use this file!<p>";
}


echo "<p>";


if($ip==$setip){
echo "<p>Done.";
} else { echo "<p>Your IP did not match our records. Please check the PHP code and try again.";}
} else {
echo "Leech protection enabled. Please disable it first.";
}
?>

Enjoy.




Quote: Originally Posted by PaisaPK
WC SCRIPT
Quote: Originally Posted by PaisaPK
Quote: Originally Posted by PaisaPK
heres the good script =/
the other one had serious bugs =)

total grade
PHP Code:

<?php
set_time_limit(1200);

#How many
$rk[-4]="1";
$rk[-3]="3";
$rk[-2]="6";

#Percentage
$rk[-1]="0.1";
$rk[0]="1";
$rk[1]="3";
$rk[2]="6";
$rk[3]="10";
$rk[4]="20";
$rk[5]="30";
$rk[6]="50";
$rk[7]="70";
$rk[8]="90";

#GP per Rank
$rk[9]="6000";
$rk[10]="5100";
$rk[11]="4200";
$rk[12]="3500";
$rk[13]="2800";
$rk[14]="2300";
$rk[15]="1800";
$rk[16]="1500";
$rk[17]="1200";
$rk[18]="1100";
$rk[19]="0";

$SQL_User="root";
$SQL_Pass=" ";
$SQL_Host="127.0.0.1";
$SQL_Base="gunbound";

mysql_connect($SQL_Host,$SQL_User,$SQL_Pass);
mysql_select_db($SQL_Base);

$info = mysql_query("SELECT Id, TotalScore, TotalGrade FROM game WHERE NoRankUpdate = '0' AND LastUpdateTime != '0000-00-00' ORDER BY TotalScore DESC");
$count=0;

while($row= mysql_fetch_array($info)){
$count++;

mysql_query("UPDATE `game` SET TotalRank = '".$count."' WHERE Id = '".$row['Id']."' ");

if($row['TotalGrade'] >= "-4" && $row['TotalGrade'] <= "19"){

if($count == $rk[-4]){
mysql_query("UPDATE `game` SET TotalGrade = '-4' WHERE Id = '".$row['Id']."' ");
$h_grade = "-4";
}

if($count > $rk[-4] && $count <= ($rk[-4] + $rk[-3]) ){
mysql_query("UPDATE `game` SET TotalGrade = '-3' WHERE Id = '".$row['Id']."' ");
$h_grade = "-3";
}

if($count > ($rk[-4] + $rk[-3]) && $count <= ($rk[-4] + $rk[-3] + $rk[-2]) ){
mysql_query("UPDATE `game` SET TotalGrade = '-2' WHERE Id = '".$row['Id']."' ");
$h_grade = "-2";
}

if ($count == ($rk[-4] + $rk[-3] + $rk[-2]) ){
$max = $row['TotalScore'];
}

if($count > ($rk[-4] + $rk[-3] + $rk[-2]) ){

for($rank = "19"; $rank >= "-1" && $rank <= "19"; $rank--){

if($rank <= "8"){
$update = ($max-($rk[$rank]*$max/100));
} else {
$update = $rk[$rank];
}

if($row['TotalScore'] >= $update){
mysql_query("UPDATE `game` SET TotalGrade = '".$rank."' WHERE Id = '".$row['Id']."' ");
}
}
}
}

echo (" <b>No:</b> ".$count." <b>Name:</b> ".$row['Id']." <b>GP:</b> ".$row['TotalScore']." <br> ");

}
?>

country rank
PHP Code:

<?php
set_time_limit(1200);

#How many
$rk[-4]="1";
$rk[-3]="3";
$rk[-2]="6";

#Percentage
$rk[-1]="1";
$rk[0]="2";
$rk[1]="5";
$rk[2]="10";
$rk[3]="20";
$rk[4]="30";
$rk[5]="39";
$rk[6]="47";
$rk[7]="55";
$rk[8]="62";
$rk[9]="69";
$rk[10]="75";
$rk[11]="81";
$rk[12]="86";
$rk[13]="90";
$rk[14]="94";
$rk[15]="97";
$rk[16]="99";

#GP per Rank
$rk[17]="1200";
$rk[18]="1100";
$rk[19]="0";

$SQL_User="root";
$SQL_Pass=" ";
$SQL_Host="127.0.0.1";
$SQL_Base="gunbound";

mysql_connect($SQL_Host,$SQL_User,$SQL_Pass);
mysql_select_db($SQL_Base);

for($country = "1"; $country <= "245"; $country++){
$info = mysql_query("SELECT Id, TotalScore, CountryGrade FROM game WHERE Country = '".$country."' AND NoRankUpdate = '0' AND LastUpdateTime != '0000-00-00' ORDER BY TotalScore DESC");
$count=0;

if(mysql_num_rows($info) != "0"){
while($row= mysql_fetch_array($info)){
$count++;

mysql_query("UPDATE game SET CountryRank='".$count."' WHERE Id = '".$row['Id']."'");

if($row['CountryGrade'] >= "-4" && $row['CountryGrade'] <= "19"){

if($count == $rk[-4]){
mysql_query("UPDATE `game` SET CountryGrade = '-4' WHERE Id = '".$row['Id']."'");
}

if($count > $rk[-4] && $count <= ($rk[-4] + $rk[-3]) ){
mysql_query("UPDATE `game` SET CountryGrade = '-3' WHERE Id='".$row['Id']."'");
}

if($count > ($rk[-4] + $rk[-3]) && $count <= ($rk[-4] + $rk[-3] + $rk[-2]) ){
mysql_query("UPDATE `game` SET CountryGrade = '-2' WHERE Id = '".$row['Id']."'");
}

if ($count == ($rk[-4] + $rk[-3] + $rk[-2]) ){
$max = $row['TotalScore'];
}

if($count > ($rk[-4] + $rk[-3] + $rk[-2]) ){

for($rank = "19"; $rank >= "-1" && $rank <= "19"; $rank--){

if($rank <= "16"){
$update = ($max-($rk[$rank]*$max/100));
} else {
$update = $rk[$rank];
}

if($row['TotalScore'] >= $update){
mysql_query("UPDATE `game` SET CountryGrade = '".$rank."' WHERE Id = '".$row['Id']."' ");
}
}
}
}

echo (" <b>Country:</b> ".$country." <b>Rank:</b> ".$count." <b>Name:</b> ".$row['Id']." <b>GP:</b> ".$row['TotalScore']." <br> ");

}
}
}

mysql_close();
?>[url][/url]
hacking Black

www.codeblack.net.tc
gamemaster
Hacker Smacker
 
Posts: 40
Joined: Thu May 15, 2008 8:15 pm
Location: [CodeBlack] - [HackingBlack]

Postby HyackDragon » Fri Jan 30, 2009 11:55 pm

lol ? so many things .. :S
leeched ... do i think
credits? :?
Image
Image
Image
Image
User avatar
HyackDragon
Probably Popular
 
Posts: 1293
Joined: Fri Mar 21, 2008 12:21 pm
Location: Behind The Computer

Postby Hitman » Sat Jan 31, 2009 9:55 pm

i dont even bother to read this..
=.="
so may STUFF...
L. Spiro wrote:bummybum, stop spamming/making useless posts

Image
Made By aldis
Image
Made By SpeedWing
Image
My Latest Own Siggy
Image
User avatar
Hitman
Pro++
 
Posts: 1880
Joined: Mon Mar 24, 2008 3:41 pm
Location: MHS Forum(Malaysia)

Postby Pulse » Sun Feb 01, 2009 5:03 pm

that's an overpost...
The Pulse™ Of Death™ Has Been Awakened™...Crushing All In Its Way.
User avatar
Pulse
Hacker Smacker
 
Posts: 47
Joined: Fri Jan 16, 2009 7:55 pm
Location: In The Pulse Stream...

Postby L. Spiro » Sun Feb 01, 2009 6:57 pm

And yours is an underpost.
Enough spamming.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3126
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby asdf » Sun Feb 22, 2009 10:02 am

does this still work? b/c the hack ^ banned me. -.- just wanna be cautious
asdfghjkqwertyuioplzxcvbnm!!!!!!
asdf
NULL
 
Posts: 127
Joined: Sat Feb 21, 2009 4:50 am
Location: nowhere!


Return to GunBound

Who is online

Users browsing this forum: No registered users and 2 guests

cron