Jump to content
MakeWebGames

Nicholas

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by Nicholas

  1. hi, i got a idea about gang wars... say you warred a gang and when that gangs respect hit 0 and the gang got destroyed? why not make it so the gang that destroyed the gang gets all of their money/crystals? well here it is... hope you like it lol... find in all of the attack files (e.g. attackbeat, attackwon, attacktake) $gq=$db->query("SELECT * FROM gangs WHERE gangID={$r['gang']}"); $ga=$db->fetch_row($gq);   replace it with... $gq=$db->query("SELECT `gangID`, `gangRESPECT`, `gangMONEY`, `gangCRYSTALS` FROM gangs WHERE gangID={$r['gang']}"); $ga=$db->fetch_row($gq);   then find... if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); }   and replace it with...   if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE gangs SET gangMONEY=gangMONEY-{$ga['gangMONEY']}, gangCRYSTALS=gangCRYSTALS-{$ga['gangCRYSTALS']} WHERE gangID={$r['gang']}"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+{$ga['gangMONEY']}, gangCRYSTALS=gangCRYSTALS+{$ga['gangCRYSTALS']} WHERE gangID={$ir['gang']}"); $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); print " You destroyed the gang and gained \$".number_format($ga['gangMONEY'])." and ".number_format($ga['gangCRYSTALS'])." crystals for your gang."; }   i know its probably a simple thing to create... but i dont think its even been posted on here before lol.   i was gonna add a event_add thing in there saying Your gang was successful in the gang war and gained $???? and ???? crystals. Check your gangs vault to see the increase!!! but couldnt figure it out... kept on sending it to every single person on the game lol. even tried mail one, but still done the same thing as the events did lol. so if someone can help add the event_add system in or mail in. that be great.
  2. thanks lol, i knew it would be a simple thing to do... my minds not working fully lately lol.
  3. yes i see what you mean, but before i even post these requests up, i do try it myself with research. but if i get stuck or cant do it, i ask for a request to ask someone to create and sell it me or create and tell me the coding kindly. (hope didnt say this line werid lol) also i am learning but im not a fast learner. nither am i a easy to teach lol. im learning security bit by bit. probably not professionally but its still techically security lol. i cant learn by just reading from sites like PHP.NET or whatever the site is... i have to read/look at already made scripts to learn, im techically a copy and learn learner (if thats understandable, lol) im also having stupid problems with the mailbox ignore list mod, the function doesnt work correctly... ive even put up the working function someone posted but still dont work lol. i posted up a request for 150% energy mod on here while ago, i figured out how to do that on my own
  4. function propose_submit() { global $db,$r,$ir,$c,$h,$userid; if ($r['married'] != 0) { die("This person is already married. Sorry. Try someone else."); } na it didnt work :( cant figure it out lol. probably most simplist thing to fix, but i cant think of it...
  5. do you mean? global $db,$ir,$c,$h,$userid; into global $db,$r,$ir,$c,$h,$userid; if that works, im gonna cry for such a simple thing...
  6. im having problems where this script... even knowing the player is already married, someone can still propose to them, how do you stop it? here is the script...   <?php include "globals.php"; $_GET['action'] = (isset($_GET['action']) && is_string($_GET['action'])) ? stripslashes(trim($_GET['action'])) : FALSE; switch($_GET['action']) { case 'propose': propose_form(); break; case 'proposesub': propose_submit(); break; default: index(); break; } function index() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { die("You are already married"); } else { print"<h1><font color=white>Proposal Center</h1> Do you want to propose to someone? <form action='propose.php?action=propose' method='post'> <input type='submit' class='submit' value='Yes.'> </form> <form action='index.php' method='get'> <input type='submit' class='submit' value='No.'> </form>"; } } function propose_form() { global $db,$ir,$c,$h,$userid; if ($ir['married'] != 0) { die("You are already married"); } else { print"<h1><font color=white>Proposal Center</h1> <form action='propose.php?action=proposesub' method='post'> <font color=white>Please enter the user id of the user you want to propose to: <font color=white>User ID: <input type='text' name='propose' /> <font color=white>Message: <input type='text' name='message' /> <input type='submit' value='Propose' /></form>"; } } function propose_submit() { global $db,$ir,$c,$h,$userid; if ($r['married'] != 0) { die("This person is already married. Sorry. Try someone else."); } if ($ir['married'] != 0) { die("You are already married"); } if ($ir['userid'] == $_POST['propose']) { die("You cannot marry yourself"); } if ($_POST['propose'] <= 0) { die("Invalid user, Try someone else."); } else { $ch=$db->query("SELECT * FROM proposals WHERE proPROPOSED=".abs(intval($_POST['propose'])).""); if ($db->num_rows($ch)!=0) { die("This user already has a pending proposal, please try again later <a href=index.php>> Back</a>"); } else { $m=$db->query("SELECT * FROM users WHERE userid=".abs(intval($_POST['propose'])).""); $r=$db->fetch_row($m); $db->query("INSERT INTO proposals VALUES('', '{$ir['userid']}', '".abs(intval($_POST['propose']))."', '".mysql_real_escape_string($_POST['message'])."')"); event_add(abs(intval($_POST['propose'])),"[url='viewuser.php?u=$userid']".staff_name($ir['userid'])." [{$ir['userid']}][/url] proposed to you click [url='decision.php']<u>HERE</u>[/url] to make your mind up.</a> ",$c); print"<h3>Proposal Center</h3> You proposed to ".staff_name($r['userid'])." [{$r['userid']}], please wait for their decision "; } } } $h->endpage(); ?>   if ($r['married'] != 0) { die("This person is already married. Sorry. Try someone else."); } this is my problem... ive tried...   if ($r['married'] > 0) { die("This person is already married. Sorry. Try someone else."); }   if ($r['married'] != 0) { die("This person is already married. Sorry. Try someone else."); }   if ($r['married'] >= 0) { die("This person is already married. Sorry. Try someone else."); }   if ($r['married'] => 0) { die("This person is already married. Sorry. Try someone else."); }   many other ways too. but its not working! AHHH! its annoying! could someone please help me fix it?
  7. by looks of it, it looks like the advanced search on roguevampires lol. ive been meaning to create this :) thanks to making it, saves me time haha.
  8. does that even work? just asking? as i made a error on purpose and changed && $_SESSION['userid'] == 1 into && $_SESSION['userid'] == 2 but it still shown me the error?
  9. changed it? happy? lol no im not learning security from mccodes... you mad? i learn differently than others, i dont learn by just reading, i learn by looking/reading. if thats understandable... i paid someone to secure my site and i learnt from that... for example... mysql_query("UPDATE users SET money=money+".abs(intval($rand['money'].")); $rand can be anything... $_GET, $_POST, $ir, $r, etc... lol. im also learning security by looking at the mods on this forum that are created by everyone.   also that script you put up, is abit confusing for me lol, im not a professional...
  10. sorry about all the requests im asking for :S but im wondering... i have tried converting it from this modification but had no luck... Tonka's Mailbox Ignore System i tried to convert that into a shoutbox function where players can ignore other players text on the shoutbox, so if say ID 6 ignores ID 15 on the shoutbox, all the messages ID 15 enters onto the shoutbox, ID 6 will not beable to see them until ID 6 un-ignores ID 15 from the list. hopefully you understand what i mean... like i said i have tried creating it but well... it didnt work so i removed it completely... and forgot what i put lol. hope someone could help create this idea :) Thanks, Nicholas.
  11. omg how did i not think of that... how simple, it works now... thanks mate...
  12. i think ive already tried $q=$db->query("SELECT * FROM mail WHERE mail_id={$r['mail_id']}"); i dont think it worked...   i did say im not sure if the links correct lol.
  13. can someone help me please cant figure it out lol. staff_logs.php action function   case 'mail_del': mail_del(); break;   the function   function mail_del() { global $db,$ir,$c,$userid,$h; if($ir['user_level'] > 2) { die("404"); } $q=$db->query("SELECT * FROM mail WHERE mail_id={$_GET['mail_id']}"); if(!$db->num_rows($q)) { print "Error, either this message does not exist, or it had already been deleted. [url='staff_logs.php?action=maillogs']Go Back[/url]"; $h->endpage(); exit; } $db->query("DELETE FROM mail WHERE mail_id={$_GET['ID']}"); print "Message deleted [url='staff_logs.php?action=maillogs']Go Back[/url]"; }   the link   [[url='staff_logs.php?action=mail_del&mail_id={$r[']Delete MSG[/url]]   not quite sure if ive got the link correct or not, but the function is getting on my nerves lol, cant figure it out... i get this... Query was SELECT * FROM mail WHERE mail_id= meaning.... {$_GET['ID']} is wrong but idk what to change it too... ive tried... {$_GET['ID']} {$_GET['mail_id']} all i can think of... can someone help please?
  14. i dont think it worked mate. forgot to reply about it :/ if anyone could like make a test domain or whatever and try and get the 150% energy thing. to work that be great :) not so its like 100% but showing 150% its so like say you can attack for 30% energy which means you get attack 3 times every 100% (10% energy spare) but with 150% you can attack 5 times. if thats understandable. also with 150% energy you can train better in gyms? it might be a really annoying mod to make, so im willing to pay for it. NOTE: this mod is used on http://www.roguevampires.net/
  15. im learning security at the moment, what ive learnt is (hopefully this is correct) {$ir['username']} and replace it with ".htmlentities($ir['username'])." ($r['username']} and replace it with ".htmlentities($r['username'])." money=money+{$r['money']} replace it with money=money+".abs(intval($r['money']))." ______________________________________________________________________________________ Remember, the money=money+ bit could be confusing but if you understand what i mean, thats good :) ______________________________________________________________________________________ WHERE userid={$r['userid']}"); and replace it with WHERE userid= ".abs(intval($r['userid']))." WHERE userid={$_GET['ID']}"); and replace it with WHERE userid=".abs(intval($_GET['ID']))."")); WHERE userid={$_POST['QTY']}"); and replace it with WHERE userid=".abs(intval($_POST['QTY']))."")); remember im learning security at the moment only started learning fully about 1 week ago... so i could be wrong...
  16. updated the 1st post with a small modification. helps block players from going into $-1 or lower. also what do you mean Djkanna?
  17. is the script fine? on how ive coded it?
  18. yup go for it :) be interesting :) also secured hopefully haha.
  19. like that mate? (not tested, so idk if it works now lol)
  20. edited the post, is that better verison Jordan? NOTE: edited verison isnt tested lol.
  21. oop sorry posted in wrong place. can you move it to free modifications please. sorry about that.
  22. i know this has most probably been made before but i just made myself one. first of all... add the sql...   ALTER TABLE `users` ADD `rescue` INT(11) NOT NULL DEFAULT '0';   right then next... open up jail.php and find...   <table width=75% class=table border=1 cellspacing=1><tr>   or whatever yours is... replace it with...   if($ir['jail'] > 0) { print "<center>You are currently offering \$".number_format($r['rescue']).". [url='preferences.php?action=JailPayment']Change Rescue Payment Here[/url] "; } print "<table width=75% class=table border=1 cellspacing=1><tr>   after that find...   <th>Reason</th><th>Actions</th></tr>";   replace with...   "; if($ir['jail'] == 0) { print "<th>Rescue Price</th><th>Actions</th>"; } print "</tr>";   after that find...   <td>[[url='jailbust.php?ID={$r[']Bust[/url]][[url='jailbail.php?ID={$r[']Bail[/url]]</td></tr>"; } print "</table>";   replace with...   "; if($ir['jail'] == 0) { print " <td>\$".number_format($r['rescue'])."</td> <td>[url='bust.php?ID={$r['][bust ".htmlentities($r['username'])."][/url]"; } print "</td></tr>"; } print "</table>";   once you have done the jail part... time to add the file. call it -- bust.php   <?php include "globals.php"; if($ir['energy'] < 1) { print "Sorry, you need 10% energy to rescue ".htmlentities($r['username'])." out of jail. [url='index.php']Back[/url] "; $h->endpage(); exit; } if($ir['jail']) { print "You cant rescue players while your jail. [url='index.php']Back[/url] "; $h->endpage(); exit; } if($ir['hospital']) { print "You cant rescue players while your hospital. [url='index.php']Back[/url] "; $h->endpage(); exit; } $_GET['ID'] = ( isset($_GET['ID']) AND ctype_digit($_GET['ID']) ) ? $_GET['ID'] : '' ; $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid=".abs(intval($_GET['ID']))."")); if(!$r['userid']) { print "Invalid user, try again, if you get this message few times on same player, contact a admin. [url='index.php']Back[/url] "; $h->endpage(); exit; } if(!$r['jail']) { print "".htmlentities($r['username'])." isnt in jail anymore. sorry. [url='index.php']Back[/url] "; $h->endpage(); exit; } $mult=$r['level']*$r['level']; $chance=min(($ir['crimexp']/$mult)*50+1, 95); if(rand(1,100) < $chance) { print "<center>You successfully rescued ".htmlentities($r['username'])." out of jail. [url='index.php']Back[/url] "; $db->query("UPDATE users SET jail=0, money=money-".abs(intval($r['rescue'])).", rescue=0 WHERE userid={$r['userid']}"); $db->query("UPDATE users SET money=money+".abs(intval($r['rescue'])).", energy=energy-1 WHERE userid=$userid"); event_add($r['userid'], "[url='viewuser.php?u=".abs(intval($ir[']".htmlentities($ir['username'])."[/url] rescued you from jail."); } else { print "<center>You was caught trying to rescue ".htmlentities($r['username']).". [url='index.php']Back[/url] "; $time=rand(10, 100); $db->query("UPDATE users SET energy=energy-1, jail=$time, jail_reason='Caught trying to rescue ".htmlentities($r['username'])."' WHERE userid=$userid"); event_add($r['userid'], "[url='viewuser.php?u=".abs(intval($ir[']".htmlentities($ir['username'])."[/url] was caught trying to rescue you from jail.", $c); } $h->endpage(); ?>   change the energy taken thing to whatever you want. my games max energy is 10, so i put the jail busting as taking away 1 (10%). right then finally! the perferences.php bit... find...   include "globals.php";   under it put...   // XSS Prevention function NoXSS($Var) { return (get_magic_quotes_gpc()) ? htmlspecialchars($Var) : addslashes(htmlspecialchars($Var)); }   then find...   case 'forumchange': forum_change(); break;   put under it...   case 'JailPayment': JailPayment(); break;   then add this on top of $h->endpage( );   // Jail Payment Change Function function JailPayment() { global $ir, $db; if($ir['money'] <= $_POST['NewRP']) { echo 'Your trying to offer more than you have on you. Try offering some money you have on you. '; } else { if (isset($_POST['NewRP'])) { $db->query(sprintf("UPDATE `users` SET `rescue`='%s' WHERE `userid`='%d'", NoXSS($_POST['NewRP']), $ir['userid'])); echo 'Jail Rescue Payment Changed!'; } else { echo '<h3>Jail Rescue Payment Change</h3> <form action="preferences.php?action=JailPayment" method="post">'; echo 'Type how much you would give to the person to bust you out of jail. '; echo sprintf("Rescue Amount: <input type='text' name='NewRP' value='%s' /> ", $ir['rescue']); echo '<input type="submit" value="Change Profile Sig" /> </form>'; } } }   hope you like it :) if you get any errors (some might) tell me/us. or change... echo ' into echo " or print " and '; into "; and see if that fixes your problem. EDITED SECTION! in header.php find   if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); }   under it put...   if($ir['money'] <= $ir['rescue']) { mysql_query("UPDATE users SET rescue = 0 WHERE userid=$userid"); }
  23. how would you convert it to a decimal mate?
  24. $db->query('UPDATE `users` SET `maxenergy` = 150 WHERE `donatordays` > 0'); that wouldnt work? as its not the maxenergy i want 150, its the energy bar its self. as it they got 150 max energy they could train REALLY! high in the gym. as say a level 1 buys a donator pack, there max energy jump from 12 to 150. if you know what i mean?
  25. ive searched the forum but couldnt find it anywhere in the paid or free section. does anyone have this mod at all that i can buy or have? if you do please contact me on this post or thro a private message. thanks, nicholas.
×
×
  • Create New...