Jump to content
MakeWebGames

Recommended Posts

Posted

Ok, Well this mod isnt the most complex mod, but i havent made any mods for a while, And i was meening to make this for my game anyways, Simple add on that can give user's something else to work on, And is another reason while there stay active in your game..

So here it is....Monkey Slaves...

Updated 25/6/08

Create new monkeys.php:

 

You're unable to view this code.

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

 

In Energy Cron:

 

You're unable to view this code.

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

 

In mainmenu.php add:

 

You're unable to view this code.

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

 

SQL:

 

You're unable to view this code.

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

 

Enjoy..

Posted

Re: [Free] [v1] Monkey Slaves

Nice stuff, As you said to me, people may want to change "Slave Monkeys" to "Slave Humans" or whatever suits their game :p

+1

Posted

Re: [Free] [v1] Monkey Slaves

 

it works now but you got to but 50 some monkeys to get it to start workin it say -50 some and u got to buy all of them plus more for it to say u got monkeys

I think this is the cron code, Ive updated now, it shouldnt go into negative monkeys :P

Posted

Re: [Free] [v1] Monkey Slaves

can anybody convert that to v2 please? and also any chance anybody could explain how to convert v1 into v2? +1 to whoever can do that and if both then +2

Posted

Re: [Free] [v1] Monkey Slaves

I didnt test but try this

 

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.

Posted

Re: [Free] [v1] Monkey Slaves

well give us more info. It's not often I am in a helpin mood.

Did you run the DB updates?

ALTER TABLE `users` ADD `monkey_hunger` INT( 25 ) NOT NULL DEFAULT '100';

ALTER TABLE `users` ADD `monkeys` INT( 25 ) NOT NULL DEFAULT '0';

Posted

Re: [Free] [v1] Monkey Slaves

Well that is certainly bizarre. So the rest of your game is working but this doesnt?? That doesnt make much sense.

Posted

Re: [Free] [v1] Monkey Slaves

LOL, I like the name, I cannot exactly add it onto my game without modifying it first

BTW, my game is a gangsta based one LOL.

Posted

Re: [Free] [v1] Monkey Slaves

+1 again to UCC-Got it running now and it works fine. thanks for the help....

LOL, I like the name, I cannot exactly add it onto my game without modifying it first

BTW, my game is a gangsta based one LOL.

 

The name of my game is Thugs Life. I modified it from monkeys to Street Soldiers... Im sure you will come up with something good

  • 1 month later...
Posted

Re: [Free] [v1] Monkey Slaves

If i make a event where you lose money or crystals, how can I stop if from going into negatives :?

I am just learning and figured this would be a good mod to play around with to learn the basics.

TIA This is a GREAT mod btw +1

Posted

Re: [Free] [v1] Monkey Slaves

Well $ir['money'] and $ir['crystals'] would tell you how much they have so make sure not to remove more than they currently have

Posted

Re: [Free] [v1] Monkey Slaves

Just make the losses be in a %. That should prevent it from going into the negs unless you have something that has a flat rate negative in your game that doesn't protect the users from abusing a glitch.

Posted

Re: [Free] [v1] Monkey Slaves

I thank you for the help, but I don't even know where to start with adding that stuff. This is just more to get me figuring stuff out. I want to learn to make my own mods and this is the best way I can think of.

This is an example of a Loss event for a slave. It looks like I have close to what you are talking about, but maybe in the wrong spot? Thanks for any help with this, I really want to learn this stuff!

 

if ($rand=='6')

{

$randcash=mt_rand(1,150);

$cash=($ir['cronies']*$randcash);

$safecash=mysql_real_escape_string($cash);

echo "Your Cronies were robbed of $$safecash!";

echo "

Try Again";

$db->query("UPDATE users SET money=money-'$safecash' WHERE userid=$userid");

$db->query("UPDATE users SET cronies_hunger=cronies_hunger-20 WHERE userid=$userid");

$h->endpage();

exit;

Posted

Re: [Free] [v1] Monkey Slaves

Well yes but make sure to base the loss of a RANDOM PERCENTAGE or else people will be able to go into the red which is what I'm trying to say. If you make the loss generator be a percentage then the other query is safe.

Posted

Re: [Free] [v1] Monkey Slaves

If you make it a percentage, people could lose LARGE amounts. Whereas, if you base it on number of slaves owned, it will be a relatively small amount, considering how Wookard has the mod at the moment.

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