
KashBFD
Members-
Posts
37 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by KashBFD
-
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
Any help? I got a question for whom it may concern. I have been trying my best to get the errors and bugs out of my current set of scripts. However one of many that i cant get my head around is my Bullet Factory script. See it works ok as in holds its stock, produces bullets, money works.. but atm it is set on 2000 bullets every hour, and when the time is up for some reason it wont update the bf's stock until someone is on the bf php page. I later managed to figure the function that is making the update of the bullets possible is ; $new_time=time()+3600; $up=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $a=mysql_query("SELECT * FROM bf WHERE location='$fetch->location'"); while($b=mysql_fetch_object($a)){ $user=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$b->owner'")); $minus=$user->money - 1000; if ($user->money <= $minus){ mysql_query("UPDATE bf SET owner='0', producing='0' WHERE id='$b->id'"); $crap=1; } if ($up->bullets < time() && $b->producing == "Yes" && $crap != "1"){ mysql_query("UPDATE bf SET stock=stock+2000"); mysql_query("UPDATE site_stats SET bullets='$new_time' WHERE id='1'"); mysql_query("UPDATE users SET money='$minus' WHERE username='$b->owner'"); } } . I tryed to copy and paste it in my functions.php page that is linked to most my scripts but nothing, so atm i have it placed in the footer.php... but still the issue remains someone has to be playing in order for the bf to refill. I will paste the whole scripts below , is there any suggestions..? I also managed to have a look in php my admin at the db to see wether it updates the times and it does but says 2006. Also im not experianced enough to notice the error.. FUNCTIONS; <?php session_start(); include_once"includes/db_connect.php"; include_once"includes/functions.php"; logincheck(); $username=$_SESSION['username']; $query=mysql_query("SELECT * FROM users WHERE username='$username'"); $fetch=mysql_fetch_object($query); $query_bf=mysql_query("SELECT * FROM bf WHERE location='$fetch->location'"); $fetch_bf=mysql_fetch_object($query_bf); if (strtolower($fetch_bf->owner) == (strtolower($fetch->username))){ require_once"bulletCP.php"; exit(); } $new_time=time()+3600; $up=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $a=mysql_query("SELECT * FROM bf WHERE location='$fetch->location'"); while($b=mysql_fetch_object($a)){ $user=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$b->owner'")); $minus=$user->money - 1000; if ($user->money <= $minus){ mysql_query("UPDATE bf SET owner='0', producing='0' WHERE id='$b->id'"); $crap=1; } if ($up->bullets < time() && $b->producing == "Yes" && $crap != "1"){ mysql_query("UPDATE bf SET stock=stock+2000"); mysql_query("UPDATE site_stats SET bullets='$new_time' WHERE id='1'"); mysql_query("UPDATE users SET money='$minus' WHERE username='$b->owner'"); } } if (strip_tags($_POST['check']) && (strip_tags($_POST['amount']))){ $amount=intval(strip_tags($_POST['amount'])); if ($amount == 0 || !$amount || ereg('[^0-9]',$amount)){ print "You cant buy that amount."; }elseif ($amount != 0 || $amount || !ereg('[^0-9]',$amount)){ $costs = $fetch_bf->price * $amount; if ($costs > $fetch->money){ echo "You do not have enough money"; } elseif ($costs <= $fetch->money){ $nmoney=$fetch->money - $costs; if ($fetch_bf->stock < $amount){ echo "Not that many bullets in the store."; } elseif ($amount <= $fetch_bf->stock){ $nbullets=$fetch->bullets + $amount; $nstock = $fetch_bf->stock - $amount; ///IF THERE IS NOOOOO OWNER if ($fetch_bf->owner == "0"){ mysql_query("UPDATE users SET bullets='$nbullets', money='$nmoney' WHERE username='$username'"); mysql_query("UPDATE bf SET stock='$nstock', profit='$costs' WHERE location='$fetch->location'"); echo "Bullets successfully bought."; ////IF THERE IS A OWNER }elseif ($fetch_bf->owner != "0"){ $fetch_owner=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$fetch_bf->owner'")); $new_owner=$fetch_owner->money + $costs; mysql_query("UPDATE users SET bullets='$nbullets', money='$nmoney' WHERE username='$username'"); mysql_query("UPDATE users SET money='$new_owner' WHERE username='$fetch_bf->owner'"); mysql_query("UPDATE bf SET stock='$nstock', profit='$costs' WHERE location='$fetch->location'"); echo "Bullets Successfully Bought."; } }} } } ?> and script displaying <?php if ($fetch_bf->producing == "Yes"){ echo "".maketime($up->bullets)." until Bullets next Stock."; }else{ echo "Not Producing"; } ?> -
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
P.S The scrolling over the iFrame doesnt appear on my end for some reason i previewed in Firefox an IE. :/ -
Kash_Killuminati - MW3 - BO - FightNight Champ - GT5 - Tekken - StreetFighter -
-
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
WOW now that is what i was waiting for all this time, haha. Thanks soooo much for your time, I really appreciate you doing so. Do you have msn or fb even so we could have a chat in detail. But really i am thankful for your advice. Although due to getting some testers yesterday it has left me thinking that i may actually be needing a coder due to the bugs discovered e,g, allowing of "-" and other characters in some of the box's on scripts and affecting maybe upto 80% of the scripts according to feedback. However i am trying my best to go through and find some solutions. Thanks Kash! -
I wanna see ya site bro
-
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
Once again thanks for the welcoming to the forum. Really Im not concerned at all about other peoples immature opinions i will try my best to give them a correct answer by all means to decrease confusion. However once again thanks for commenting and would really like to know if anyone is willing to help. Im not asking for the coding of a full script or so but just some advice and knowledge off other inteligent people. Thanks Kash P.S modernmafia, sorry about long reply i messaged you back via pm to your questions and it wasnt corruption but the lack of promotion. -
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
Thanks a lot for the welcome and support, dont worry about it. Theres haters everywhere. Like i said its been a while. Im looking for any experianced people in coding .php etc just to give me some pointers and see where the minor faults are in a few scripts as they were all working once upon a time. Really thanks.. Kash. Just searching through the forum i managed to get some solutions and found the forum very usefull. -
Well its not bad if its your first attempt or so. It could do with a few updates.
-
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
lmao im a ameatur at it, but i was getting diff coders to help me an paying some. Even now its online im jus fixing the scripts with bugs.. same with mysql i can set it up and alter the context/edit from diff scripts. -
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
Lmao listen i joined the forum for some advice of coders not for haters or people who have had **** backups of my game from the past and improved them, if so good for you hope your game goes far. I got GSM scripts around end of 2006 - 2007 and then improved them to my likeing. Around end of 2007 i joined with Cosa Nosta that was owned by Matt Gilks, and then we devoloped THM. It was around for a good part of a year and we also got hacked at the very early stages where scripts were copied and sold on for money. The scripts that got around with newer updates were from Matt selling on , typical kid mentality. Now i have been free in life due to not going to uni have decided to re-develop thm. So stop hating and go away. -
Hi to All! A Text Based Mafia game - Trigger Happy Mafia!
KashBFD replied to KashBFD's topic in Game Projects
Lmao LOL listen you fool, If you knew who designed and had the game you would clearly know me.. I had a lot of haters back then and a lot of people tried to hack my msn to get onto server etc.. Including the guy who went halfs with me 50/50 he was called Matt. Dont make false accusations if you dont know. I got ste to design the index.. and then payed Vlad to make it into the php. Also i designed 99% of graphics and 100% of logged_in2.php Latest Layout. Pissed me off reading your comment. Its been a long time since i had the game.. i started off playing Midnight-Mafia.. its been over 3 years im sure the scripts have been passed around like sluts but i doubt the latets backups we had/ LOL. -
Hi to all im Kash an im new to the forum, I have my own forum and website to do with a family hobby.. http://www.Pak-HighFlyers.com but also have a text based mafia game. I made/ edited some scripts back in 2008 an had the game up an running with a friend, however G.C.S.E's an A levels took over and i let my friend carry own taking it down hill. Only recently i have had some time to dig them back out and get them going again. Atm i have them on a free server and its http://www.thm.x10.mx . The server is absolutely crap and if there 5 or so players it will go off. I only had it up for about a week now but i have managed to take out a lot of bugs. I will buy a server and move the scripts with database, before performing a in-game reset. It is still getting updated daily and would be a great help if someone with some knowledge of .php coding or mysql database could have a look and then inform me of how to improve. Once again please be patient with server and the missing scripts as i have 1-2 different set of back ups.. but advice is welcome. Thanks Kash.