Jump to content
MakeWebGames

streets.php includes image + ability to fight NPCS


Uridium

Recommended Posts

Ok before i start this is quite complicated coz ive edited quite a few files for this too work.

Files that need editing are

streets.php

attack.php

attacktake.php

So what does it do well its like the conventional streets or steps what ever you want to call it expect that you can be attacked by NPC's

The layout is a 600x600 image grid with 60x60 selectable segments Basically its an image map ;)

heres a screen shot

streetmap.png

Once ive got all my Edits together i will post the scripts on here in a few.

The Layout was tested by myself and Colonel which i am greatful for his support :)

Link to comment
Share on other sites

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

This will be in Several Edits as its quite large you will have to alter an Inventory items and the NPC id to that of your chosing all so you will need to edit the Descriptive text.

Call this file streets.php this file is PART 1 (sections will be joined together)

 

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

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

at the BOTTOM of PART 5 you will need again to ADD PARTS 2,3,4

once youve done that add this to the final part of the streets.php scriipt

 

You're unable to view this code.

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

 

and your Images

emptystreet.png

and also

>>> transparent.gif <<< There is an image there its just Transparent

Link to comment
Share on other sites

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

Ok regards your attack.php put it in an editor and name it attack3.php

make sure your $hosp rand is set to 0,0 as you will need the NPC to be able to stay in the game

also you will need to edit the hospital Query so that its zero

$db->query("UPDATE users SET hp=0, hospital=hospital=0

on the part that say what do you want to do with this person just make it so users have to leave them

 

You're unable to view this code.

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

 

Now open attacktake in your editor and rename it attacktake2.php

All you need to ammend on here

is again setting the hospital time to zero and comment out this line so that the BOT isnt recorded as a challenge

 

You're unable to view this code.

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

 

and thats it

Link to comment
Share on other sites

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

where do I find "$hosp rand" in the attack file at?

How about "$db->query("UPDATE users SET hp=0, hospital=hospital=0"

Both of those edits are supposed to be in the attack3 file,correct?

Also,I just ran the file,without the above edits and I got the following

"You dont have enough steps to explore the streets jackass, come back at newday"

"You have -1 Left"

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.

 

 

 

Naturally, you would need to modify that to suit your setup. I.e., change the image link, and change the way the click event is handled (i.e., I used a transparent image, wrapped in an A tag linked to a javascript deal. (My search is ajax based, otherwise I would have used a regular link) )

Your styles might need to be edited as well.

Link to comment
Share on other sites

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

You will need the STREETS setup already on your game for this to work the cron that was posted for the streets should update your TURNS each day.

You can manually alter your TURNS via your PHPMYADMIN panel under USERS / TURNS

Rgerads the Hosp time there is one mention of it in the attack.php and also attacktake.php

You will notice on my script the NPCS are set to 666 and 9 this is because on my database 666 and 9 are relevant to user_level 0 which is an NPC so you would need to alter these numbers on your script to correspond to two of your own NPCS that you have ni your game..

Link to comment
Share on other sites

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

Hmm

I just checked and the turns have not been updated.

Could you please repost the cron job for it?I assume I need to add that to the cron_day file,correct?

As far as hosp,I found it in attacktake.php,but for some reason,I don't see it in attack.php

What is the exact wording I am looking for?

Link to comment
Share on other sites

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

 

Hmm

I just checked and the turns have not been updated.

Could you please repost the cron job for it?I assume I need to add that to the cron_day file,correct?

As far as hosp,I found it in attacktake.php,but for some reason,I don't see it in attack.php

What is the exact wording I am looking for?

to loocate the settings for hospital just do your search guery as hosp

Regards the Cron for the above open up cron_day.php and add this

 

You're unable to view this code.

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

 

By the way i also forgot to mention on the streets.php all jail and hospital times are set to 0,0 as i was testing this so you would need to given a random Sentence for each

example

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

hospital=0 would need to be changed to the time you want them hospitalised

and again for jail times

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

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