DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 02, 2010, 09:45:36 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Power Bee 2.1  (Read 1143 times)
0 Members and 1 Guest are viewing this topic.
fliquid
Guest
« on: August 11, 2005, 04:06:33 AM »

Power Bee 2.1

If you are lucky enough to get stung by it, it shall increase your hitpoint (not the permanent ones) for a random amount.

Admin Settings:

Minimum increase 1 or 5
Maximum increase 1 or 5

It's a strange way to do a random, I know.  Smiley
But i'm new to PHP, and it does it's work.

http://dragonprime.net/users/fliquid/powerbee.txt
« Last Edit: August 11, 2005, 04:30:55 AM by fliquid » Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #1 on: August 11, 2005, 04:19:30 AM »

Actually, that is the correct way to do a random variable. Smiley

Take a look at findgold.php, it does it the same way (nix the level multiplier)

Congrats at learning. Smiley
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

fliquid
Guest
« Reply #2 on: August 11, 2005, 04:36:07 AM »

Thanks, I tried to make one with multiple types of bees.
But I don't understand the if/then/or programming and randomisation well enough yet.

Can't find any good examples that are easy to understand.
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: August 11, 2005, 04:40:43 AM »

You could do it by cases. Smiley

Code:
switch (e_rand(1,10)){
   case 1:
      //one type of bee and stuff
      break;
   case 2:
      // another type of bee and stuff..
      break;
   // 8 more cases later.
   }
This type of programming is used throughout LotGD, such as salesman.php, stonehenge.php and many others.
« Last Edit: August 11, 2005, 04:41:22 AM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

fliquid
Guest
« Reply #4 on: August 11, 2005, 04:46:40 AM »

I've seen it, but I don't understand what the cases are and do.
I will play around with it, thanks again.
Logged
fliquid
Guest
« Reply #5 on: August 11, 2005, 04:57:45 AM »

You could do it by cases. Smiley

Code:
switch (e_rand(1,10)){
   case 1:
      //one type of bee and stuff
      break;
   case 2:
      // another type of bee and stuff..
      break;
   // 8 more cases later.
   }
This type of programming is used throughout LotGD, such as salesman.php, stonehenge.php and many others.

Those two you mentioned have been removed from my server because the players found them irritating. Do you know any others who have the case type coding?
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #6 on: August 11, 2005, 05:33:46 AM »

http://us2.php.net/manual/en/control-structures.switch.php

 fairy
lovers
outhouse
druid
fairydust
battlearena
temple
brothel
mercs
brother
deadcat
foundsnake
sleeping
smallgirl
solar
suddenstorm

All of those use switch(e_rand($var1,$var2)){
} Coding.

There are many, many, many more.
« Last Edit: August 11, 2005, 05:34:03 AM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3578


short, sweet and to the point


View Profile WWW
« Reply #7 on: August 11, 2005, 10:50:21 AM »

Those two you mentioned have been removed from my server because the players found them irritating. Do you know any others who have the case type coding?

are ye serious? t'would seem to me that if a player found a special to be detrimental it is their option to simply skip the opportunity to be aided or injured by it.

i personally despise stonehenge, will never go there as it seems to delight in sending me to shades, however i leave it on my server for others to use. the rewards that can be given far outweigh the bad and depriving other players who may enjoy the use of such a module simply because a few found it 'irritating' makes no sense.

ye say 'removed'? how could ye have removed core files? do ye mean 'deactivated'? if so, they still remain on thy server, but are not in a state to be seen by players.
« Last Edit: August 11, 2005, 10:50:50 AM by Elessa » Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #8 on: August 11, 2005, 10:54:38 AM »

Elessa, one can easily remove core files. I do it to clean up my Module Manager. If I didn't, I would see many mods that I don't like, nor need to have in there... it is just taking up space.

Ditto on Stonehenge.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
31 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search