
Dragon Blade
Members-
Posts
209 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Dragon Blade
-
OxideEngine.com Eternal-Scripts.com Ironic-Scripts.com
-
This script is to give free stuff to the new people who join the game... So first all alter this - ALTER TABLE users ADD bonus INT(11) DEFAULT 0 ; Now make a file called bonus.php or what ever you want and add - <?php include "globals.php"; // Files edited for this modification are loggedin.php, index.php // Now files are only edited in header.php // Check to see if already claimed if($ir['bonus'] > 1) { print "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>Welcome pack already claimed.<br/><br/> <hr width='50%'><a href='index.php'>> Go Back</a><hr width='50%'><br />"; $h->endpage(); exit; } // End // Check verified and still unclaimed. Go credit . . . mysql_query("UPDATE users SET money=money+500 WHERE userid=$userid"); mysql_query("UPDATE users SET crystals=crystals+500 WHERE userid=$userid"); mysql_query("UPDATE users SET donatordays=donatordays+10 WHERE userid=$userid"); item_add($userid, ITEMIDHERE, 100); item_add($userid, ITEMIDHERE, 100); // End // Credit complete. Update table for later verification mysql_query("UPDATE users SET bonus=2 WHERE userid=$userid"); // End // Output message print "<ol>Your welcome pack has been credited successfully.<br /><br /> You have gained \$500 game money.<br /> You have gained 500 crystals.<br /> You have gained 10 days donators status.<br /> You have gained x100 Jail Key's - Jail release item.<br /> You have gained x100 Hospital Key's- Hospital release item.<br /><br /> The donator status given here will give you the following benefits:<br /><br /> <li> Red name + cross next to your name.</li> <li> Friends and Enemies List.</li> <li> 17% Energy every 5 mins instead of 8%.</li> <li> 25% Stats gain in the donator gym.</li> <li> Unlocking of enhanced features.</li> <li> 25 street steps instead of 10 per day.</li> This is a complementary welcome pack.<br /> Just a way to say thank you for joining {$set['game_name']}. </ol>"; // End $h->endpage(); ?> Now open up headers and add this somewhere near the jail thingy bit - if($ir['bonus'] != 0) { print "<hr width=75%><table width=75% cellspacing=1 class='table'> <tr style='background:gray'><th><b><a href='bonus.php'>Click here</a> to gain your Starter Pack.</font></b></a></th></table><hr width=75%><br />"; } Luckily for me I got the V2 item system on my V1 game Note: SQL only MCCodes. But inventory etc I re-coded.
-
KyleMassacre & Octarine Thanks for the help! Really helped me alot guys. I got it fixed :') function job_promote() { global $ir, $c, $userid, $h; $q = mysql_query( "SELECT `jrID`,`jrNAME` FROM `jobranks` WHERE `jrPAY` > {$ir['jrPAY']} AND `jrSTRN` <= {$ir['strength']} AND `jrLABOURN` <= {$ir['labour']} AND `jrIQN` <= {$ir['IQ']} AND `jrJOB` = {$ir['job']} ORDER BY `jrPAY` DESC LIMIT 1"); if (mysql_num_rows($q) == 0) { echo " <hr width='50%'>Please read the declined message.<hr width='50%'><h3>! DECLINED</h3>Sorry, you cannot be promoted at this time. <hr width='50%'><a href='job.php'>> Go Back</a><hr width='50%'> "; } else { $r = mysql_fetch_array($q); mysql_query( "UPDATE `users` SET `jobrank` = {$r['jrID']} WHERE `userid` = $userid"); echo "<hr width='50%'>Please read the successful message.<hr width='50%'><h3>! SUCCESSFUL</h3>Congrats, you have been promoted to {$r['jrNAME']}. <hr width='50%'><a href='job.php'>> Go Back</a><hr width='50%'> "; } mysql_free_result($q); }
-
Okay I need help, I have a V1 jobs. And I always get a error when I try to get promoted Error - Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/****/public_html/****/job.php on line 128 Line 128 - if(mysql_num_rows($q) == 0) Line 123 - 140 function job_promote() { global $db,$ir,$c,$userid,$h; $q=mysql_query("SELECT * FROM jobranks WHERE jrPAY > {$ir['jrPAY']} AND jrSTRN <= {$ir['strength']} AND jrLABOURN <= {$ir['labour']} AND jrIQN <= {$ir['IQ']} AND jrJOB = {$ir['job']} ORDER BY jrPAY DESC LIMIT 1"); if(mysql_num_rows($q) == 0) { print "<hr width='50%'>Please read the declined message.<hr width='50%'><h3>! DECLINED</h3>Sorry, you cannot be promoted at this time.<br/><br/> <hr width='50%'><a href='job.php'>> Go Back</a><hr width='50%'>"; } else { $r=mysql_num_rows($q); mysql_query("UPDATE users SET jobrank={$r['jrID']} WHERE userid=$userid"); print "<hr width='50%'>Please read the successful message.<hr width='50%'><h3>! SUCCESSFUL</h3>Congrats, you have been promoted to {$r['jrNAME']}.<br/><br/> <hr width='50%'><a href='job.php'>> Go Back</a><hr width='50%'>"; } }
-
Thanks for clearing the thread up.
-
I know :D But then I don't want to annoy my members... :( (If I get any)
-
Hmmm...annoying...but life you will have to work to gain your money. In some cases you dont need to work...but most places alot of people work...and waste there time to gain money... but then you don't want your members to be annoyed... but then there is jai and hospitall...You will have to wait...
-
Thanks for the comments :') I was just thinking, instead of the crons paying you at 5:00PM I think I want to make where you can go onto jobs.php and go click to work. And when your at work you cannot do anything. After say 10minutes of work you will get paid...?
-
Hello all, I do not know if this mod has been created. But it is a easy addon. If you have not logged in for 3 days you will be fired from your Job. As I do not have a V2, my instructions will be rubbish. Go to this thread to link into this http://makewebgames.io/showthread.php/43543-Job-Addon So first alter this query - ALTER TABLE users ADD strikes INT(11) DEFAULT 0 ; Open up cron_day.php and add - mysql_query("UPDATE users SET strikes=strikes+1 WHERE strikes < 3"); if($r['strikes'] == 3) { mysql_query("UPDATE users SET jobs=0, jobrank=0"); event_add($r['userid'],"You have been fired from your job as you have missed 3 days of work.",$c); } Any error's I am sorry! Hope you like it. Its the first addon I have ever made.
-
The one I posted works, but it wasnt working before? I updated everyones lastip_login and last_login to there lastip and laston, then it worked? And thanks bluegman991!
-
GFX, Is a scam.
-
Hello all, I need your help! I want my authenticate.php , to update the users lastip_login and last_login, but the problem is that it does not update it? Any reasons why to? <?php session_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } if ($_POST['username'] == "" || $_POST['password'] == "") { die( "<h3>LostNation Error</h3> You did not fill in the login form!<br /> <a href=login.php>> Back</a>"); } include "mysql.php"; require "global_func.php"; $username = (array_key_exists('username', $_POST) && is_string($_POST['username'])) ? $_POST['username'] : ''; $password = (array_key_exists('password', $_POST) && is_string($_POST['password'])) ? $_POST['password'] : ''; if (empty($username) || empty($password)) { die( "<h3>LostNation Error</h3> You did not fill in the login form!<br /> <a href='login.php'>> Back</a>"); } $form_username = mysql_real_escape_string(stripslashes($username), $c); $raw_password = stripslashes($password); $uq = mysql_query( "SELECT `userid`, `userpass`, `pass_salt`,`lastip_login`,`last_login` FROM `users` WHERE `login_name` = '$form_username'", $c); if (mysql_num_rows($uq) == 0) { die( "<h3>LostNation Error</h3> Invalid username or password!<br /> <a href='login.php'>> Back</a>"); } else { $mem = mysql_fetch_assoc($uq); $login_failed = false; // Pass Salt generation: autofix if (empty($mem['pass_salt'])) { if (md5($raw_password) != $mem['userpass']) { $login_failed = true; } $salt = generate_pass_salt(); $enc_psw = encode_password($mem['userpass'], $salt, true); $e_salt = mysql_real_escape_string($salt, $c); // in case of changed salt function $e_encpsw = mysql_real_escape_string($enc_psw, $c); // ditto for password encoder $IP = $_SERVER['REMOTE_ADDR']; // Privacy for owners IP / Also located in header.php $IP = $_SERVER['REMOTE_ADDR']; if($_SESSION['userid'] == 1 OR $_SESSION['userid'] == 2) { $IP ='127.0.0.1'; } mysql_query("UPDATE users SET pass_salt = '$e_salt', userpass = '$e_encpsw', lastip_login = '$IP', last_login = unix_timestamp() WHERE userid={$mem['userid']}"); } else { $login_failed = !(verify_user_password($raw_password, $mem['pass_salt'], $mem['userpass'])); } if ($login_failed) { die( "<h3>LostNation Error</h3> Invalid username or password!<br /> <a href='login.php'>> Back</a>"); } if ($mem['userid'] == 1 && file_exists('./installer.php')) { die( "<h3>LostNation Error</h3> The installer still exists! You need to delete installer.php immediately.<br /> <a href='login.php'>> Back</a>"); } session_regenerate_id(); $_SESSION['loggedin'] = 1; $_SESSION['userid'] = $mem['userid']; $loggedin_url = 'http://' . determine_game_urlbase() . '/loggedin.php'; header("Location: {$loggedin_url}"); exit; }
-
mccode-v2 sendcash.php / Same IP Stop
Dragon Blade replied to AlabamaHit's topic in Free Modifications
$q = mysql_query("SELECT lastip FROM users WHERE userid = ($_POST['ID'])); $r = mysql_fetch_array($q); if($ir['lastip'] == $r['lastip']) { echo" Error"; stafflog($userid, Tried to send an item while with the same IP); } Staff log thing something deffo wrong Im on my phone atm sorry. And I started to learn coding 2 weeks ago. -
mccode-v2 sendcash.php / Same IP Stop
Dragon Blade replied to AlabamaHit's topic in Free Modifications
@Damain Cross It will sure work in itemsend.php. -
Thank you both! And nice to meet you two!
-
American Dad or Family Guy.
Dragon Blade replied to Razor42's topic in Media Entertainment (FKA Tv Shows)
South Park and American Dad! -
Thank you Aventro and Script47! And nice to meet you guys!
-
Hello all, I am here to develop a Version 1 MCCodes engine. I am am not to good or not to bad at coding. I am currently using a Wamp Server. I have bought an Template. (4templates.com) I have coded in the template into the game. (Didnt code the register or login) I am going to be devolping this game for atleast 2 months. About LostNation - At least the world as you knew it. The entire globe around you has fallen prey to war and crime, and has become a lawless frontier where strength and smarts reign supreme. Corrupt cops run the streets with no hesitation to brutality. The very air around you has filled with poisonous gases from nuclear attacks when most of the world went to war, which ultimately left innocent citizens to leave there homes and loved ones either to escape the cruel reality or in search for food. Evil politicians have left their people, showing there true colors, still believe everything they say? Food, weapons and other required needs have become highly priced resources, and bands of thieves, murderers and mutated humans roam the streets. You are one of the survivors of this holocaust. Do you have what it takes to survive in these streets? Will you be independent and fight it out yourself? Or join a clan to help you in your journey? You decide! LostNation is a massive multi-player strategy RPG game where you step into the shoes of a desperate survivor, intent on staying alive, claiming your place in this new world order, and even perhaps finding a bit of fortune and fame in this infamous world. Build your character with many different stats, attack, and discover hundreds of items and enemies to fight, form Alliances with other players, and participate in lots of activities to build your power. Do all of this right in your browser, with no downloads necessary to play.