Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

hey im working on rangers_den.php file for me & a friends game. i showed him the code & he wanted me to add a extra function so that the higher your ranger level, the more animals you hunt. can someone helo me with that? heres the code.

Don't post paid mods.

Also i have a problem with when you hunt 0 animals you still gain some exp. how would i prevent that also.

Edited by Dominion
Don't post paid mods.
Posted

Im not going to give you an exact code, cos I cba looking through it all, but you would do something like this for the first thing you want:

$animals_hunted = $ir['rangerlevel'] * rand(10,20);

echo "You have hunted $animals_hunted animals.";

 

for the second part,

if ($animals_hunted == 0)

{

$exp_gain = 0;

}

else

{

$exp_gain = 250;

}

 

Try something like that. :)

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...