Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

I've been asking for help a lot and I've definitely received more of it than I've earned, so I thought I should start putting out some mods.

My first one is going to just be a simple revamp of a classic. I was never happy with using coordinates for searching the streets. This one simply uses mt_rand to determine outcomes is just a little cleaner and easier to edit than some floating around.

As written, users get 250 steps per day and have:

-- 10% chance of gaining crystals

-- 16% chance of gaining money

-- 11% chance of gaining experience

-- 11% chance of going to the hospital

-- 11% chance of going to jail

-- 41% chance of nothing happening

(All of this can be easily changed to your preference)

SQL:

You're unable to view this code.

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

 

streets.php:

You're unable to view this code.

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

 

Add to cron_day:

You're unable to view this code.

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

 

I did my best to take out anything specific to my game, so the wording on the hospital/jail results may be a little weird, but other than that, you shouldn't have any problems.

Edited by Seker
Forgot to post the cron
Posted

Ok i have tested this out and found couple problems

1. Streets.php - typos (easy fix) While traveling, you can find crystals, cash, or even gain experience! / You can travel 249 more times today!

2. wrong function info

change

You're unable to view this code.

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

 

to

 

You're unable to view this code.

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

 

thanks for the mod and nice work

Posted
V2 with edits.

Edits

* Removed the switch and created only one function

* Removed all tables and used H3 and P tags

* Maybe more, but can't remember.

* 127 lines -- who's bad?!

 

You're unable to view this code.

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

 

Tested? No.

Supporting? No.

Accepting free pr0n memberships? Oh, go on then!

Nice.I'm sure someone would have asked. And good going on the efficiency. Tables are just my personal preference.

This was only the second mod I sat down and wrote from scratch. It works for me, so I'm pretty happy with it. But your contribution is definitely appreciated SRB.

  • 2 weeks later...

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