DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • July 22, 2019, 03:36:19 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: Call Random Forest Event  (Read 3302 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Mod God
Offline Offline

Posts: 4647

Be aware of the squirrel!

View Profile WWW
« on: February 06, 2005, 08:44:38 AM »

Hi, I want a module to start a random forest event.

I tried to use the following code from forest.php in my module:
if (module_events("forest", 100) != 0) {
   if (!checknavs()) {
      $session['user']['specialinc'] = "";
      $session['user']['specialmisc'] = "";            
      $op = "";
      httpset("op", "");
   } else {

But that only leads to a call of the last module (alphabetical). At least that works... But it seems, I cannot run another special event...

Any ideas?

Running for more than three years now:
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: February 06, 2005, 12:54:00 PM »

Try this:
$sql = "SELECT modulename FROM ".db_prefix("module_event_hooks")." WHERE event_type='forest' ORDER BY RAND(".e_rand().") LIMIT 1";
That should select one at random, and then you can alter the person specialinc to be:
Then it should dump them in the right module.... I think ^_^
« Last Edit: February 06, 2005, 12:57:42 PM by Sichae » Logged

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

Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

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