Jump to content
MakeWebGames

Two questions regarding attacking


Psycho_Coder

Recommended Posts

  • 2 weeks later...

Re: Two questions regarding attacking

No worries guys :)

A simple move, and the problem is fixed.

Typically, anything at all to do with mccodes 1, 2, or lite has it's own little area and isn't part of the general coding area

to answer your questions...

1) add a counter variable - I think it already has one in it, doesn't it display the attack number to the screen, like this:

1. Bob hit Joe for 1 damage

2. Joe tried to hit bob but missed

3. Bob hit Joe again.

4. Joe missed again.

Find out what that variable in the front is, and somewhere near the top of your script add a check.

if($thatNUMBERvariable > 100)

{

die("Stalemate.");

}

2)yes.

Not sure where the code is, but you would change where it says

$expgain = rand(1,100) -- or something like that

TO

$expgain = $ir['exp_needed']/10; -- would give them 10 percent

Link to comment
Share on other sites

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