
endo
Members-
Posts
116 -
Joined
-
Last visited
endo's Achievements
Newbie (1/14)
0
Reputation
-
Can be shortened Can be safely shortened without using the database and with a lot less coding. Start off by stripping the house name from all spaces, decapitalize (if thats even a word? but im sure you know what i mean), and set the link to add .jpg or gif or whatever the file type that you use is :) Its about 5 lines of code and uses no database querys. And remember it needs to be within the while() statement otherwise it will not select each house.
-
Testers Wanted And A General Review From Players Wanted
endo replied to endo's topic in Browsergames
Thanks for the replys i will now work on the login. -
Hello, you may have come accross my name in these forums does not matter if you have or have not. Anyway im looking for some testers of a game im currently working on, also i would like a general review from you guys as to whats bad and whats good and what could just do with a bit more work on. I would like you to bear in mind the game is under construction so dont expect everything to be fully functioning. The URL is http://www.felonycity.co.uk A short and simple description of the game is that you are a run of the mill, average joe just trying to make his way out of the gutter and into a better life from working commiting crimes etc. As time progresses i plan to make each user able to choose how they want to live and work whether they commit crimes or go on the straight and narrow path. But im still on the drawing board for these ideas. Register an account its free and simple. Should any errors occur please inform me. As for current players it is minimal as i said the game is working but still under construction.
-
Insert Points into Cmarket Every *set amount of time*
endo replied to Joshua's topic in Free Modifications
hmm one thing it can be used for is inflation draining but then again you are sacrificing stats or w/e you can trade crystals for on your game -
kaine try replacing this print "Name Changed to strip_tags({$_POST['name']}) with print "Name Changed to ".strip_tags($_POST['name'])." may sort your problem
-
Re: multiple houses with shared housing perhaps selecting the divorced users highest house would be a fairer way to do it
-
Community work on attack system :D (for coders only)
endo replied to plintu's topic in Requests & In Production
Re: Community work on attack system :D (for coders only) <?php include "globals.php"; $gets=mysql_real_escape_string($_GET['ID']); $get=abs((int) $gets); $mestr=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$get"); $me=mysql_fetch_array($mestr); $ustr=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); $u=mysql_fetch_array($ustr); $msecondary=$me['equip_secondary']; $usecondary=$u['equip_secondary']; $mprimary=$me['equip_primary']; $uprimary=$u[equip_primary $marmor=$me['armor']; $uarmor=$u['armor']; $magi=$me['agi']; $uagi=$u['agi']; $mehp=$me['hp']; $uhp=$u['hp']; $ugang=("SELECT COUNT('gang') FROM users WHERE userid=$get"); $megang=("SELECT COUNT('gang') FROM users WHERE userid=$userid"); $mpstr=$me['strength']*$mprimary*$megang/(floor($me['level'])/10); $upstr=$u['strength']*$uprimary*ugang/(floor($me['level'])/10); $msstr=$me['strength']*$msecondary*$megang/(floor($me['level'])/10); $usstr=$u['strength']*$usecondary*$ugang/(floor($me['level'])/10); $mdef=$me['def']*$megang*marmor/(floor($me['level'])/10); $udef=$u['def']*$ugang*$uarmor/(floor($me['level'])/10); $wait=$u['agi']-$me['agi']; $mypdamage=$mpstr-$udef; $urpdamage=$upstr-$mdef; $mysdamage=$msstr-$udef; $ursdamage=$usstr-$mdef; $mylife=rand(1,(floor($mehp/2))); $ulife=rand(1,(floor($uhp/2))); $myslife=rand(1,(floor($mehp/4))); $uslife=rand(1,(floor($uhp/4))); $exp=floor($u['level']-$me['level']*10); if($exp<1){$exp=20;} $lexp=floor($u['level']-$me['level']*10*1.5); if($exp<1){$exp=25;} if($lexp<1){$lexp=25;} //end variables// if($me['userid']==$u['userid']){mysql_query("UPDATE users SET hp=0, hospital=20, hospreason='committed suicide' WHERE userid=$userid");} die("<font size='4' color='red'>It wasn't very smart to try to kill yourself but you succeded!</font>");} if($me['level']-$u['level']>20){die("Quit trying to be a bully![url='index.php']GO HOME![/url]");} if($u['level']<10 && $me['level']>10){die("Come on give the little guy a chance!![url='index.php']GO HOME![/url]");} if($me['gang'] > 0 && $me['gang'] == $u['gang']){ die("Hey jerk watch it I am in your gang[url='index.php']GO AWAY[/url]");} if($u['userid']==1){die("You are no where near strong enough to beat God, try it again and you will be smacked down like never before!");} if($me['energy']<$me['maxenergy']/10){die("You must have at least 10% of your energy to attack![url='index.php']GO HOME![/url]");} if($mehp<10){die("You do not have enough Health to fight! [url='hospital.php']Go to hospital and heal[/url] or [url='index.php']Go Home[/url]");} if($uhp<10 && $u['gender']==male){die("Why are you try to kick a man while he's down! You are ruthless!");} if($uhp<10 && $u['gender']==female){die("Why are you try to kick a girl while she's down! You are ruthless!");} //end ifs run attack// print"You see {$u['username']} and decide they have lived long enough! it is time to get that ass! for your level with your primary weapon you have an attack strength of $mpstr , with your secondary weapon you have an attack strength of $msstr , and for your level your defense is $mdef"; if($wait>0){ if($mypdamage>0){ mysql_query("UPDATE `users` SET `hp`=hp-$ulife WHERE userid=$get"); print"You caused $mypdamage damage, using your primary weapon, to {$u['username']}with that hit and taking <font color='green'>$ulife</font> away from their health!"; mysql_query("UPDATE `users` SET `hp`=hp-$mylife WHERE userid=$userid"); print"{$u['username']} took a shot at you and hit you with $urpdamage using their primary weapon you lost <font color='red'>$mylife</font> with that hit!"; if($myhp>10 && $uhp<10){ if($u['money']>10){$umoney=rand(1,$u['money']/4);}else{$umoney=0;} mysql_query("UPDATE `users` SET `hospital`='20', hospreason='Beat down by {$me['username']}',hp=0, money=money-$umoney WHERE userid=$get"); mysql_query("UPDATE `users` SET `exp`=exp+$exp, money=money+$umoney WHERE userid=$userid"); event_add($u['userid'],"{$me['username']}, just whooped you and put you in the hospital!", $c); die("You destroyed {$u['username']} and sent them to the hospital! You gained $exp exp and stole $ $umoney!"); } elseif($myhp<10 && $uhp>10){ if($u['money']>10){$mymoney=rand(1,$me['money']/4);}else{$mymoney=0;} mysql_query("UPDATE `users` SET `hospital`='20',`money`=`money`+$mymoney, `exp`=exp-$lexp, hospreason='Lost to {$u['username']}'in a fight!',hp=0, exp=exp-$lexp WHERE userid=$userid"); mysql_query("UPDATE `users` SET money=money+$mymoney, exp=exp+$lexp WHERE userid=$get"); event_add($get,"{$me['username']} tried to beat you up but sadly got whooped You took $ $mymoney and gained $lexp exp!", $c); die("{$u['username']} destroyed you and you lost $lexp and $ $mymoney because you started the fight and sadly lost! }elseif($myhp<10 && $uhp<10){ event_add($get,"{$me['username']} tried to beat you up, you both sustained fatal injuries in the battle!", $c); event_add($userid,"You tried to beat up {$u['username']}, you both sustained fatal injuries in the battle!!", $c); mysql_query("UPDATE `users` SET `hospital`='20', hospreason='{$me['username']} and {$u['username']} died while {$me['username']} started the fight',hp=0 WHERE userid=$get"); mysql_query("UPDATE `users` SET `hospital`='20', hospreason='{$me['username']} and {$u['username']} died while {$me['username']} started the fight',hp=0 WHERE userid=$userid"); } if($myhp>10 && $uhp>10){ mysql_query("UPDATE `users` SET `hp`=hp-$ulife WHERE userid=$get"); print"You caused $mysdamage damage, using your secondary weapon, to {$u['username']}with that hit and taking <font color='green'>$uslife</font> away from their health!"; mysql_query("UPDATE `users` SET `hp`=hp-$mylife WHERE userid=$userid"); if($myhp>10 && $uhp<10){ if($u['money']>10){$umoney=rand(1,$u['money']/4);}else{$umoney=0;} mysql_query("UPDATE `users` SET `hospital`='20', hospreason='Beat down by {$me['username']}',hp=0, money=money-$umoney WHERE userid=$get"); mysql_query("UPDATE `users` SET `exp`=exp+$exp, money=money+$umoney WHERE userid=$userid"); event_add($u['userid'],"{$me['username']}, just whooped you and put you in the hospital!", $c); die("You destroyed {$u['username']} and sent them to the hospital! You gained $exp exp and stole $ $umoney!"); } elseif($myhp<10 && $uhp>10){ if($u['money']>10){$mymoney=rand(1,$me['money']/4);}else{$mymoney=0;} mysql_query("UPDATE `users` SET `hospital`='20',`money`=`money`+$mymoney, `exp`=exp-$lexp, hospreason='Lost to {$u['username']}'in a fight!',hp=0, exp=exp-$lexp WHERE userid=$userid"); mysql_query("UPDATE `users` SET money=money+$mymoney, exp=exp+$lexp WHERE userid=$get"); event_add($get,"{$me['username']} tried to beat you up but sadly got whooped You took $ $mymoney and gained $lexp exp!", $c); die("{$u['username']} destroyed you and you lost $lexp and $ $mymoney because you started the fight and sadly lost! }elseif($myhp<10 && $uhp<10){ event_add($get,"{$me['username']} tried to beat you up, you both sustained fatal injuries in the battle!", $c); event_add($userid,"You tried to beat up {$u['username']}, you both sustained fatal injuries in the battle!!", $c); mysql_query("UPDATE `users` SET `hospital`='20', hospreason='{$me['username']} and {$u['username']} died while {$me['username']} started the fight',hp=0 WHERE userid=$get"); mysql_query("UPDATE `users` SET `hospital`='20', hospreason='{$me['username']} and {$u['username']} died while {$me['username']} started the fight',hp=0 WHERE userid=$userid"); } echo sprintf("%s took a shot at you and hit you with %s using their secondary weapon, you lost <font color='red'>%s</font> with that hit!", htmlentities($u['username']), number_format($ursdamage), number_format($myslife)); } } } dont really have time to do a lot so i just sorted the end out slightly should be a helping hand and maybe someone else will do a bit :) -
Re: [v2] [v1] Time File Was Last Edited Yep thats it MyGunWars i actually use something very similar to this helps me keep on top of what i have updated and what i havent
-
Re: Gallery MOD Fixed and Secured erm if its within a function adn your using v2 you need to have $db as a global and then change mysql_ to $db-> and that should sort your problems
-
Re: (not working) Auto Multi IP Check a quick scan over it says its possibly because the while function is empty.... if it doesnt work - whats the error?
-
Re: Looking for code paying $5 jesus thedestroyer you caused all this hastle and it was simply outlined in one of my earlier posts if you would just have gotten off your ass looked up a few things on google you would have done it by now and you would have half of ce on your back i mean jesus you wont get any help at all on here now and immortalthug that is probably the best comment i have seen on ace in a while lol:)
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED dont suppose you want to post it pudda save me some time lol
-
Re: [MMCODES V2] HACKING ATTEMPTS LOGGED would be a good idea php scene i may put this together if i get time
-
Re: gang-staff-function i was testing this and come up with a few errors have sorted a few like a missing ; and one to many ). but now its coming up with Warning: in_array() [function.in-array]: Wrong datatype for second argument here is the updates so far down to that error function gang_staff_name() { global $db, $ir, $userid, $gangdata, $h, $leaders; if(in_array($userid, $leaders)) { if(isset($_POST['subm'])) { $_POST['subm'] = trim($_POST['subm']); $check=$db->query(sprintf("SELECT `gangNAME` FROM `gangs` WHERE `gangNAME` = '%s'", clean($_POST['vp']))); $checking=$db->query($check); if($db->num_rows == 1) { print "ERROR. [url='yourgang.php?action=staff']> Back[/url]"; } else if(strlen($_POST['vp']) < 8) { print "Your gang name must be at least 8 characters"; } else if(eregi('[^0-9a-z]', $_POST['vp'])) { print "Invalid name."; } else { $sql = sprintf("UPDATE gangs SET gangNAME = '%s' WHERE (gangID = %u)", clean($_POST['vp']), $gangdata['gangID']); $db->query($sql); echo sprintf("Crew name changed to %s. ", htmlentities($_POST['vp'])); echo "[url='yourgang.php?action=staff']> Back[/url]"; } } else { echo "Current Name: "; echo sprintf("%s ", format($gangdata['gangNAME'])); echo " <form action='yourgang.php?action=staff&act2=name' method='post'>"; echo "<input type='hidden' name='subm' value='submit' />"; echo "<table class='table' width='75%'>"; echo "<tr>"; echo "<th>New name</th>"; echo sprintf("<td style='text-align:center;'><input type='text' name='vp' value='%s' size='40%%' /></td>", format($gangdata['gangNAME'])); echo "</tr>"; echo "<tr>"; echo "<td colspan='2' style='text-align:center;'><input type='submit' value='Change' /></td>"; echo "</tr>"; echo "</table>"; echo "</form>"; } } }
-
Re: Awards Mod as far as i can see it just gives you two awards for leveling up. is that all or is there more than i can see here?