Jump to content
MakeWebGames

streets.php includes image + ability to fight NPCS


Uridium

Recommended Posts

Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS

 

You would have to put a query in to reset the NPCs health so lets say you have even 5 people online and they all start vsing the NPC at the same time? I think there would be some problems there?

To regards your Query this is simply an aaition to the attacktake.php

Where the time is HOSP is situated just overwrite that line with ths one.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

The bots Energy so be reset once beaten ready for the next opponent...

Regards AVGUSTE's comment the sql are as follows

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Would be your SQL

ALSO

You dont have to stop at just having one search page you can make as many pages as you wanted..

All you would need to EDIT from now on would be the streets.php and leave the attack2.php and attack3.php as they are

Just add a command line at head of each page to only allow certain levelled player to view that Area..

Link to comment
Share on other sites

Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS

I wasnt happy with the orginal layout when you had to fight an NPC the page stayed as it stayed static which meant the USER could just carry on clicking on the map.

However i have found a cure and the page will open to the attack3.php without the aid of a link It has been tested and works fine im also trying to make it so NPCS are random and not ones that you have had to Add to the script yourself.

However this is taking some time. I will post the coding which will only effect the streets.php and none of the others...

Link to comment
Share on other sites

Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS

UPDATE

on the streets.php Overwrite Chance 2 with this one

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

When you Find an NPC in the Game the page will Change to the Attack3.php page so theres no more need for people to avoid the Challenges.

Also Added Bots are chosen at Random

Link to comment
Share on other sites

  • 2 weeks later...

Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS

 

:-D Thank you this is a very nice mod, and falls into my theme.

Just to let you know i tried to reg on your game but was unable to due to a missing table

Unknown column 'diamonds' in 'field list'

might be worth commenting out the diamonds part if they are not available

Link to comment
Share on other sites

Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Will Fix It

If you've Coded The Rest Right

---------------------------------------------------

OR

---------------------------------------------------

Maybe you changed crystals to diamonds in register so it doesnt recognize the field name becauase it doesnt exist

Link to comment
Share on other sites

Re: [uPGRADE] V2 streets.php includes image + ability to fight NPCS

 

i would use this personally.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Wink.gif

gah accendentitly put a "l" in it so heres the correct one.

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

  • 3 weeks later...

Re: [mccode v2] streets.php includes image + ability to fight NPCS

 

look on my game www.thedestroyers.co.cc/streets.php my image dosent show why dosnt it show

Sometimes the CSS on the header.php can cause images not to show up if your not seeing a RED X then its 100% an issue with your CSS try changing some colour backgrounds to a lighter colour.

Link to comment
Share on other sites

  • 1 month later...

Re: [mccode v2] streets.php includes image + ability to fight NPCS

 

For some reason i dont fail the steps. When it says you got arrested i dont go to jail or hospital!?

in your streets.php

find the lines for hospital and jail

$db->query("UPDATE users SET hospital=0 WHERE userid=$userid",$c);

and

$db->query("UPDATE users SET jail=0 WHERE userid=$userid",$c);

 

mine is set to 0 so i could test the script just change 0 to a time you want your members to be in hospital or jail

Link to comment
Share on other sites

Re: [mccode v2] streets.php includes image + ability to fight NPCS

Going in the line of Luke's post to ease up the 200 row/column listing, there are quite a load of if's that could be taken out

if($ir['money']> -1) {

$chance = rand(1,16);

}

else if($ir['money'] > 999999) {

$change = rand(1,17); // <- $change? or $chance?

}

this could be easyly changed to

$chance = ($ir['money'] < '99999') ? rand(1,16) : rand(1,17);

and then...

if ($chance == 1) {

$expcur=(($ir['exp']+$ir['exp_needed'])/100);

$exp=(($expcur)*rand(1,5));

print"<center><font size=3><font color=red>You stop in the local gym and purchase some illegal steroids , you gain some exp!

";

$db->query("UPDATE users SET exp=exp+$exp WHERE userid=$userid",$c);

}

this could be easyly changed to

switch($chance)

{

case 1:

//whatever code to satisfy $chance($result)

break;

....

}

a closer look to the code shows that the mapped image... isn't doing anything there... or am i missing something?

Link to comment
Share on other sites

  • 3 years later...
  • 1 year later...
Hey the images for this are gone, and I figured I would make my own but what format do I need on the height/width and the transparent one?

Dude, this thread is quite old. Some of the people on the thread aren't even around. Best bet is to try and make it fit for you.

Link to comment
Share on other sites

Dude, this thread is quite old. Some of the people on the thread aren't even around. Best bet is to try and make it fit for you.

Lol right on. Thanks man. I was just browsing around trying to see if there is any scripts I could use. I do animation and graphic designs and I am trying to learn how to incorporate that in with coding.

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