RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.activity.randomevent.RandomEventHandler Class Reference

Static Public Member Functions

static void trigger (Player player)

Detailed Description

Definition at line 12 of file RandomEventHandler.java.

Member Function Documentation

◆ trigger()

void com.runehive.content.activity.randomevent.RandomEventHandler.trigger ( Player player)
static

Definition at line 14 of file RandomEventHandler.java.

14 {
15 if (Area.inWilderness(player))
16 return;
17 if (player.playerAssistant.busy())
18 return;
19 if (player.inActivity())
20 return;
21 if (!player.isVisible())
22 return;
23
24 int base = 200;
25
26 if (Utility.random(base) != 0)
27 return;
28
29 int events = RandomUtils.inclusive(1, 3);
30
31 switch (events) {
32 case 1: GenieEvent.create(player); break;
33 case 2: MimeEvent.create(player); break;
34 case 3: DrillDemonEvent.create(player); break;
35 }
36 }

References com.runehive.game.world.entity.mob.player.PlayerAssistant.busy(), com.runehive.content.activity.randomevent.impl.DrillDemonEvent.create(), com.runehive.content.activity.randomevent.impl.GenieEvent.create(), com.runehive.content.activity.randomevent.impl.MimeEvent.create(), com.runehive.game.world.entity.mob.Mob.inActivity(), com.runehive.util.RandomUtils.inclusive(), com.runehive.game.world.position.Area.inWilderness(), com.runehive.game.world.entity.Entity.isVisible(), com.runehive.game.world.entity.mob.player.Player.playerAssistant, and com.runehive.util.Utility.random().

Referenced by com.runehive.content.skill.impl.firemaking.Firemaking.bonfireAction(), com.runehive.content.skill.impl.woodcutting.WoodcuttingAction.chop(), com.runehive.content.skill.impl.herblore.Herblore.clickItem(), com.runehive.content.skill.impl.thieving.Thieving.clickNpc(), com.runehive.content.skill.impl.runecrafting.Runecraft.clickObject(), com.runehive.content.skill.impl.thieving.Thieving.clickObject(), com.runehive.content.skill.impl.cooking.Cooking.cook(), com.runehive.content.skill.impl.crafting.Crafting.craft(), com.runehive.content.skill.impl.runecrafting.Runecraft.craft(), com.runehive.content.skill.impl.hunter.net.Netting.execute(), com.runehive.content.skill.impl.magic.spell.impl.BonesToBananas.execute(), com.runehive.content.skill.impl.magic.spell.impl.HighAlchemy.execute(), com.runehive.content.skill.impl.magic.spell.impl.LowAlchemy.execute(), com.runehive.content.skill.impl.fishing.FishingAction.fish(), com.runehive.content.skill.impl.fletching.Fletching.fletch(), com.runehive.content.skill.impl.mining.MiningAction.mine(), com.runehive.content.skill.impl.herblore.Herblore.mix(), com.runehive.content.skill.impl.firemaking.FiremakingAction.onDestruct(), com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction.rewards(), com.runehive.content.skill.impl.prayer.BoneSacrifice.sacrifice(), and com.runehive.content.skill.impl.smithing.Smelting.smelt().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: