Karlos Posted September 20, 2008 Share Posted September 20, 2008 Ive Seen Games that Make Items For Food And Drinks So I Decided To Make A Shop That Adds Them On Straight Away Call It bar23.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Notice: Not Tested But Should Work EDIT: Removed An Unneeded } Quote Link to comment Share on other sites More sharing options...
flipster Posted September 20, 2008 Share Posted September 20, 2008 Re: Bar23 [V2] nice mod im pretty sure i have seen a mod like this before not 100% sure not bad though Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 20, 2008 Author Share Posted September 20, 2008 Re: Bar23 [V2] thanks but i can sat i made this 100% from scratch :-D im not the best coder but im still learning Quote Link to comment Share on other sites More sharing options...
flipster Posted September 20, 2008 Share Posted September 20, 2008 Re: Bar23 [V2] lol at least your trying mate Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 20, 2008 Author Share Posted September 20, 2008 Re: Bar23 [V2] Thanks Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 20, 2008 Author Share Posted September 20, 2008 Re: Bar23 [V2] I Noticed I Coded Tables Wrong -.-" anyway all fixed Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 21, 2008 Author Share Posted September 21, 2008 Re: Bar23 [V2] Kyle Helped Me Recode This So Here It Is You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
War_Hero Posted September 21, 2008 Share Posted September 21, 2008 Re: Bar23 [V2] Nice little mod there. +1 from me. :) The second one is much better as it's easier to read and understand. :) Quote Link to comment Share on other sites More sharing options...
Karlos Posted September 21, 2008 Author Share Posted September 21, 2008 Re: Bar23 [V2] Nice little mod there. +1 from me. :) The second one is much better as it's easier to read and understand. :) Thanks, Kyle Helped Me :wink: Thanks Kyle Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 21, 2008 Share Posted September 21, 2008 Re: Bar23 [V2] Your welcome. Quote Link to comment Share on other sites More sharing options...
Dave Posted September 21, 2008 Share Posted September 21, 2008 Re: Bar23 [V2] Looking good ;) Keep up the good work :D Quote Link to comment Share on other sites More sharing options...
jonomatt Posted September 21, 2008 Share Posted September 21, 2008 Re: Bar23 [V2] well done mate i've just added to my game but i need to change one thing. its that lunches is on the same row so im gonna add after. +1 from me mate well don Quote Link to comment Share on other sites More sharing options...
ADN Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] Verry nice mod. But, i'm level 1 and i have only 5 Braves. If i buy a vodka, my Brave bar grows up on 28 Braves. Half screen. All site is crashed. And i can't fix it (i just have to "spend" all Braves on crimes). How i can do to put those values in procent and max my bravemax ? Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. What this will do is: If i am level 3 exp needed 300 max brave = 9; rand(0,300) = 250; 250 / 3 = 83.33333 // but since we have int it will convert to 83 83 / 9 = 9.22222 // again it will convert to 9 9 x 1.2 = 10 So they will get 10 brave but by adding a code you can set it to just give them max brave if over there maxbrave I dont know what that will produce but its worth a try. Quote Link to comment Share on other sites More sharing options...
ADN Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] http://img91.imageshack.us/my.php?image=xxxox8.jpg Still the same issue. Is not 28, now is 18 (with 0/5 brave) Quote Link to comment Share on other sites More sharing options...
ADN Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] Found it. I put in bar23.php, above globals.php : $query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave<maxbrave "; $query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave"; $query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp<maxhp"; $query4="UPDATE users SET hp=maxhp WHERE hp>maxhp"; $db->query($query); $db->query($query2); $db->query($query3); $db->query($query4); //enerwill update $query="UPDATE users SET energy=energy+(maxenergy/(12.5)) WHERE energy<maxenergy AND donatordays=0"; $query5="UPDATE users SET energy=energy+(maxenergy/(6)) WHERE energy<maxenergy AND donatordays>0"; $query2="UPDATE users SET energy=maxenergy WHERE energy>maxenergy"; $query3="UPDATE users SET will=will+10 WHERE will<maxwill"; $query4="UPDATE users SET will=maxwill WHERE will>maxwill"; $db->query($query); $db->query($query5); $db->query($query2); $db->query($query3); $db->query($query4); Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] Very bad idea, you putting your cron into bar23, i can go there and refresh bar23.php the hole time and refill my will for free. Quote Link to comment Share on other sites More sharing options...
Tezza` Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] one of my friends programmed something like this not long back, his was called restaurant :P nice work :P Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] I'm sure you have made a mistake but since kyle helped you i won't point it out and lets see if he notices lol one question that comes to mind though Why so many queries? you could easily do that with alot less queries but ill give you your due mate, nice try Very bad idea, you putting your cron into bar23, i can go there and refresh bar23.php the hole time and refill my will for free. Kyle i believe he maybe talking about fivemin cron since that's the coding from a fivemin cron Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] Yes and he wants to add the code above include("globals.php") Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] that ain't the error im seeing Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] Just got to say some thing? Are you completly retarded? He wants to add the cron five mins above include("globals.php"); meaning i can get free will are you so retarded. I dont care if you found any other problems with the script as i never coded it all, i just gave him a preview and thats it. Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] Just got to say some thing? Are you completly retarded? He wants to add the cron five mins above include("globals.php"); meaning i can get free will are you so retarded. I dont care if you found any other problems with the script as i never coded it all, i just gave him a preview and thats it. i was talking about the script you edited mate and if he adds it in fivemin cron then no need why are you so hostile all the time? Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] I bet you can't read. Ill put it in caps for you. HE WANTED TO ADD THE CRON_FIVEMINS.PHP SCRIPT ABOVE THE INCLUDE("GLOBALS.PHP"); IN BAR23.PHP Can you read that or do you want me to speak it out? H E W A N T E D T O A D D T H E C R O N _ F I V E M I N S . P H P S C R I P T A B O V E T H E I N C L U D E ( " G L O B A L S . P H P " ) ; I N B A R 2 3 . P H P Want some thing better? Quote Link to comment Share on other sites More sharing options...
Zero-Affect Posted September 22, 2008 Share Posted September 22, 2008 Re: Bar23 [V2] yeah i know god... im saying im not talking about that error damn... get that in your immature mind blah i can't help you don't know sprintf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.