
mr_shuu
Members-
Posts
53 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by mr_shuu
-
WOW Thank you. Same here. If you are working on a game and need some help I'll always kick in help. I have a long way to go on my game because I am looking to go forward by starting in the past. remember Willie Crowthers interactive fiction game ADVENT (1975-76)? I want to set up a different chapter in each city.. complete one and you can enter the next chapter when you reach the next city. Its simple enough but I want to put my own twist on it. Its still the regular game but I'm thinking a missions mod made from the streets.php (found here on search) Award not items.. but new stats needed for future episodic adventures serving story line of over all game while the regular game is playing- this is what my friends want to play... they dont want arcade games in the game.. they want adventure in the game.. seanybob has a mod where people turn into zombies... I have nt read the code yet but that's exactly the kind of Mod my friends would like because you can make that suit your game... a certain city has a plaque.. you have to successfully maneuver through a mission to get sick, to get in to a lab, to find a cure, to be able to get to the next citys streets mission. All simple to do using streets.php So I have work to do. I can swing it. I tried to give ideas away in pms and some contributors here are open and receptive to generosity... some use it as a launch pad to make a smug remark or a put down.. we're all nerds here... no reason for this to be a revenge of the nerds scenario hahaha.. I appreciate how you treat others.. Sniko, Paul, Blade, Illusions are also very cool people. I wouldn't have a game in the works if it wasn't for these people and if this site wasn't here. I feel like I'm Lassie... my friends are trapped in a (Torn City) well and I ran here to get them rescue (Alternative place/game to visit - where they will be treated fairly and with respect)
-
"The power of money spoke there, and the treatment of players drove me to MWG. Thankfully, the community here is much more welcoming and friendly" I could not agree more. I want to back track to my post because it makes me look bad for two reasons. One the Pedigree thing was done to be funny... I always gave the money back... The island thing was done by a staff member and then they fedded me simply because I had an island. It was not me doing any cheating... I do not know ANYTHING AT ALL about exploits... I never researched or read up on that... not my thing. I was just too vocal in the forums and the Staff wanted to punish me... I accept that... but what you said about money ruling... I saw that in TC but both ways... I seen big spenders allowed to abuse other players... get away with violations all that... at the same time I seen BIG SPENDERS get tossed out like yesterdays trash because someone lied about them. (I am not at all talking about myself. I have no axe to grind with TC... I just think TC should have a story line... and IN MY OPINION -for what it is or is not worth- I'd like Cheb to show some loyalty to MCCodes... don't bite the hand that fed you! It only serves to make you seem like an ingrate, a fraud and someone so greedy they refuse to share the limelight. Is it not enough to reap all those profits... must he also want credit that's undeserved as it to justify all the profits. A game that satisfies the players THAT justifies the profits!) I have a few friends, ages 30 to 40 who are still upset over the way TC treated em... still griping about what they spent, what they had, what stupid choices Ched made like the donator packs cannot be sold in game or whatever... the racing game is boring.. Infrastructure... when you have Torn City Money you can afford to HIRE someone to revamp the racing codes so people can race for regies... give em what they want when they spend that kind of money. I don’t think a game should be run like a whore... where you get the John to spend... then you try to rob him or give him an unsatisfactory experience (I have no knowledge of hookers- never been with one.. TC was the closest I ever came to hooker sex) and then walk around with the purple pimp hat saying: "Mccodes Shyyyyyt - Iz U Ignorant I iz a self made man!" If I want to be sold a fantasy I'll visit the Disney channel! A game is just that - it shouldn’t emotional damage anyone... spiritually cripple players... the game owner shouldn’t pride himself in his ability to disappoint and alienate players... I see the TC cycle, people start out loving and praising it until STAFF craps on them... until they get less than satisfactory treatment, little respect, abuse... I don’t see why Admins or staff have to be snotty, have a god complex or a snippy attitude... again thats back to the hooker john thing... to resent your clientele... like even try and love what you do.. Spend your precious life on what you enjoy... and don’t pee in other peoples pools along the way... I don’t want to be big like cheb... I also don’t want to be disliked the way he is... I don’t want all these people in the world concentrating negative thoughts on me... But it would be cool to be able to sign in to a game where people laugh, people appreciate the thought behind the pages... I'm not aspiring to be a dictator, bully or any kind of pimp
-
My few players complain about the attack page. When they fight the npcs? battlebots... the bots are equiped with weapons and armor but in fight it says that the NPCs? are beating them with bare hands. Any idea what area I need to focus on? <?php $atkpage=1; include 'globals.php'; $_GET['ID'] = (isset($_GET['ID']) && ($_GET['ID'])) ? intval($_GET['ID']) : false; $_GET['wepid'] = (isset($_GET['wepid']) && ($_GET['wepid'])) ? intval($_GET['wepid']) : false; $_GET['nextstep'] = (isset($_GET['nextstep']) && ($_GET['nextstep'])) ? intval($_GET['nextstep']) : false; $_GET['hp'] = (isset($_GET['hp']) && ($_GET['hp'])) ? intval($_GET['hp']) : false; $_GET['attacklost'] = (isset($_GET['attacklost']) && ($_GET['attacklost'])) ? intval($_GET['attacklost']) : false; $_GET['attacking'] = (isset($_GET['attacking']) && ($_GET['attacking'])) ? intval($_GET['attacking']) : false; $_GET['maxhp'] = (isset($_GET['maxhp']) && ($_GET['maxhp'])) ? intval($_GET['maxhp']) : false; if(!$_GET['ID']) { echo'No ID selected.'; exit($h->endpage()); } if(!$_GET['ID']) { echo 'WTF you doing, bro?'; exit($h->endpage()); } else if($_GET['ID'] == $userid) { echo 'Stop beating up on yourself. It was a long time ago and probably not your fault.'; exit($h->endpage()); } else if ($ir['hp'] <= 1) { echo 'I will say this. You show determination [url="index.php"]Back[/url]'; exit($h->endpage()); } else if ($_SESSION['attacklost'] == 1) { echo "Stay down you can not beat this son of a bitch. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; exit($h->endpage()); } //get player data $youdata=$ir; $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $odata=$db->fetch_row($q); $myabbr=($ir['gender']=="Male") ? "his" : "her"; $oabbr=($ir['gender']=="Male") ? "his" : "her"; if($ir['attacking'] && $ir['attacking'] != $_GET['ID']) { echo 'Bad, bad, bad girl. [url="index.php"]Back[/url]'; $_SESSION['attacklost']=0; exit($h->endpage()); } if($odata['hp'] == 1) { echo 'This player is unconscious and has pissed themselves. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['hospital']) { echo 'This player is in hospital. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['hospital']) { echo 'While in hospital you can\'t attack. [url="hospital.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['jail']) { echo 'This player is in Solitary Confinement. They are probably hiding from you. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['jail']) { echo 'While in Solitary Confinement you can not beat on others but you can beat yourself off. [url="jail.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['travelling']) { echo 'That player is travelling. [url="index.php"]> Back[/url]'; exit($h->endpage()); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } echo '<table width=100%><tr><td colspan=2 align=center>'; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/4) { $youdata['energy']-= floor($youdata['maxenergy']/4); $me=floor($youdata['maxenergy']/4); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { echo 'You can only attack someone when you have 25% energy, a song in your heart and a maniacal grin.'; exit($h->endpage()); } } $_SESSION['attacking']=1; $ir['attacking']=$odata['userid']; $db->query("UPDATE users SET attacking={$ir['attacking']} WHERE userid=$userid"); $_GET['wepid'] = (int) $_GET['wepid']; $_GET['nextstep'] = (int) $_GET['nextstep']; if($_GET['nextstep'] > 25) { print "<center>This fight is going nowhere you may as well go home and look at porn or contact Troy and ask him how to exploit weakness in this facility! [url='index.php'] Back[/url]</center>"; exit($h->endpage()); event_add($odata['userid'],"[url='viewuser.php?u=$userid']{$youdata['username']}[/url] Tried to beat you but stalemated.",$c); exit; } if($_GET['wepid'] != $ir['equip_primary'] && $_GET['wepid'] != $ir['equip_secondary']) { echo 'Stop trying to abuse a game bug. One Troy is enough for any RPG. Badass will murder you that. [url="index.php"]> Home[/url]'; $db->query("UPDATE users SET exp=0 where userid=$userid",$c); die(""); } $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000)); $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95)); if(rand(1,100) <= $hitratio ) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$odata['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $mydamage-=$db->fetch_single($q3); } if($mydamage < -100000) { $mydamage=abs($mydamage); } else if($mydamage < 1) { $mydamage=1; } $crit=rand(1,40); if($crit==17) { $mydamage*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $mydamage/=(rand(20,40)/10); } $mydamage=round($mydamage); $odata['hp']-=$mydamage; if($odata['hp']==1) { $odata['hp']=0;$mydamage+=1; } $db->query("UPDATE users SET hp=hp-$mydamage WHERE userid={$_GET['ID']}"); echo '<span style="color: red;">'. number_format($_GET['nextstep']) .'. Using your '. $r1['itmname'] .' you hit '.$odata['username'].' doing '.$mydamage.' damage ('. number_format($odata['hp']) .')</span> '; $_SESSION['attackdmg']+=$mydamage; $_SESSION['attacklog'] .= '<span style="color: red;">'. number_format($_GET['nextstep']) .'. Using your '. $r1['itmname'] .' you hit '. $odata['username'] .' doing '. $mydamage .' damage '. number_format($odata['hp']) .'</span> '; } else { echo '<span style="color: red;">'. number_format($_GET['nextstep']) .'. You tried to hit '. $odata['username'] .' but missed ('. number_format($them['hp']) .')</span> '; $_SESSION['attacklog'] .= '<span style="color: red;">'. number_format($_GET['nextstep']) .'. You tried to hit '. $odata['username'] .' but missed ('. number_format($odata['hp']) .')</span> '; } if($odata['hp'] <= 0) { $odata['hp']=0; $_SESSION['attackwon']=$_GET['ID']; $db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}"); echo ' [b]What do you want to do with '.$odata['username'].' now?[/b] <form action="attackwon.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Mug Them" /></form> <form action="attackbeat.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Hospitalize Them" /></form> <form action="attacktake.php?ID='.$_GET['ID'].'" method="post"><input type="submit" value="Leave Them" /></form>'; } else { //choose opp gun $eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$odata['equip_primary']}, {$odata['equip_secondary']})"); if(mysql_num_rows($eq) == 0) { $wep="Fists"; $dam=(int)((((int) ($odata['strength']/$ir['guard']/100)) +1)*(rand(8000,12000)/10000)); } else { $cnt=0; while($r=$db->fetch_row($eq)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000)); } $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95)); if(rand(1,100) <= $hitratio) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$ir['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $dam-=$db->fetch_single($q3); } if($dam < -100000) { $dam=abs($dam); } else if($dam < 1) { $dam=1; } $crit=rand(1,40); if($crit==17) { $dam*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $dam/=(rand(20,40)/10); } $dam=round($dam); $youdata['hp']-=$dam; if ($youdata['hp']==1) { $dam+=1; $youdata['hp']=0; } $db->query("UPDATE users SET hp=hp-$dam WHERE userid=$userid"); $ns=$_GET['nextstep']+1; echo '<span style="color: red;">'.$ns.'. Using '.$oabbr.' '.$wep.' '.$odata['username'].' hit you doing '.$dam.' damage '.($youdata['hp']).'</span> '; $_SESSION['attacklog'].='<span style="color: blue;">'.$ns.'. Using '.$oabbr.' '.$wep.' '.$odata['username'].' hit '.$ir['username'].' doing '.$dam.' damage '.($youdata['hp']).'</span> '; } else { $ns=$_GET['nextstep']+1; echo '<span style="color: red;">'.$ns.'. '.$odata['username'].' tried to hit you but missed '.($youdata['hp']).'</font> '; $_SESSION['attacklog'].='<span style="color: blue;">'.$ns.'. '.$odata['username'].' tried to hit '.$ir['username'].' but missed '.($youdata['hp']).'</span> '; } if($youdata['hp'] <= 0) { $youdata['hp']=0; $_SESSION['attacklost']=1; $db->query("UPDATE users SET hp=0 WHERE userid=$userid"); echo '<form action="attacklost.php?ID='.$_GET['ID'].'"method="post"><input type="submit" value="Continue" />'; } } } else if ($odata['hp'] < 5) { echo 'You can only attack those who have health'; exit($h->endpage()); } else if ($ir['gang'] == $odata['gang'] && $ir['gang'] > 0) { echo 'You are in the same gang as '.$odata['username'].'! What are you smoking today dude!'; exit($h->endpage()); } else if ($youdata['energy'] < $youdata['maxenergy']/4) { echo 'You can only attack someone when you have 25% energy, and you feel divinely inspired. '; exit($h->endpage()); } else if ($youdata['location'] != $odata['location']) { echo 'You can only attack someone in the same location!'; exit($h->endpage()); } else { } echo '</td></tr>'; if($youdata['hp'] <= 0 || $odata['hp'] <= 0) { echo '</table>'; } else { $vars['hpperc']=round($youdata['hp']/$youdata['maxhp']*100); $vars['hpopp']=100-$vars['hpperc']; $vars2['hpperc']=round($odata['hp']/$odata['maxhp']*100); $vars2['hpopp']=100-$vars2['hpperc']; $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); echo '<tr><td colspan=2 align="center">Attack with: '; if($db->num_rows($mw) > 0) { while($r=$db->fetch_row($mw)) { if(!$_GET['nextstep']) { $ns=1; } else { $ns=$_GET['nextstep']+2; } if($r['itmid']==$ir['equip_primary']) { echo '[b]Primary Weapon:[/b] '; } if($r['itmid']==$ir['equip_secondary']) { echo '[b]Secondary Weapon:[/b] '; } echo "[url='attack.php?nextstep=$ns&ID={$_GET[']{$r['itmname']}[/url] "; } } else { echo 'You have nothing to fight with.'; } echo '</table>'; echo "<table ALIGN=RIGHT width='169' cellpadding='0' cellspacing='0'> <tr> <td width='40' height='40' background='block_03.jpg'><center>[b]{$odata['username']} Health[/b]</td></tr><tr> <td width='40' background='block_03.jpg' valign='top'><center><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10> [img={$odata[] <tr> <td width='40' height='40' height='40' background='block_03.jpg'><center></td></tr><tr><td> </td></tr> <tr> <table ALIGN=LEFT width='169' cellpadding='0' cellspacing='0'> <tr> <td width='40' height='40' background='block_03.jpg'><center>[b]{$ir['username']} Health:[/b]</td></tr><tr> <td width='40' background='block_03.jpg' valign='top'><center><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10> [img={$ir[]<tr> <td width='40' height='40' height='40' background='block_03.jpg'><center></td></tr><tr><td> </td></tr> <tr></table>"; } exit($h->endpage()); ?>
-
Hummmmm on a serious note... maybe per item dumped could result in an event... like a point and add trade points for turns in pointstrader - thats what I did... so they get a certain number of points a month... and can use em at Either the dumps OR streets... when they level up they can get a points bonus... a new city opens and has its own version of streets / it can be a lake to swim / mountain to climb... whatever ... they can search it
-
now how can this be modified so that the dumps are in associated to a certain gang and only members of the gang attached to that "dump" can Borrow garbage.. okay okay I know I've have to eventually buy the armory mod.. hahaha
-
Code Gods hear my prayers: will this work?
mr_shuu replied to mr_shuu's topic in Modification Support
It works great. I thought I needed the center tag as part of the code / map I ended up scrapping those coordinates anyway and went to http://www.image-maps.com/ ended up with 220 hot spots in the map... then instead of having 1 through 220 like in maps I'd have 40 different events... repeated to fill up the 220 hot spots I took the numbers for the events 1 through 220 and made up 220 annoying event codes <area shape='rect' <area shape='rect' coords='216,123,262,170' href='climbmountunder.php?event=1liiiiijjijlil'> <area shape='rect' coords='184,123,226,170' href='climbmountunder.php?event=1lii1iijjjjlil'> <area shape='rect' coords='152,123,194,170' href='climbmountunder.php?event=1liiiiijjjj1il'> to make it a little more cryptic so people are not triggering the same results, even though results have the random. A really good item in one event / in one box will have em click that box over and over until it pays off the same reward event. So I set lines on the pic which have no relationship to the actual hotspots which are much smaller boxes and inside the PICTURES boxes... even over lapping the pictures box lines... like I said each box to choose from on the picture has multiple hotspots each with the annoying cryptic code... I didnt realize I didnt have to put in the jail and hosp code. It is redundant I should have seen that if not in city... that's it... PS Thank You again for the help and guidance. What I like about this is you can take streets.php found in archives... change the pic and upload it... pay attention to your pic and say its a map, you can make water not have a hotspot... or say theres a building or cave.. that can have a certain event related to that exact location... even with random outcome the outcome can be related to that specific location... hell you could place a map on the explore page with events leading to locations right... a nice chance for some more art in the game. -- -
I'm making changes to streets mod will this work? <? include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } if($ir['location'] != 9) { die("This page cannot be accessed while in another city."); } else echo "<center>[b]****Unders Overlook Mountains**** As you start to climb upwards
-
I already have the update. I found it on wikileaks... okay I'm lying!
-
I played it for two weeks and ended up with an island. I was fedded 12 times under the same name... I managed to talk my way out of Fed all those times.. was friends with staff... mostly fedded for Forum posts... joking wasnt permitted... a lot of uptight staff on power trips at that time... I made a fortune buying cheap dogs and naming them PEDIGREE and then a dogs name and charging as if they were Pedigrees hahahaha When I tried TC it was with 12 friends from a chat room... that game broke up the friendships... people were way too in to the game... took things very personal.. some managed to get over it...some years later still not over it... most dont play it... they feel cheated, betrayed, many complain about all they invested and how the game screwed them... people put in false complaints, bad decisions against em, people Fedded... a big mess... its what made me want to put a game up... to be loyal to players... to be fair and relaxed and to have a sense of humor... but its a lot of work...
-
Help me or kill me and put me out of my misery -your choice
mr_shuu replied to icecoldchillin's topic in Modification Support
Good call. Dropped Auctions from Header... it didnt belong there. I probably used two different mods, removed one and didnt clean up unneeded code it placed in the header... this Auctions works without header code. Good call! Missions might work, but it would not have a shot with db> so thanks for picking up on that. -
Fatal error: Call to undefined function gang_Armory()
mr_shuu replied to mr_shuu's topic in Free Modifications
part 2 the other half } else { print "The vault has \${$gangdata['gangMONEY']} and {$gangdata['gangCRYSTALS']} crystals. <form action='yourgang.php?action=staff&act2=vault' method='post'> Give \$<input type='text' name='money' /> and <input type='text' name='crystals' /> crystals To: <select name='who' type='dropdown'>"; $q=$db->query("SELECT userid,username FROM users WHERE gang={$gangdata['gangID']}"); while($r=$db->fetch_row($q)) { print "\n<option value='{$r['userid']}'>{$r['username']}</option>"; } print "</select> <input type='submit' value='Give' /></form>"; } } function gang_staff_vicepres() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['subm'])) { $q=$db->query("SELECT * FROM users WHERE userid={$_POST['vp']} AND gang={$ir['gang']}"); if($db->num_rows($q) < 1) { die("Invalid user or user not in your gang."); } $memb=$db->fetch_row($q); $db->query("UPDATE gangs SET gangVICEPRES={$_POST['vp']} WHERE gangID={$gangdata['gangID']}"); event_add($memb['userid'],"You were transferred vice-presidency of {$gangdata['gangNAME']}.",$c); print "Vice-Presidency was transferred to {$memb['username']}"; } else { print "<form action='yourgang.php?action=staff&act2=vicepres' method='post'> Enter the ID of the new vice-president. <input type='hidden' name='subm' value='submit' /> ID: <input type='text' name='vp' value='{$gangdata['gangVICEPRES']}' maxlength='7' width='7' /> <input type='submit' value='Change' /></form>"; } } function gang_staff_wardeclare() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['subm'])) { $_POST['gang'] = abs((int) $_POST['gang']); $db->query("INSERT INTO gangwars VALUES('',{$ir['gang']},{$_POST['gang']},unix_timestamp())"); $ggq=$db->query("SELECT * FROM gangs WHERE gangID={$_POST['gang']}"); $them=$db->fetch_row($ggq); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] declared war on [url='gangs.php?action=view&ID={$_POST[']{$them['gangNAME']}[/url]"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',{$_POST['gang']},unix_timestamp(),'$event')"); print "You have declared war!"; } else { print "<form action='yourgang.php?action=staff&act2=declare' method='post'> Choose who to declare war on. <input type='hidden' name='subm' value='submit' /> Gang: <select name='gang' type='dropdown'>"; $q=$db->query("SELECT * FROM gangs WHERE gangID != {$ir['gang']}"); while($r=$db->fetch_row($q)) { print "<option value='{$r['gangID']}'>{$r['gangNAME']}</option>\n"; } print "</select> <input type='submit' value='Declare' /></form>"; } } function gang_staff_surrender() { global $db,$ir,$c,$userid,$gangdata; if(!isset($_POST['subm'])) { print "<form action='yourgang.php?action=staff&act2=surrender' method='post'> Choose who to surrender to. <input type='hidden' name='subm' value='submit' /> Gang: <select name='war' type='dropdown'>"; $wq=$db->query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}"); while($r=$db->fetch_row($wq)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $d=date('F j, Y, g:i:s a',$r['warTIME']); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); print "<option value='{$r['warID']}'>{$them['gangNAME']}</option>"; } print "</select> Message: <input type='text' name='msg' /> <input type='submit' value='Surrender' /></form>"; } else { $_POST['war'] = abs((int) $_POST['war']); $wq=$db->query("SELECT * FROM gangwars where warID={$_POST['war']}"); $r=$db->fetch_row($wq); if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $db->query("INSERT INTO surrenders VALUES('',{$_POST['war']},{$ir['gang']},".$r[$f].",'{$_POST['msg']}')"); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] have asked to surrender the war against [url='gangs.php?action=view&ID={$them[']{$them['gangNAME']}[/url]"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',".$r[$f].",unix_timestamp(),'$event')"); print "You have asked to surrender."; } } function gang_staff_viewsurrenders() { global $db,$ir,$c,$userid,$gangdata; if(!isset($_POST['subm'])) { print "<form action='yourgang.php?action=staff&act2=viewsurrenders' method='post'> Choose who to accept the surrender from. <input type='hidden' name='subm' value='submit' /> Gang: <select name='sur' type='dropdown'>"; $wq=$db->query("SELECT s.*,w.* FROM surrenders s LEFT JOIN gangwars w ON s.surWAR=w.warID WHERE surTO={$ir['gang']}"); while($r=$db->fetch_row($wq)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); print "<option value='{$r['surID']}'>War vs. {$them['gangNAME']} (Msg: {$r['surMSG']})</option>"; } print "</select> <input type='submit' value='Accept Surrender' /></form>"; } else { $_POST['sur'] = abs((int) $_POST['sur']); $q=$db->query("SELECT surWAR FROM surrenders WHERE surID={$_POST['sur']}"); list($_POST['war']) = $db->fetch_row($q); $wq=$db->query("SELECT * FROM gangwars where warID={$_POST['war']}"); $r=$db->fetch_row($wq); if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $db->query("DELETE FROM surrenders WHERE surID={$_POST['sur']}"); $db->query("DELETE FROM gangwars WHERE warID={$_POST['war']}"); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] have accepted the surrender from [url='gangs.php?action=view&ID={$them[']{$them['gangNAME']}[/url], the war is over!"); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',".$r[$f].",unix_timestamp(),'$event')"); print "You have accepted surrender, the war is over."; } } function gang_staff_orgcrimes() { global $db,$ir,$c,$userid,$gangdata; $_POST['crime'] = abs((int) $_POST['crime']); if($_POST['crime']) { if($gangdata['gangCRIME'] != 0) { print "Your gang is already doing a crime!"; } else { $db->query("UPDATE gangs SET gangCRIME={$_POST['crime']},gangCHOURS=24 WHERE gangID={$ir['gang']}"); print "You have started to plan this crime. It will take 24 hours."; } } else { print "<h3>Organised Crimes</h3> <form action='yourgang.php?action=staff&act2=crimes' method='post'>Choose a crime that your gang should commit. <select name='crime' type='dropdown'>"; $cnt=$db->query("SELECT username FROM users WHERE gang={$gangdata['gangID']}"); $membs=$db->num_rows($cnt); $q=$db->query("SELECT * FROM orgcrimes WHERE ocUSERS <= $membs"); while($r=$db->fetch_row($q)) { print "<option value='{$r['ocID']}'>{$r['ocNAME']} ({$r['ocUSERS']} members needed)</option>"; } print "</select> <input type='submit' value='Commit' /></form>"; } } function gang_staff_pres() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid) { if(isset($_POST['subm'])) { $q=$db->query("SELECT * FROM users WHERE userid={$_POST['vp']} AND gang={$ir['gang']}", $c); if($db->num_rows($q) < 1) { die("Invalid user or user not in your gang."); } $memb=$db->fetch_row($q); $db->query("UPDATE gangs SET gangPRESIDENT={$_POST['vp']} WHERE gangID={$gangdata['gangID']}"); event_add($memb['userid'],"You were transferred presidency of {$gangdata['gangNAME']}.",$c); print "Presidency was transferred to {$memb['username']}"; } else { print "<form action='yourgang.php?action=staff&act2=pres' method='post'> Enter the ID of the new president. <input type='hidden' name='subm' value='submit' /> ID: <input type='text' name='vp' value='{$gangdata['gangPRESIDENT']}' maxlength='7' width='7' /> <input type='submit' value='Change' /></form>"; } } } function gang_staff_armoryupgrade() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangARMORY'] == 1) { die("Your gang has already purchased this upgrade."); } if($gangdata['gangMONEY'] < 1000000) { die("Your gang doesn't have enough funds to get an armory.</br>It costs $1,000,000 to purchase this upgrade."); } else { print"You have purchased an armory for your gang.</br>You can now store items in your gang to lend/give out to your members!"; mysql_query("UPDATE gangs SET gangARMORY=1 WHERE gangID={$ir['gang']}",$c); mysql_query("UPDATE gangs SET gangMONEY=gangMONEY-1000000 WHERE gangID={$ir['gang']}",$c); mysql_query("INSERT INTO gangevents VALUES ('',{$gangdata['gangID']},unix_timestamp(),\"The gang has been upgraded. There is now a gang armory. Click [url='yourgang.php?action=armory']Armory[/url] to view the current items.\");",$c); } } function gang_staff_upgrades() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['membs'])) { $_POST['membs']=abs($_POST['membs']); if($_POST['membs']*100000 > $gangdata['gangMONEY']) { print "Your gang does not have enough money to upgrade that much capacity."; } else { $cost=$_POST['membs']*100000; $db->query("UPDATE gangs SET gangCAPACITY=gangCAPACITY+{$_POST['membs']},gangMONEY=gangMONEY-$cost WHERE gangID={$ir['gang']}"); print "You paid \$$cost to add {$_POST['membs']} capacity to your gang."; } } else { print "[b]<u>Capacity</u>[/b] Current Capacity: {$gangdata['gangCAPACITY']} <form action='yourgang.php?action=staff&act2=upgrade' method='post'>Enter the amount of extra capacity you need. Each extra member slot costs \$100,000. <input type='text' name='membs' /> <input type='submit' value='Buy' /></form>"; } } function gang_leave() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid) { print "You cannot leave while you are still president or vice-president of your gang."; } else { $db->query("UPDATE users SET gang=0,daysingang=0 WHERE userid=$userid"); $db->query("INSERT INTO gangevents VALUES ('',{$ir['gang']},unix_timestamp(),'[url='']{$ir['username']}[/url] left the gang.');"); print "You left your gang."; } } function gang_warview() { global $db,$ir,$c,$userid,$gangdata; $wq=$db->query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}"); print "[b]These are the wars your gang is in.[/b] <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Time Started</th><th>Versus</th><th>Who Declared</th></tr>"; while($r=$db->fetch_row($wq)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $d=date('F j, Y, g:i:s a',$r['warTIME']); $ggq=$db->query("SELECT * FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($ggq); print "<tr><td>$d</td><td>[url='gangs.php?action=view&ID={$them[']{$them['gangNAME']}[/url]</td><td>$w</td></tr>"; } print "</table>"; } function gang_atklogs() { global $db,$ir,$c,$userid,$gangdata; $atks=$db->query("SELECT a.*,u1.username as attackern,u1.gang as attacker_gang, u2.username as attackedn,u2.gang as attacked_gang FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u1.gang={$ir['gang']} OR u2.gang={$ir['gang']}) AND result='won' ORDER BY time DESC LIMIT 50"); print "[b]Attack Logs - The last 50 attacks involving someone in your gang[/b] <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Time</th><th>Attack</th></tr>"; while($r=$db->fetch_row($atks)) { if($r['attacker_gang'] == $ir['gang']) { $color="green"; } else { $color="red"; } $d=date('F j, Y, g:i:s a',$r['time']); print "<tr><td>$d</td><td>[url='viewuser.php?u={$r[']{$r['attackern']}[/url] <font color='$color'>attacked</font> [url='viewuser.php?u={$r[']{$r['attackedn']}[/url]</td></tr>"; } print "</table>"; } function gang_crimes() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangCRIME']) { print "This is the crime your gang is planning at the moment. [b]Crime:[/b] {$gangdata['ocNAME']} [b]Hours Left:[/b] {$gangdata['gangCHOURS']}"; } else { print "Your gang is not currently planning a crime."; } } function gang_staff_massmailer() { global $db,$ir,$c,$userid,$gangdata; if($_POST['text']) { $subj="This is a mass mail from your gang"; $q=$db->query("SELECT * FROM users WHERE gang={$ir['gang']}"); while($r=$db->fetch_row($q)) { $db->query("INSERT INTO mail VALUES('', 0, {$ir['userid']}, {$r['userid']}, unix_timestamp(),'$subj','{$_POST['text']}')"); print "Mass mail sent to {$r['username']}. "; } print "Mass mail sending complete! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "[b]Mass Mailer[/b] <form action='yourgang.php?action=staff&act2=massmailer' method='post'> Text: <textarea name='text' rows='7' cols='40'></textarea> <input type='submit' value='Send' /></form>"; } } function gang_staff_masspayment() { global $db,$ir,$c,$userid,$gangdata; $_POST['amnt']=abs((int) $_POST['amnt']); if($_POST['amnt']) { $q=$db->query("SELECT * FROM users WHERE gang={$ir['gang']}"); while($r=$db->fetch_row($q)) { if($gangdata['gangMONEY'] >= $_POST['amnt']) { event_add($r['userid'],"You were given \${$_POST['amnt']} from your gang.",$c); $db->query("UPDATE users SET money=money+{$_POST['amnt']} WHERE userid={$r['userid']}", $c); $gangdata['gangMONEY']-=$_POST['amnt']; print "Money sent to {$r['username']}. "; } else { print "Not enough in the vault to pay {$r['username']}! "; } } $db->query("UPDATE gangs SET gangMONEY={$gangdata['gangMONEY']} WHERE gangID={$ir['gang']}", $c); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(), 'A mass payment of \${$_POST['amnt']} was sent to the members of the Gang.')"); print "Mass payment sending complete! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "[b]Mass Payment[/b] <form action='yourgang.php?action=staff&act2=masspayment' method='post'> Amount: <input type='text' name='amnt' /> <input type='submit' value='Send' /></form>"; } } function gang_staff_desc() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid ) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); $db->query("UPDATE gangs SET gangDESC='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}"); print "Gang description changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Description: {$gangdata['gangDESC']} <form action='yourgang.php?action=staff&act2=desc' method='post'> Enter the new description. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'></textarea> <input type='submit' value='Change' /></form>"; } } } function gang_staff_ament() { global $db,$ir,$c,$userid,$gangdata; if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); $db->query("UPDATE gangs SET gangAMENT='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}"); print "Gang announcement changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { $gd=str_replace(array("<", ">", " "), array("<", ">", "\n"), $gangdata['gangAMENT']); print "Current Announcement: {$gangdata['gangAMENT']} <form action='yourgang.php?action=staff&act2=ament' method='post'> Enter the new announcement. <input type='hidden' name='subm' value='submit' /> Desc: <textarea name='vp' cols='40' rows='7'>{$gd}</textarea> <input type='submit' value='Change' /></form>"; } } function gang_staff_name() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid ) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); $db->query("UPDATE gangs SET gangNAME='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}"); print "Gang name changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Name: {$gangdata['gangNAME']} <form action='yourgang.php?action=staff&act2=name' method='post'> Enter the new name. <input type='hidden' name='subm' value='submit' /> Name: <input type='text' name='vp' value='' /> <input type='submit' value='Change' /></form>"; } } } function gang_staff_tag() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid ) { if(isset($_POST['subm'])) { $_POST['vp']=str_replace(array("<", ">", "\n"), array("<", ">", " "), $_POST['vp']); $db->query("UPDATE gangs SET gangPREF='{$_POST['vp']}' WHERE gangID={$gangdata['gangID']}"); print "Gang tag changed! [url='yourgang.php?action=staff']> Back[/url]"; } else { print "Current Tag: {$gangdata['gangPREF']} <form action='yourgang.php?action=staff&act2=tag' method='post'> Enter the new tag. <input type='hidden' name='subm' value='submit' /> tag: <input type='text' name='vp' value='' /> <input type='submit' value='Change' /></form>"; } } } $h->endpage(); ?> Fatal error: Call to undefined function gang_Armory() in /home/content/7/html/yourgang.php on line ------------------------------------------------------------------ I have had no luck with any armory script -
Call to undefined function <?php include "globals.php"; if(!$ir['gang']) { print "You're not in a gang."; } else { $gq=$db->query("SELECT g.*,oc.* FROM gangs g LEFT JOIN orgcrimes oc ON g.gangCRIME=oc.ocID WHERE g.gangID={$ir['gang']}"); $gangdata=$db->fetch_row($gq); print "<h3><u>Your Gang - {$gangdata['gangNAME']}</u></h3>"; $wq=$db->query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}"); if($db->num_rows($wq) > 0) { print "<h3>[url='yourgang.php?action=warview']<font color=red>Your gang is currently in ".$db->num_rows($wq)." war(s).</font>[/url]</h3>"; } switch($_GET['action']) { case "idx": gang_index(); break; case "summary": gang_summary(); break; case "members": gang_memberlist(); break; case "kick": gang_staff_kick(); break; case "forums": gang_forums(); break; case "donate": gang_donate(); break; case "donate2": gang_donate2(); break; case "warview": gang_warview(); break; case "staff": gang_staff(); break; case "leave": gang_leave(); break; case "atklogs": gang_atklogs(); break; case "crimes": gang_crimes(); break; case "armory": the_armory(); break; default: gang_index(); break; } } function gang_index() { global $db,$ir,$c,$userid,$gangdata; print "<table style='border: none;'><tr><td>[url='yourgang.php?action=summary']Summary[/url]</td><td>[url='yourgang.php?action=donate']Donate[/url]</td></tr><tr><td>[url='yourgang.php?action=members']Members[/url]</td><td>[url='yourgang.php?action=crimes']Crimes[/url]</td></tr><tr><td>[url='yourgang.php?action=forums']Forums[/url]</td><td>[url='yourgang.php?action=armory']Armory[/url]</td></tr><tr><td>[url='yourgang.php?action=atklogs']Attack Logs[/url]</td><td>"; if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid ) { print "[url='yourgang.php?action=staff&act2=idx']Staff Room[/url]"; } else { print ""; } print "</td></tr></table> <table cellspacing=1 class='table'><tr style='background:gray;'><td align=center class='h'>Gang Announcement</td></tr> <tr><td bgcolor='#DDDDDD'>{$gangdata['gangAMENT']}</td></tr></table> [b]Last 10 Gang Events[/b] "; $q=$db->query("SELECT * FROM gangevents WHERE gevGANG={$ir['gang']} ORDER BY gevTIME DESC LIMIT 10"); print "<table width=75% cellspacing=1 class='table'><tr style='background:gray;'><th>Time</th><th>Event</th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>".date('F j Y, g:i:s a',$r['gevTIME'])."</td><td>{$r['gevTEXT']}</td></tr>"; } print "</table>"; } function gang_summary() { global $db,$ir,$c,$userid,$gangdata; print "[b]General[/b] "; $pq=$db->query("SELECT * FROM users WHERE userid={$gangdata['gangPRESIDENT']}"); $ldr=$db->fetch_row($pq); $vpq=$db->query("SELECT * FROM users WHERE userid={$gangdata['gangVICEPRES']}"); $coldr=$db->fetch_row($vpq); print "President: [url='viewuser.php?u={$ldr[']{$ldr['username']}[/url] Vice-President: [url='viewuser.php?u={$coldr[']{$coldr['username']}[/url] "; $cnt=$db->query("SELECT username FROM users WHERE gang={$gangdata['gangID']}"); print "Members: ".$db->num_rows($cnt)." Capacity: {$gangdata['gangCAPACITY']} Respect Level: {$gangdata['gangRESPECT']}<hr /> [b]Financial:[/b] Money in vault: \${$gangdata['gangMONEY']} Crystals in vault: {$gangdata['gangCRYSTALS']}"; } function gang_memberlist() { global $db,$ir,$c,$userid,$gangdata; print "<table cellspacing=1 class='table'><tr style='background: gray;'><th>User</th><th>Level</th><th>Days In Gang</th><th></th></tr>"; $q=$db->query("SELECT * FROM users WHERE gang={$gangdata['gangID']} ORDER BY daysingang DESC, level DESC"); while($r=$db->fetch_row($q)) { print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url]</td><td>{$r['level']}</td> <td>{$r['daysingang']}</td><td>"; if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid ) { print "[url='yourgang.php?action=kick&ID={$r[']Kick[/url]"; } else { print ""; } print "</td></tr>"; } print "</table> [url='yourgang.php']> Back[/url]"; } function gang_staff_kick() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid ) { $_GET['ID'] = abs((int) $_GET['ID']); $who=$_GET['ID']; if($who==$gangdata['gangPRESIDENT']) { print "The gang president cannot be kicked."; } else if($who == $userid) { print "You cannot kick yourself, if you wish to leave transfer your powers to someone else and then leave like normal."; } else { $q=$db->query("SELECT * FROM users WHERE userid=$who AND gang={$gangdata['gangID']}"); if($db->num_rows($q)) { $kdata=$db->fetch_row($q); $db->query("UPDATE users SET gang=0,daysingang=0 WHERE userid=$who"); print "[b]{$kdata['username']}[/b] was kicked from the Gang."; event_add($who,"You were kicked out of {$gangdata['gangNAME']} by [url='viewuser.php?u=$userid']{$ir['username']}[/url]",$c); $db->query("INSERT INTO gangevents VALUES('',{$gangdata['gangID']},unix_timestamp(),'[url='']{$kdata['username']}[/url] was kicked out of the Gang by [url='']{$ir['username']}[/url]');"); } else { print "Trying to kick nonexistant user"; } } } else { print "You do not have permission to perform this action."; } } function gang_forums() { global $db,$ir,$c,$userid,$gangdata; $q=$db->query("SELECT * FROM forum_forums WHERE ff_auth='gang' AND ff_owner={$ir['gang']}"); if($db->num_rows($q) == 0) { $gangdata['gangNAME']=$db->escape($gangdata['gangNAME']); $db->query("INSERT INTO forum_forums VALUES('', '{$gangdata['gangNAME']}', '', 0, 0, 0, 0, 'N/A', 0, 'N/A', 'gang', {$ir['gang']})"); $r['ff_id']=$db->insert_id(); } else { $r=$db->fetch_row($q); if($r['ff_name'] != $gangdata['gangNAME']) { $gangdata['gangNAME']=$db->escape($gangdata['gangNAME']); $db->query("UPDATE forum_forums SET ff_name='{$gangdata['gangNAME']}' WHERE ff_id={$r['ff_id']}"); } } header("Location: forums.php?viewforum={$r['ff_id']}"); exit; /* $_GET['topic'] = abs((int) $_GET['topic']); $_GET['reply'] = abs((int) $_GET['reply']); $_GET['t'] = abs((int) $_GET['t']); global $db,$ir,$c,$userid,$gangdata; if($_GET['topic']) { $_GET['act2']="viewtopic"; $_GET['t']=$_GET['topic']; } if($_GET['reply']) { $_GET['act2']="reply"; $_GET['t']=$_GET['reply']; } switch($_GET['act2']) { case "viewtopic": gang_forums_viewtopic(); break; case "reply": gang_forums_reply(); break; case "newtopicform": gang_forums_newt_form(); break; case "newtopicsub": gang_forums_newt_sub(); break; default: gang_forums_idx(); break; } */ } function gang_forums_idx() { global $db,$ir,$c,$userid,$gangdata; print "Welcome to your gang forums! [[url='yourgang.php?action=forums&act2=newtopicform']Start New Topic[/url]] <table width=80% cellspacing=1 class='table'><tr style='background:gray;'><th>Topic</th><th>Starter</th><th>Replies</th> <th>Views</th><th>Last Post</th></tr>"; $tpcs=$db->query("SELECT t.*,u1.username as startername,u2.username as lastpostername FROM gangforums_topics t LEFT JOIN users u1 ON t.gft_userid=u1.userid LEFT JOIN users u2 ON t.gft_lastposterid=u2.userid WHERE t.gft_gangid={$gangdata['gangID']} ORDER BY t.gft_lastpost DESC"); while($t=$db->fetch_row($tpcs)) { print "<tr><td>[url='yourgang.php?action=forums&topic={$t[']{$t['gft_title']}[/url]</td><td>[url='viewuser.php?u={$t[']{$t['startername']}[/url]</td> <td>{$t['gft_replies']}</td><td>{$t['gft_views']}</td><td>"; print date('F j Y, g:i:s a',$t['gft_lastpost']); print " By: [url='viewuser.php?u={$t[']{$t['lastpostername']}[/url]</td></tr>"; } print "</table>"; } function gang_forums_viewtopic() { global $db,$ir,$c,$userid,$gangdata; $tpcd=$db->query("SELECT t.*,u1.* FROM gangforums_topics t LEFT JOIN users u1 ON t.gft_userid=u1.userid WHERE t.gft_id={$_GET['t']}"); $db->query("UPDATE gangforums_topics SET gft_views=gft_views+1 WHERE gft_id={$_GET['t']}"); $topic=$db->fetch_row($tpcd); $posts[0]['username']=$topic['username']; $posts[0]['userid']=$topic['userid']; $posts[0]['time']=$topic['gft_starttime']; $posts[0]['level']=$topic['level']; $posts[0]['nr']=1; $posts[0]['text']=str_replace("\n"," ",$topic['gft_text']); $cntr=0; $pq=$db->query("SELECT r.*,u.* FROM gangforums_replies r LEFT JOIN users u ON r.gfr_userid=u.userid WHERE r.gfr_topic={$_GET['t']} ORDER BY gfr_posttime ASC;"); while($r=$db->fetch_row($pq)) { $cntr++; $posts[$cntr]['username']=$r['username']; $posts[$cntr]['userid']=$r['userid']; $posts[$cntr]['time']=$r['gfr_posttime']; $posts[$cntr]['level']=$r['level']; $posts[$cntr]['nr']=$cntr+1; $posts[$cntr]['text']=str_replace("\n"," ",$r['gfr_text']); } print "<table width=80% cellspacing=1 class='table'><tr style='background:gray;'><th colspan=2>{$topic['gft_title']}</th></tr>"; foreach($posts as $cpost) { print "<tr><td>Post #{$cpost['nr']}</td><td>Time Posted: ".date('F j Y, g:i:s a',$cpost['time'])."</td></tr> <tr><td>[url='viewuser.php?u={$cpost[']{$cpost['username']}[/url] Level: {$cpost['level']}</td><td>{$cpost['text']}</td></tr>"; } print "</table>"; print " <table width=80% cellspacing=1 class='table'><tr style='background: gray;'><th>Add Reply</th></tr>"; print "<tr><td align=center><form action='yourgang.php?action=forums&reply={$_GET['t']}' method='post'>[b]Your Post:[/b] (no HTML, linebreaks automatically converted to <br />) <textarea rows=10 cols=80 name='textpost'></textarea> <input type='submit' value='Post' /></form></td></tr></table>"; } function gang_forums_reply() { global $db,$ir,$c,$userid,$gangdata; $t=$_GET['t']; $post=str_replace(array("<",">","'"),array("<",">","''"),$_POST['textpost']); $db->query("INSERT INTO gangforums_replies VALUES('',$userid,{$gangdata['gangID']},$t,'$post',unix_timestamp())"); $db->query("UPDATE gangforums_topics SET gft_replies=gft_replies+1,gft_lastpost=unix_timestamp(),gft_lastposterid=$userid WHERE gft_id=$t"); print "<table width=80% cellspacing=1 class='table'><tr style='background:gray;'><th>News</th></tr><tr><td align=center>Reply Posted!</td></tr></table> "; gang_forums_viewtopic(); } function gang_forums_newt_form() { global $db,$ir,$c,$userid,$gangdata; print "[b]Creating New Topic....[/b] <table cellspacing=1 class='table'> <form action='yourgang.php?action=forums&act2=newtopicsub' method='post'> <tr><td>Title:</td><td> <input type='text' name='topictitle' value='' /></td></tr> <tr><td>[b]Your Topic:[/b] [size="1"](no HTML, linebreaks automatically converted to <br />)[/size]</td><td><textarea rows=7 cols=40 name='topictext'></textarea></td></tr><tr> <td colspan=2 align=center><input type='submit' value='Post' /></td></tr></form></table>"; } function gang_forums_newt_sub() { global $db,$ir,$c,$userid,$gangdata; $title=str_replace(array("<",">","'"),array("<",">","''"),$_POST['topictitle']); $post=str_replace(array("<",">","'"),array("<",">","''"),$_POST['topictext']); $db->query("INSERT INTO gangforums_topics VALUES('',$userid,{$gangdata['gangID']},'$title','$post',0,0,unix_timestamp(),$userid, unix_timestamp())"); $iq=$db->query("SELECT max(gft_id) AS tid FROM gangforums_topics"); $iee=$db->fetch_row($iq); print "<table width=80% cellspacing=1 class='table'><tr style='background:gray;'><th>News</th></tr><tr><td align=center>Topic Posted!</td></tr></table> "; $_GET['t']=$iee['tid']; gang_forums_viewtopic(); } function gang_donate() { global $db,$ir,$c,$userid,$gangdata; print "[b]Enter the amounts you wish to donate.[/b] You have \${$ir['money']} money and {$ir['crystals']} crystals. <form action='yourgang.php?action=donate2' method='post'><table height=300 cellspacing=1 class='table'><tr><td>[b]Money:[/b] <input type='text' name='money' value='0'/></td><td>[b]Crystals:[/b] <input type='text' name='crystals' value='0' /></td></tr> <tr><td colspan=2 align=center><input type='submit' value='Donate' /></td></tr></table></form>"; } function gang_donate2() { global $db,$ir,$c,$userid,$gangdata; $_POST['money'] = abs((int) $_POST['money']); $_POST['crystals'] = abs((int) $_POST['crystals']); if($_POST['money'] > $ir['money']) { print "You are trying to donate more money than you have."; } else if($_POST['crystals'] > $ir['crystals']) { print "You are trying to donate more crystals than you have."; } else { $db->query("UPDATE users SET money=money-{$_POST['money']},crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY+{$_POST['money']},gangCRYSTALS=gangCRYSTALS+{$_POST['crystals']} WHERE gangID={$gangdata['gangID']}"); $db->query("INSERT INTO gangevents VALUES('',{$gangdata['gangID']},unix_timestamp(),\"[url='viewuser.php?u=$userid']{$ir['username']}[/url] donated \${$_POST['money']} and/or {$_POST['crystals']} crystals to the Gang.\");"); print "You donated \${$_POST['money']} and/or {$_POST['crystals']} crystals to the Gang."; } } function gang_staff() { global $db,$ir,$c,$userid,$gangdata; if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid ) { switch($_GET['act2']) { case "idx": gang_staff_idx(); break; case "apps": gang_staff_apps(); break; case "vault": gang_staff_vault(); break; case "vicepres": gang_staff_vicepres(); break; case "pres": gang_staff_pres(); break; case "upgrade": gang_staff_upgrades(); break; case "declare": gang_staff_wardeclare(); break; case "surrender": gang_staff_surrender(); break; case "viewsurrenders": gang_staff_viewsurrenders(); break; case "crimes": gang_staff_orgcrimes(); break; case "massmailer": gang_staff_massmailer(); break; case "desc": gang_staff_desc(); break; case "ament": gang_staff_ament(); break; case "name": gang_staff_name(); break; case "tag": gang_staff_tag(); break; case "masspayment": gang_staff_masspayment(); break; case "armoryupgrade": gang_staff_armoryupgrade(); break; default: gang_staff_idx(); break; } } else { print "Get out of here scumbag."; } } function gang_staff_idx() { global $db,$ir,$c,$userid,$gangdata; print "[b]General[/b] [url='yourgang.php?action=staff&act2=vault']Vault Management[/url] [url='yourgang.php?action=staff&act2=apps']Application Management[/url] [url='yourgang.php?action=staff&act2=vicepres']Change Vice-President[/url] [url='yourgang.php?action=staff&act2=upgrade']Upgrade Gang[/url] [url='yourgang.php?action=staff&act2=crimes']Organised Crimes[/url] [url='yourgang.php?action=staff&act2=masspayment']Mass Payment[/url] [url='yourgang.php?action=staff&act2=ament']Change Gang Announcement[/url] [url='yourgang.php?action=staff&act2=armoryupgrade']Add Armory Upgrade[/url] "; if($gangdata['gangPRESIDENT'] == $userid ) { print "<hr />[url='yourgang.php?action=staff&act2=pres']Change President[/url] [url='yourgang.php?action=staff&act2=declare']Declare War[/url] [url='yourgang.php?action=staff&act2=surrender']Surrender[/url] [url='yourgang.php?action=staff&act2=viewsurrenders']View or Accept Surrenders[/url] [url='yourgang.php?action=staff&act2=massmailer']Mass Mail Gang[/url] [url='yourgang.php?action=staff&act2=name']Change Gang Name[/url] [url='yourgang.php?action=staff&act2=desc']Change Gang Desc.[/url] [url='yourgang.php?action=staff&act2=tag']Change Gang Tag[/url]"; } } function gang_staff_apps() { global $db,$ir,$c,$userid,$gangdata,$h; $_GET['app'] = abs((int) $_GET['app']); if($_GET['app']) { $aq=$db->query("SELECT a.*,u.* FROM applications a LEFT JOIN users u ON a.appUSER=u.userid WHERE a.appID={$_GET['app']} AND a.appGANG={$gangdata['gangID']}"); if ($db->num_rows($aq)) { $appdata=$db->fetch_row($aq); if($_GET['what'] == 'decline') { $db->query("DELETE FROM applications WHERE appID={$_GET['app']}"); event_add($appdata['appUSER'],"Your application to join the {$gangdata['gangNAME']} gang was declined",$c); $db->query("INSERT INTO gangevents VALUES ('',{$gangdata['gangID']},unix_timestamp(),\"[url='viewuser.php?u=$userid']{$ir['username']}[/url] has declined [url='viewuser.php?u={$appdata[']{$appdata['username']}[/url]'s application to join the Gang.\");"); print "You have declined the application by {$appdata['username']}. [url='yourgang.php?action=staff&act2=apps']> Back[/url]"; } else { $cnt=$db->query("SELECT username FROM users WHERE gang={$gangdata['gangID']}"); if($gangdata['gangCAPACITY'] == $db->num_rows($cnt)) { print "Your gang is full, you must upgrade it to hold more before you can accept another user!"; $h->endpage(); exit; } else if ($appdata['gang'] != 0) { print "That person is already in a gang."; $h->endpage(); exit; } $db->query("DELETE FROM applications WHERE appID={$_GET['app']}"); event_add($appdata['appUSER'],"Your application to join the {$gangdata['gangNAME']} gang was accepted, Congrats!",$c); $db->query("INSERT INTO gangevents VALUES ('',{$gangdata['gangID']},unix_timestamp(),\"[url='viewuser.php?u=$userid']{$ir['username']}[/url] has accepted [url='viewuser.php?u={$appdata[']{$appdata['username']}[/url]'s application to join the Gang.\");"); $db->query("UPDATE users SET gang={$gangdata['gangID']},daysingang=0 WHERE userid={$appdata['userid']}"); print "You have accepted the application by {$appdata['username']}. [url='yourgang.php?action=staff&act2=apps']> Back[/url]"; } } } else { print "[b]Applications[/b] <table width=85% cellspacing=1 class='table'><tr style='background:gray;'><th>User</th><th>Level</th><th>Money</th><th>Reason</th> <th></th></tr>"; $q=$db->query("SELECT a.*,u.* FROM applications a LEFT JOIN users u ON a.appUSER=u.userid WHERE a.appGANG={$gangdata['gangID']}"); while($r=$db->fetch_row($q)) { print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']} [{$r['userid']}][/url]</td><td>{$r['level']}</td><td>\${$r['money']}</td> <td>{$r['appTEXT']}</td><td><a href='yourgang.php?action=staff&act2=apps&app={$r['appID']}&what=accept'> Accept</a> | <a href='yourgang.php?action=staff&act2=apps&app={$r['appID']}&what=decline'> Decline</a></td></tr>"; } print "</table>"; } } function gang_staff_vault() { global $db,$ir,$c,$userid,$gangdata; $_POST['who'] = abs((int) $_POST['who']); if($_POST['who']) { $_POST['crystals']=abs($_POST['crystals']); $_POST['money']=abs($_POST['money']); if($_POST['crystals'] > $gangdata['gangCRYSTALS']) { print "The vault does not have that many crystals!"; } else if($_POST['money'] > $gangdata['gangMONEY']) { print "The vault does not have that much money!"; } else { $who=(int) $_POST['who']; $md=$db->query("SELECT * FROM users WHERE userid=$who"); $data=$db->fetch_row($md); $money=(int) $_POST['money']; $crys=(int) $_POST['crystals']; $db->query("UPDATE users SET money=money+$money,crystals=crystals+$crys WHERE userid=$who"); $db->query("UPDATE gangs SET gangMONEY=gangMONEY-$money,gangCRYSTALS=gangCRYSTALS-$crys WHERE gangID={$gangdata['gangID']}"); event_add($who,"You were given \$$money and/or $crys crystals from your Gang.",$c); $db->query("INSERT INTO gangevents VALUES('',{$gangdata['gangID']},unix_timestamp(),\"[url='viewuser.php?u=$who']{$data['username']}[/url] was given \$$money and/or $crys crystals from the Gang.\")"); print "[url='viewuser.php?u=$who']{$data['username']}[/url] was given \$$money and/or $crys crystals from the Gang."; } -------------------------------------------------------------
-
I get this error Warning: Your GF handles all your money foru() put item back no no it didnt say that... but what about a indicator/ some fetch row () that places a number (5) on top of items market so players know how many items are up for sale in the market. If they see (0) they dont have to check all the drop downs. I posted this before and I tried to copy the hosp and jail main menu code and atered and messed with it and checked my tables and still could not get it...
-
It seems to work BUT I can add AN item to Auction, bid on it... but after adding three other items, which seem to go through, the Auction Market shows only the one and very first item. Another player added an item and that shows. Is it that only one item per ID? I'll check the code when I get back ...I have to do food shopping.
-
See as it stands its drop down menus on items... in the mod I ran from here with.... from your inventory you can put items up for sale... (I'll probably figure this out...I ask first and then dwell on it and usually get lucky...like and idiot savant) in that action of clicking to place an item up for sale... on the items page an event counter could list the number of items in item market (12) just once... the over all number... like jail and hosp does in the menu... this way players know if no items exist in drop down and they can save time checking every item category to find nothing.. perhaps after a person has thousands of players there are always items... I wont see that large of a following so....
-
I like what bertrand said about game balance. I am slowly working my way up from the bottom with items and paying attention to theme and formula. So at a certain city, at a certain level, players have stats and weapons and its fair game for all with weapon power and player money and player stats... in the beginning I have even silly items as defensive items.. like False Bravado as a defense... later on it might be Raging Hormones... a toilet plunger named Debra's Boyfriend is a weapon for level one to two... later it is "one mans demons" so mental illness is a weapon or a defense... I know I sound like a dope but why does a weapon have to be a knife, gun, bomb... the theme of the game... perhaps demonic possession is a weapon and and over bearing mother is armor... hahaha.. I have met people like that..
-
Dabs could do updates on these things... realllly! Have I told you guys how much I think I love you? That problem was driving me crazy...
-
I used a mod from here that looks great... drop down windows for items in items market.. BUT to have to click through all 30 categories to find out theres nothing for sale is a drag.. Any suggestion for a way to have an event, like hosp or jail, to show the number of added items, so players know whether or not to waste their time clicking categories... (note at this time I have five players... hahahaha)
-
jobs pay fixed it: $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY, u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0"); was not present
-
I'm kidding... wow we cant kid... excuse me...
-
Paul that makes sense. But what if: McCodes is faulty for a reason? Like the Government bailed out GM and say the government owns 70% of GM... then they could use ONSTAR to listen to us in our cars... the phone companies are in bed with the Government... What if they got to Daboom... the Feds, Bohemian Grove member or the Priory of Sion... just saying.. what if the reason for the unsecured coding goes deeper than we realize?
-
I had a crazy idea... why doesnt mccodes make his code secure and screw a lot of you out of money? just kidding... or how about this - someone take the cool FREE MODs... add em to a secured purchased mccodes.. charge double - cut mccodes in for their share.. give the free mod people credit mention on the mod pages...take the half or whatever as the fee for securing and modding... like a franchise.... get an Actor who looks like Tom Carvel or Burger KIng portraying the Coder...
-
trying for green bar over picture in attack trying for green bar over picture in attack... I get the right persons picture.. do I have the right red green bars.. when I try to test em I end up hosp ing the few testers... print "</table>"; print "<table width='50%' align='center'><tr><td align=right> {$odata['username']}</td> <td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10> [img=attpics/{$odata[] {$ir['username']}</td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10> [img=attpics/{$ir[] </td></tr> </table>"; } $h->endpage(); ?>
-
its a v1 program I'm trying to make v2 I thought this was the right place. I dont know where to move it to but I can edit it away... I'm not here to piss anyone off
-
------- ---------