Jump to content
MakeWebGames

Recommended Posts

Posted

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 }

Posted

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

Posted

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 ?

Posted

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.

Posted

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);

Posted

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

Posted

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.

Posted

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?

Posted

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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...