Jump to content
MakeWebGames

Recommended Posts

Posted

you can buy guards to guard your house which gives you extra will, you have a maximum amount of guards you can get which can be upgraded, you can train guards for more will

normal guard:$10000 will:+1

(train normal guard) Trained Guard:$15000 will:+1

(train trained guard) Ultimate guard:$15000 will:+1

extra guard space: $10000

these can be easily changed but i made it so upgrading a guard is better than buying another normal one, say if you wanted to buy 3 normal guards thats $30000 for the guards plus $30000 for the spaces =$60000 giving you 3 extra will wheras buying a normal guard- $10000 a space for the guard-$10000 upgrading the guard to ultimate guard-$30000 = $50000 and 3 will so its less :)

so obviously you can change the prises just try and keep them on the same scale

anyway here are the files...

buyguards.php

You're unable to view this code.

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

 

trainguards.php

You're unable to view this code.

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

 

guardhouse.php

You're unable to view this code.

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

 

replace estate.php with this...

You're unable to view this code.

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

 

estateguards.php

You're unable to view this code.

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

 

run these...

[mysql]ALTER TABLE users ADD guards1 INT(11) DEFAULT 0;

ALTER TABLE users ADD guards2 INT(11) DEFAULT 0;

ALTER TABLE users ADD guards3 INT(11) DEFAULT 0;

ALTER TABLE users ADD guards2e INT(11) DEFAULT 0;

ALTER TABLE users ADD guards3e INT(11) DEFAULT 0;

ALTER TABLE users ADD eguards INT(11) DEFAULT 0;

ALTER TABLE users ADD maxguards INT(11) DEFAULT 0;[/mysql]

add this to explore...

You're unable to view this code.

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

 

add this to viewuser...

You're unable to view this code.

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

Posted

Not really a mod I'll personally use, but it does look promising for some. :) Good Job.

Also. Do you mind if I split part of this up to make a custom system for my game? (I like asking permission before hand even if it's free)

Posted

ok i found this error in the script so had to change it a bit, if you had already added the mod before this was posted simply run this

[mysql]ALTER TABLE users ADD eguards INT(11) DEFAULT 0;[/mysql]

replace the estate.php again, add the file estateguards.php thats in the first post, otherwise juast add it normaly

  • 2 weeks later...
Posted

There is a valid point to this modification for the right game.

 

However I've don't see why you have 1million queries...Optimize them into one mate, And why not make a new db for them? -.- Better then clogging up the users table...

 

Example;

 

You're unable to view this code.

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

 

You're unable to view this code.

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

 

Easily done :)

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