Repository reorganisation
Unified kotlin and java into just src/main Unified the rs09 and core packages Took all content out of the core package, and placed it into the new content package Reorganised all source code relating to content to be easier to find and explore
This commit is contained in:
+6
-5
@@ -5,7 +5,7 @@
|
|||||||
<artifactId>server</artifactId>
|
<artifactId>server</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<properties>
|
<properties>
|
||||||
<project.mainClassName>rs09.Server</project.mainClassName>
|
<project.mainClassName>core.Server</project.mainClassName>
|
||||||
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
|
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
|
||||||
<kotlin.version>1.6.21</kotlin.version>
|
<kotlin.version>1.6.21</kotlin.version>
|
||||||
<kotlin.comipler.jvmTarget>1.6</kotlin.comipler.jvmTarget>
|
<kotlin.comipler.jvmTarget>1.6</kotlin.comipler.jvmTarget>
|
||||||
@@ -93,6 +93,8 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
<sourceDirectory>src/main</sourceDirectory>
|
||||||
|
<testSourceDirectory>src/test</testSourceDirectory>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
||||||
<!-- Installs our local dependencies (const/extension libraries) to a local maven repo) -->
|
<!-- Installs our local dependencies (const/extension libraries) to a local maven repo) -->
|
||||||
@@ -173,8 +175,7 @@
|
|||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sourceDirs>
|
<sourceDirs>
|
||||||
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
|
<sourceDir>${project.basedir}/src/main</sourceDir>
|
||||||
<sourceDir>${project.basedir}/src/main/java</sourceDir>
|
|
||||||
</sourceDirs>
|
</sourceDirs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
@@ -258,7 +259,7 @@
|
|||||||
<artifactId>exec-maven-plugin</artifactId>
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
<version>1.2.1</version>
|
<version>1.2.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<mainClass>rs09.Server</mainClass>
|
<mainClass>core.Server</mainClass>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -278,7 +279,7 @@
|
|||||||
classname="io.gitlab.arturbosch.detekt.cli.Main"
|
classname="io.gitlab.arturbosch.detekt.cli.Main"
|
||||||
classpathref="maven.plugin.classpath">
|
classpathref="maven.plugin.classpath">
|
||||||
<arg value="--input"/>
|
<arg value="--input"/>
|
||||||
<arg value="${basedir}/src/main/kotlin"/>
|
<arg value="${basedir}/src/main"/>
|
||||||
<arg value="--excludes"/>
|
<arg value="--excludes"/>
|
||||||
<arg value="**/special/package/internal/**"/>
|
<arg value="**/special/package/internal/**"/>
|
||||||
<arg value="--report"/>
|
<arg value="--report"/>
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
||||||
+8
-9
@@ -1,8 +1,9 @@
|
|||||||
package rs09.game.content.global
|
package content.data
|
||||||
|
|
||||||
import api.*
|
import content.global.skill.magic.TeleportMethod
|
||||||
import api.events.TeleportEvent
|
import content.global.skill.slayer.SlayerManager.Companion.getInstance
|
||||||
import core.game.content.dialogue.FacialExpression
|
import core.api.*
|
||||||
|
import core.game.event.TeleportEvent
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.player.link.TeleportManager
|
import core.game.node.entity.player.link.TeleportManager
|
||||||
import core.game.node.entity.player.link.audio.Audio
|
import core.game.node.entity.player.link.audio.Audio
|
||||||
@@ -12,9 +13,7 @@ import core.game.world.map.Location
|
|||||||
import core.game.world.update.flag.context.Animation
|
import core.game.world.update.flag.context.Animation
|
||||||
import core.game.world.update.flag.context.Graphics
|
import core.game.world.update.flag.context.Graphics
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.game.node.entity.skill.magic.TeleportMethod
|
import core.game.world.GameWorld.Pulser
|
||||||
import rs09.game.node.entity.skill.slayer.SlayerManager.Companion.getInstance
|
|
||||||
import rs09.game.world.GameWorld.Pulser
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -275,12 +274,12 @@ enum class EnchantedJewellery(
|
|||||||
val slayerManager = getInstance(player)
|
val slayerManager = getInstance(player)
|
||||||
if (!slayerManager.hasTask()) {
|
if (!slayerManager.hasTask()) {
|
||||||
sendNPCDialogue(player, slayerManager.master!!.npc, "You need something new to hunt. Come and " +
|
sendNPCDialogue(player, slayerManager.master!!.npc, "You need something new to hunt. Come and " +
|
||||||
"see me When you can and I'll give you a new task.", FacialExpression.HALF_GUILTY)
|
"see me When you can and I'll give you a new task.", core.game.dialogue.FacialExpression.HALF_GUILTY)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sendNPCDialogue(player, slayerManager.master!!.npc, "You're currently " +
|
sendNPCDialogue(player, slayerManager.master!!.npc, "You're currently " +
|
||||||
"assigned to kill ${getSlayerTaskName(player).lowercase(Locale.getDefault())}'s; " +
|
"assigned to kill ${getSlayerTaskName(player).lowercase(Locale.getDefault())}'s; " +
|
||||||
"only ${getSlayerTaskKillsRemaining(player)} more to go.", FacialExpression.FRIENDLY)
|
"only ${getSlayerTaskKillsRemaining(player)} more to go.", core.game.dialogue.FacialExpression.FRIENDLY)
|
||||||
// Slayer tracker UI
|
// Slayer tracker UI
|
||||||
setVarbit(player, 2502, 0, slayerManager.flags.taskFlags shr 4)
|
setVarbit(player, 2502, 0, slayerManager.flags.taskFlags shr 4)
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
+3
-3
@@ -1,13 +1,13 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.content.dialogue.DialogueAction;
|
import core.game.dialogue.DialogueAction;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.GroundItem;
|
import core.game.node.item.GroundItem;
|
||||||
import core.game.node.item.GroundItemManager;
|
import core.game.node.item.GroundItemManager;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.scenery.Scenery;
|
import core.game.node.scenery.Scenery;
|
||||||
import core.game.system.task.Pulse;
|
import core.game.system.task.Pulse;
|
||||||
import rs09.game.world.GameWorld;
|
import core.game.world.GameWorld;
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
import core.tools.StringUtils;
|
import core.tools.StringUtils;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
+1
-3
@@ -1,6 +1,4 @@
|
|||||||
package core.game.content.global
|
package content.data
|
||||||
|
|
||||||
import java.util.ArrayList
|
|
||||||
|
|
||||||
enum class MeatState {
|
enum class MeatState {
|
||||||
INEDIBLE_RAW,
|
INEDIBLE_RAW,
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data;
|
||||||
|
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
|
|
||||||
+4
-4
@@ -1,13 +1,13 @@
|
|||||||
package core.game.content.consumable;
|
package content.data.consumables;
|
||||||
|
|
||||||
|
import content.data.consumables.effects.*;
|
||||||
|
import core.game.consumable.*;
|
||||||
import org.rs09.consts.Items;
|
import org.rs09.consts.Items;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
import core.game.node.entity.player.link.diary.DiaryType;
|
||||||
import core.game.node.entity.state.EntityState;
|
import core.game.node.entity.state.EntityState;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
import core.game.content.consumable.effects.*;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import rs09.game.content.consumable.effects.KegOfBeerEffect;
|
import content.data.consumables.effects.KegOfBeerEffect;
|
||||||
import rs09.game.content.consumable.effects.RestoreSummoningSpecial;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.player.link.diary.DiaryType;
|
import core.game.node.entity.player.link.diary.DiaryType;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
import core.game.consumable.ConsumableEffect;
|
||||||
|
|
||||||
public class AchievementEffect extends ConsumableEffect {
|
public class AchievementEffect extends ConsumableEffect {
|
||||||
private final DiaryType diary;
|
private final DiaryType diary;
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.combat.ImpactHandler;
|
import core.game.node.entity.combat.ImpactHandler;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class DamageEffect extends ConsumableEffect {
|
public class DamageEffect extends ConsumableEffect {
|
||||||
final double amt;
|
final double amt;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class DraynorCabbageEffect extends ConsumableEffect {
|
public class DraynorCabbageEffect extends ConsumableEffect {
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class DwarvenRockCakeEffect extends ConsumableEffect {
|
public class DwarvenRockCakeEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class EnergyEffect extends ConsumableEffect {
|
public class EnergyEffect extends ConsumableEffect {
|
||||||
double amt;
|
double amt;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
import core.game.consumable.ConsumableEffect;
|
||||||
|
|
||||||
public class HealingEffect extends ConsumableEffect {
|
public class HealingEffect extends ConsumableEffect {
|
||||||
int amt;
|
int amt;
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+2
-5
@@ -1,9 +1,6 @@
|
|||||||
package rs09.game.content.consumable.effects
|
package content.data.consumables.effects
|
||||||
|
|
||||||
import core.game.content.consumable.ConsumableEffect
|
import core.game.consumable.ConsumableEffect
|
||||||
import core.game.content.consumable.effects.HealingEffect
|
|
||||||
import core.game.content.consumable.effects.MultiEffect
|
|
||||||
import core.game.content.consumable.effects.SkillEffect
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class MatureWmbEffect extends ConsumableEffect {
|
public class MatureWmbEffect extends ConsumableEffect {
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class MultiEffect extends ConsumableEffect {
|
public class MultiEffect extends ConsumableEffect {
|
||||||
private ConsumableEffect[] effects;
|
private ConsumableEffect[] effects;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class NettleTeaEffect extends ConsumableEffect {
|
public class NettleTeaEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class PercentHeal extends ConsumableEffect {
|
public class PercentHeal extends ConsumableEffect {
|
||||||
int base = 0;
|
int base = 0;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
import core.game.consumable.ConsumableEffect;
|
||||||
|
|
||||||
public class PercentageHealthEffect extends ConsumableEffect {
|
public class PercentageHealthEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.combat.ImpactHandler;
|
import core.game.node.entity.combat.ImpactHandler;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class PoisonEffect extends ConsumableEffect {
|
public class PoisonEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class PoisonKarambwanEffect extends ConsumableEffect {
|
public class PoisonKarambwanEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class PrayerEffect extends ConsumableEffect {
|
public class PrayerEffect extends ConsumableEffect {
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class RandomEnergyEffect extends ConsumableEffect {
|
public class RandomEnergyEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class RandomHealthEffect extends ConsumableEffect {
|
public class RandomHealthEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
import core.game.consumable.ConsumableEffect;
|
||||||
|
|
||||||
public class RandomPrayerEffect extends ConsumableEffect {
|
public class RandomPrayerEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class RandomSkillEffect extends ConsumableEffect {
|
public class RandomSkillEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.state.EntityState;
|
import core.game.node.entity.state.EntityState;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class RemoveStateEffect extends ConsumableEffect {
|
public class RemoveStateEffect extends ConsumableEffect {
|
||||||
int state = -1;
|
int state = -1;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class RestoreEffect extends ConsumableEffect {
|
public class RestoreEffect extends ConsumableEffect {
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package rs09.game.content.consumable.effects
|
package content.data.consumables.effects
|
||||||
|
|
||||||
import core.game.content.consumable.ConsumableEffect
|
import core.game.consumable.ConsumableEffect
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
|
|
||||||
class RestoreSummoningSpecial : ConsumableEffect(){
|
class RestoreSummoningSpecial : ConsumableEffect(){
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class RockCakeEffect extends ConsumableEffect {
|
public class RockCakeEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import rs09.game.world.GameWorld;
|
import core.game.world.GameWorld;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class SetAttributeEffect extends ConsumableEffect {
|
public class SetAttributeEffect extends ConsumableEffect {
|
||||||
String attrString;
|
String attrString;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class SkillEffect extends ConsumableEffect {
|
public class SkillEffect extends ConsumableEffect {
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* According to the OSRS wiki, the smelling ugthanki kebab will usually heal nothing when eaten, but sometimes heals for 9.
|
* According to the OSRS wiki, the smelling ugthanki kebab will usually heal nothing when eaten, but sometimes heals for 9.
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class SummoningEffect extends ConsumableEffect {
|
public class SummoningEffect extends ConsumableEffect {
|
||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
|
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.system.task.Pulse;
|
import core.game.system.task.Pulse;
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class TroubleBrewingRumEffect extends ConsumableEffect {
|
public class TroubleBrewingRumEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
|
|
||||||
public class UgthankiKebabEffect extends ConsumableEffect {
|
public class UgthankiKebabEffect extends ConsumableEffect {
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.consumable.effects;
|
package content.data.consumables.effects;
|
||||||
|
|
||||||
|
import core.game.consumable.ConsumableEffect;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.content.consumable.ConsumableEffect;
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
|
|
||||||
public class WizardsMindBombEffect extends ConsumableEffect {
|
public class WizardsMindBombEffect extends ConsumableEffect {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data.skill;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the skillcape perks.
|
* Handles the skillcape perks.
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package core.game.content.global;
|
package content.data.skill;
|
||||||
|
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import rs09.game.world.repository.Repository;
|
import core.game.world.repository.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the skilling pets obtained randomly.
|
* Represents the skilling pets obtained randomly.
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.node.entity.skill.gather;
|
package content.data.skill;
|
||||||
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.skill.Skills;
|
import core.game.node.entity.skill.Skills;
|
||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the allotment seed drop table.
|
* Handles the allotment seed drop table.
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global;
|
package content.data.tables;
|
||||||
|
|
||||||
import org.rs09.consts.Items;
|
import org.rs09.consts.Items;
|
||||||
import core.game.node.entity.npc.drop.NPCDropTables;
|
import core.game.node.entity.npc.drop.NPCDropTables;
|
||||||
+5
-5
@@ -1,10 +1,10 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the Chaos Elemental's minor drop table. It is supposed to roll this table alongside its standard major drops on the main table.
|
* Handles the Chaos Elemental's minor drop table. It is supposed to roll this table alongside its standard major drops on the main table.
|
||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the gem drop table.
|
* Handles the gem drop table.
|
||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the herb drop table.
|
* Handles the herb drop table.
|
||||||
+5
-5
@@ -1,10 +1,10 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the rare drop table.
|
* Handles the rare drop table.
|
||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the rare seed drop table.
|
* Handles the rare seed drop table.
|
||||||
+5
-5
@@ -1,6 +1,6 @@
|
|||||||
package core.game.node.entity.npc.drop;
|
package content.data.tables;
|
||||||
|
|
||||||
import api.StartupListener;
|
import core.api.StartupListener;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
import core.game.node.item.WeightedChanceItem;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
@@ -8,8 +8,8 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
import rs09.ServerConstants;
|
import core.ServerConstants;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
|
|
||||||
import javax.xml.parsers.DocumentBuilder;
|
import javax.xml.parsers.DocumentBuilder;
|
||||||
import javax.xml.parsers.DocumentBuilderFactory;
|
import javax.xml.parsers.DocumentBuilderFactory;
|
||||||
@@ -18,7 +18,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rs09.game.system.SystemLogger.logInfo;
|
import static core.tools.SystemLogger.logInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the uncommon seed drop table.
|
* Handles the uncommon seed drop table.
|
||||||
+14
-14
@@ -1,23 +1,23 @@
|
|||||||
package rs09.game.content.jobs
|
package content.global.activity.jobs
|
||||||
|
|
||||||
import api.*
|
import core.api.*
|
||||||
import rs09.game.content.jobs.impl.GatheringJobs
|
import content.global.activity.jobs.impl.GatheringJobs
|
||||||
import rs09.game.content.jobs.impl.SlayingJobs
|
import content.global.activity.jobs.impl.SlayingJobs
|
||||||
import core.game.content.dialogue.FacialExpression
|
import core.game.dialogue.FacialExpression
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import core.game.dialogue.DialogueFile
|
||||||
import rs09.game.content.dialogue.Topic
|
import core.game.dialogue.Topic
|
||||||
import rs09.tools.END_DIALOGUE
|
import core.tools.END_DIALOGUE
|
||||||
import rs09.tools.START_DIALOGUE
|
import core.tools.START_DIALOGUE
|
||||||
|
|
||||||
class CancelJobDialogueFile : DialogueFile() {
|
class CancelJobDialogueFile : DialogueFile() {
|
||||||
override fun handle(componentID: Int, buttonID: Int) {
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
when (stage) {
|
when (stage) {
|
||||||
START_DIALOGUE -> showTopics(
|
START_DIALOGUE -> showTopics(
|
||||||
Topic(FacialExpression.HALF_ASKING, "How am I doing on my job?", 1),
|
Topic(core.game.dialogue.FacialExpression.HALF_ASKING, "How am I doing on my job?", 1),
|
||||||
Topic(FacialExpression.HALF_GUILTY, "I'd like to cancel my job.", 10)
|
Topic(core.game.dialogue.FacialExpression.HALF_GUILTY, "I'd like to cancel my job.", 10)
|
||||||
)
|
)
|
||||||
|
|
||||||
1 -> {
|
1 -> {
|
||||||
@@ -49,8 +49,8 @@ class CancelJobDialogueFile : DialogueFile() {
|
|||||||
.also { stage++ }
|
.also { stage++ }
|
||||||
|
|
||||||
11 -> showTopics(
|
11 -> showTopics(
|
||||||
Topic(FacialExpression.HAPPY, "Yes, please.", 20),
|
Topic(core.game.dialogue.FacialExpression.HAPPY, "Yes, please.", 20),
|
||||||
Topic(FacialExpression.NEUTRAL, "No, thanks.", 30)
|
Topic(core.game.dialogue.FacialExpression.NEUTRAL, "No, thanks.", 30)
|
||||||
)
|
)
|
||||||
|
|
||||||
20 -> npc("Alright then, hand over the money.")
|
20 -> npc("Alright then, hand over the money.")
|
||||||
@@ -68,7 +68,7 @@ class CancelJobDialogueFile : DialogueFile() {
|
|||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
} else {
|
} else {
|
||||||
player(
|
player(
|
||||||
FacialExpression.HALF_WORRIED,
|
core.game.dialogue.FacialExpression.HALF_WORRIED,
|
||||||
"Oh, I don't seem to have the money..."
|
"Oh, I don't seem to have the money..."
|
||||||
).also { stage++ }
|
).also { stage++ }
|
||||||
}
|
}
|
||||||
+6
-6
@@ -1,15 +1,15 @@
|
|||||||
package rs09.game.content.jobs
|
package content.global.activity.jobs
|
||||||
|
|
||||||
import api.*
|
import core.api.*
|
||||||
import rs09.game.content.jobs.impl.GatheringJobs
|
import content.global.activity.jobs.impl.GatheringJobs
|
||||||
import rs09.game.content.jobs.impl.SlayingJobs
|
import content.global.activity.jobs.impl.SlayingJobs
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.ServerStore
|
import core.ServerStore
|
||||||
import rs09.ServerStore.Companion.getInt
|
import core.ServerStore.Companion.getInt
|
||||||
|
|
||||||
object JobManager {
|
object JobManager {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package rs09.game.content.jobs
|
package content.global.activity.jobs
|
||||||
|
|
||||||
enum class JobType {
|
enum class JobType {
|
||||||
GATHERING,
|
GATHERING,
|
||||||
+12
-13
@@ -1,22 +1,21 @@
|
|||||||
package rs09.game.content.jobs
|
package content.global.activity.jobs
|
||||||
|
|
||||||
import rs09.game.content.jobs.impl.GatheringJobs
|
import content.global.activity.jobs.impl.GatheringJobs
|
||||||
import rs09.game.content.jobs.impl.SlayingJobs
|
import content.global.activity.jobs.impl.SlayingJobs
|
||||||
import api.*
|
import core.api.*
|
||||||
import api.events.EventHook
|
import core.game.event.EventHook
|
||||||
import api.events.JobAssignmentEvent
|
import core.game.event.JobAssignmentEvent
|
||||||
import api.events.NPCKillEvent
|
import core.game.event.NPCKillEvent
|
||||||
import core.game.content.dialogue.FacialExpression
|
|
||||||
import core.game.node.entity.Entity
|
import core.game.node.entity.Entity
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.ServerStore.Companion.getInt
|
import core.ServerStore.Companion.getInt
|
||||||
import rs09.game.Event
|
import core.api.Event
|
||||||
import rs09.game.interaction.InteractionListener
|
import core.game.interaction.InteractionListener
|
||||||
import rs09.game.interaction.IntType
|
import core.game.interaction.IntType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the work-for actions for the NPCs
|
* Handles the work-for actions for the NPCs
|
||||||
@@ -143,7 +142,7 @@ class WorkForInteractionListener : InteractionListener, LoginListener {
|
|||||||
player,
|
player,
|
||||||
node.id,
|
node.id,
|
||||||
"I'm sorry, I don't currently have any jobs that you're qualified for.",
|
"I'm sorry, I don't currently have any jobs that you're qualified for.",
|
||||||
FacialExpression.HALF_THINKING
|
core.game.dialogue.FacialExpression.HALF_THINKING
|
||||||
)
|
)
|
||||||
return@on true
|
return@on true
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package rs09.game.content.jobs.impl
|
package content.global.activity.jobs.impl
|
||||||
|
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package rs09.game.content.jobs.impl
|
package content.global.activity.jobs.impl
|
||||||
|
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
|
|
||||||
+6
-9
@@ -1,21 +1,18 @@
|
|||||||
package rs09.game.content.global.worldevents.penguinhns
|
package content.global.activity.penguinhns
|
||||||
|
|
||||||
import api.*
|
import core.api.*
|
||||||
import core.game.component.Component
|
import core.game.component.Component
|
||||||
import core.game.content.dialogue.DialoguePlugin
|
|
||||||
import core.game.content.dialogue.FacialExpression
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import rs09.game.world.GameWorld
|
import core.tools.END_DIALOGUE
|
||||||
import rs09.tools.END_DIALOGUE
|
|
||||||
|
|
||||||
class LarryHandler(player: Player? = null) : DialoguePlugin(player){
|
class LarryHandler(player: Player? = null) : core.game.dialogue.DialoguePlugin(player){
|
||||||
override fun open(vararg args: Any?): Boolean {
|
override fun open(vararg args: Any?): Boolean {
|
||||||
options("Can I have a spy notebook?","Can I have a hint?","I'd like to turn in my points.").also { stage = 0; return true }
|
options("Can I have a spy notebook?","Can I have a hint?","I'd like to turn in my points.").also { stage = 0; return true }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun newInstance(player: Player?): DialoguePlugin {
|
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
||||||
return LarryHandler(player)
|
return LarryHandler(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +40,7 @@ class LarryHandler(player: Player? = null) : DialoguePlugin(player){
|
|||||||
|
|
||||||
11 -> {
|
11 -> {
|
||||||
val hint = Penguin.values()[PenguinManager.penguins.random()].hint
|
val hint = Penguin.values()[PenguinManager.penguins.random()].hint
|
||||||
npcl(FacialExpression.FRIENDLY, "One is $hint")
|
npcl(core.game.dialogue.FacialExpression.FRIENDLY, "One is $hint")
|
||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
}
|
}
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package rs09.game.content.global.worldevents.penguinhns
|
package content.global.activity.penguinhns
|
||||||
|
|
||||||
import core.cache.def.impl.ItemDefinition
|
import core.cache.def.impl.ItemDefinition
|
||||||
import core.game.interaction.OptionHandler
|
import core.game.interaction.OptionHandler
|
||||||
+5
-7
@@ -1,12 +1,10 @@
|
|||||||
package rs09.game.content.global.worldevents.penguinhns
|
package content.global.activity.penguinhns
|
||||||
|
|
||||||
import core.game.system.task.Pulse
|
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import rs09.ServerStore
|
import core.ServerStore
|
||||||
import rs09.game.content.global.worldevents.PluginSet
|
import core.game.worldevents.PluginSet
|
||||||
import rs09.game.content.global.worldevents.WorldEvent
|
import core.game.worldevents.WorldEvent
|
||||||
import rs09.game.content.global.worldevents.WorldEvents
|
import core.game.world.GameWorld
|
||||||
import rs09.game.world.GameWorld
|
|
||||||
|
|
||||||
class PenguinHNSEvent : WorldEvent("penguin-hns"){
|
class PenguinHNSEvent : WorldEvent("penguin-hns"){
|
||||||
val manager = PenguinManager()
|
val manager = PenguinManager()
|
||||||
+3
-3
@@ -1,12 +1,12 @@
|
|||||||
package rs09.game.content.global.worldevents.penguinhns
|
package content.global.activity.penguinhns
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import rs09.game.system.SystemLogger
|
import core.tools.SystemLogger
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
import org.json.simple.JSONArray
|
import org.json.simple.JSONArray
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import rs09.ServerStore.Companion.toJSONArray
|
import core.ServerStore.Companion.toJSONArray
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class PenguinManager{
|
class PenguinManager{
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
package rs09.game.content.global.worldevents.penguinhns
|
package content.global.activity.penguinhns
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.game.content.global.worldevents.WorldEvents
|
import core.game.worldevents.WorldEvents
|
||||||
|
|
||||||
class PenguinSpawner {
|
class PenguinSpawner {
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ class PenguinSpawner {
|
|||||||
availableOrdinals.remove(peng.ordinal)
|
availableOrdinals.remove(peng.ordinal)
|
||||||
spawnedOrdinals.add(peng.ordinal)
|
spawnedOrdinals.add(peng.ordinal)
|
||||||
NPC(peng.id,peng.location)
|
NPC(peng.id,peng.location)
|
||||||
.also {PenguinManager.npcs.add(it);it.isNeverWalks = true; it.isWalks = false}.init()
|
.also { PenguinManager.npcs.add(it);it.isNeverWalks = true; it.isWalks = false}.init()
|
||||||
counter++
|
counter++
|
||||||
}
|
}
|
||||||
return spawnedOrdinals
|
return spawnedOrdinals
|
||||||
+6
-12
@@ -1,23 +1,17 @@
|
|||||||
package rs09.game.content.global.worldevents.penguinhns
|
package content.global.activity.penguinhns
|
||||||
|
|
||||||
import core.game.interaction.DestinationFlag
|
|
||||||
import core.game.interaction.MovementPulse
|
|
||||||
import core.game.interaction.Option
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import rs09.game.world.GameWorld
|
import core.game.world.GameWorld
|
||||||
import core.game.world.update.flag.context.Animation
|
import core.game.world.update.flag.context.Animation
|
||||||
import core.plugin.Plugin
|
import core.game.interaction.InteractionListener
|
||||||
import core.game.content.quest.PluginInteraction
|
import core.game.interaction.IntType
|
||||||
import core.game.content.quest.PluginInteractionManager
|
|
||||||
import rs09.game.interaction.InteractionListener
|
|
||||||
import rs09.game.interaction.IntType
|
|
||||||
|
|
||||||
class PenguinSpyingHandler : InteractionListener{
|
class PenguinSpyingHandler : InteractionListener {
|
||||||
|
|
||||||
override fun defineListeners() {
|
override fun defineListeners() {
|
||||||
on(PENGUINS, IntType.NPC, "spy-on"){player, node ->
|
on(PENGUINS, IntType.NPC, "spy-on"){ player, node ->
|
||||||
val npc = node.asNpc()
|
val npc = node.asNpc()
|
||||||
if(PenguinManager.hasTagged(player, npc.location)){
|
if(PenguinManager.hasTagged(player, npc.location)){
|
||||||
player.sendMessage("You've already tagged this penguin.")
|
player.sendMessage("You've already tagged this penguin.")
|
||||||
+7
-7
@@ -1,16 +1,16 @@
|
|||||||
package rs09.game.content.global.worldevents.shootingstar
|
package content.global.activity.shootingstar
|
||||||
|
|
||||||
import core.game.node.scenery.Scenery
|
import core.game.node.scenery.Scenery
|
||||||
import core.game.node.scenery.SceneryBuilder
|
import core.game.node.scenery.SceneryBuilder
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.world.map.Location
|
import core.game.world.map.Location
|
||||||
import rs09.ServerStore.Companion.getBoolean
|
import core.ServerStore.Companion.getBoolean
|
||||||
import rs09.ServerStore.Companion.getInt
|
import core.ServerStore.Companion.getInt
|
||||||
import rs09.ServerStore.Companion.getString
|
import core.ServerStore.Companion.getString
|
||||||
|
|
||||||
import rs09.game.ai.general.scriptrepository.ShootingStarBot
|
import content.global.bots.ShootingStarBot
|
||||||
import rs09.game.world.repository.Repository
|
import core.game.world.repository.Repository
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a shooting star object (Only ever initialized once) (ideally)
|
* Represents a shooting star object (Only ever initialized once) (ideally)
|
||||||
@@ -101,7 +101,7 @@ class ShootingStar(var level: ShootingStarType = ShootingStarType.values().rando
|
|||||||
starObject = newStar
|
starObject = newStar
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getNextType(): ShootingStarType{
|
private fun getNextType(): ShootingStarType {
|
||||||
return ShootingStarType.values()[level.ordinal - 1]
|
return ShootingStarType.values()[level.ordinal - 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
+6
-6
@@ -1,17 +1,17 @@
|
|||||||
package rs09.game.content.global.worldevents.shootingstar
|
package content.global.activity.shootingstar
|
||||||
|
|
||||||
import api.*
|
import core.api.*
|
||||||
import core.game.node.scenery.Scenery
|
import core.game.node.scenery.Scenery
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.skill.SkillPulse
|
import core.game.node.entity.skill.SkillPulse
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
import core.game.node.entity.skill.gather.SkillingTool
|
import content.data.skill.SkillingTool
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.game.world.GameWorld
|
import core.game.world.GameWorld
|
||||||
import rs09.game.world.repository.Repository
|
import core.game.world.repository.Repository
|
||||||
import rs09.tools.stringtools.colorize
|
import core.tools.colorize
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The pulse used to handle mining shooting stars.
|
* The pulse used to handle mining shooting stars.
|
||||||
+12
-12
@@ -1,21 +1,21 @@
|
|||||||
package rs09.game.content.global.worldevents.shootingstar
|
package content.global.activity.shootingstar
|
||||||
|
|
||||||
import api.*
|
import core.api.*
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.entity.player.link.TeleportManager
|
import core.game.node.entity.player.link.TeleportManager
|
||||||
import core.game.node.entity.skill.Skills
|
import core.game.node.entity.skill.Skills
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import org.rs09.consts.Scenery
|
import org.rs09.consts.Scenery
|
||||||
import rs09.ServerStore
|
import core.ServerStore
|
||||||
import rs09.ServerStore.Companion.getBoolean
|
import core.ServerStore.Companion.getBoolean
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import core.game.dialogue.DialogueFile
|
||||||
import rs09.game.interaction.InteractionListener
|
import core.game.interaction.InteractionListener
|
||||||
import rs09.game.interaction.IntType
|
import core.game.interaction.IntType
|
||||||
import rs09.game.system.SystemLogger
|
import core.tools.SystemLogger
|
||||||
import rs09.game.system.command.Privilege
|
import core.game.system.command.Privilege
|
||||||
import rs09.game.world.GameWorld
|
import core.game.world.GameWorld
|
||||||
import rs09.tools.secondsToTicks
|
import core.tools.secondsToTicks
|
||||||
|
|
||||||
class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener {
|
class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Commands, StartupListener {
|
||||||
override fun login(player: Player) {
|
override fun login(player: Player) {
|
||||||
@@ -59,7 +59,7 @@ class ShootingStarPlugin : LoginListener, InteractionListener, TickListener, Com
|
|||||||
return@on true
|
return@on true
|
||||||
}
|
}
|
||||||
|
|
||||||
on(RING, IntType.ITEM, "rub", "operate"){player, node ->
|
on(RING, IntType.ITEM, "rub", "operate"){ player, node ->
|
||||||
if(getRingStoreFile().getBoolean(player.username.toLowerCase())){
|
if(getRingStoreFile().getBoolean(player.username.toLowerCase())){
|
||||||
sendDialogue(player, "The ring is still recharging.")
|
sendDialogue(player, "The ring is still recharging.")
|
||||||
return@on true
|
return@on true
|
||||||
+4
-4
@@ -1,10 +1,10 @@
|
|||||||
package rs09.game.node.entity.state.newsys.states
|
package content.global.activity.shootingstar
|
||||||
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import rs09.game.node.entity.state.newsys.PlayerState
|
import core.game.node.entity.state.PlayerState
|
||||||
import rs09.game.node.entity.state.newsys.State
|
import core.game.node.entity.state.State
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import rs09.tools.ticksToSeconds
|
import core.tools.ticksToSeconds
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
|
|
||||||
@PlayerState("shooting-star")
|
@PlayerState("shooting-star")
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.global.worldevents.shootingstar;
|
package content.global.activity.shootingstar;
|
||||||
|
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
import core.cache.def.impl.SceneryDefinition;
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
@@ -8,7 +8,7 @@ import core.game.interaction.OptionHandler;
|
|||||||
import core.game.node.Node;
|
import core.game.node.Node;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
import rs09.plugin.ClassScanner;
|
import core.plugin.ClassScanner;
|
||||||
import core.plugin.PluginManifest;
|
import core.plugin.PluginManifest;
|
||||||
|
|
||||||
@PluginManifest(name="ShootingStars")
|
@PluginManifest(name="ShootingStars")
|
||||||
+31
-34
@@ -1,9 +1,7 @@
|
|||||||
package rs09.game.content.global.worldevents.shootingstar
|
package content.global.activity.shootingstar
|
||||||
|
|
||||||
import api.Container
|
import core.api.Container
|
||||||
import api.*
|
import core.api.*
|
||||||
import core.game.content.dialogue.DialoguePlugin
|
|
||||||
import core.game.content.dialogue.FacialExpression
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
@@ -11,19 +9,18 @@ import core.plugin.Initializable
|
|||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.ServerStore
|
import core.ServerStore
|
||||||
import rs09.ServerStore.Companion.getBoolean
|
import core.ServerStore.Companion.getBoolean
|
||||||
import rs09.game.node.entity.state.newsys.states.ShootingStarState
|
import core.tools.END_DIALOGUE
|
||||||
import rs09.tools.END_DIALOGUE
|
import core.tools.secondsToTicks
|
||||||
import rs09.tools.secondsToTicks
|
import core.tools.colorize
|
||||||
import rs09.tools.stringtools.colorize
|
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dialogue for the star sprite.
|
* Dialogue for the star sprite.
|
||||||
*/
|
*/
|
||||||
@Initializable
|
@Initializable
|
||||||
class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
|
class StarSpriteDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cosmic rune item id.
|
* The cosmic rune item id.
|
||||||
@@ -60,17 +57,17 @@ class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun newInstance(player: Player?): DialoguePlugin? {
|
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin? {
|
||||||
return StarSpriteDialogue(player)
|
return StarSpriteDialogue(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun open(vararg args: Any): Boolean {
|
override fun open(vararg args: Any): Boolean {
|
||||||
npc = args[0] as NPC
|
npc = args[0] as NPC
|
||||||
if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && !getAttribute(player, "star-ring:bp-shown", false)) {
|
if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && !getAttribute(player, "star-ring:bp-shown", false)) {
|
||||||
npcl(FacialExpression.NEUTRAL, "I see you got ahold of a blueprint of those silly old rings we used to make.")
|
npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I see you got ahold of a blueprint of those silly old rings we used to make.")
|
||||||
stage = 1000
|
stage = 1000
|
||||||
} else if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && getAttribute(player, "star-ring:bp-shown", false)) {
|
} else if (inInventory(player, Items.ANCIENT_BLUEPRINT_14651) && getAttribute(player, "star-ring:bp-shown", false)) {
|
||||||
playerl(FacialExpression.HALF_ASKING, "So about those rings...")
|
playerl(core.game.dialogue.FacialExpression.HALF_ASKING, "So about those rings...")
|
||||||
stage = 2000
|
stage = 2000
|
||||||
} else if (getStoreFile().getBoolean(player.username.toLowerCase()) || !player.getInventory().contains(ShootingStarPlugin.STAR_DUST, 1)) {
|
} else if (getStoreFile().getBoolean(player.username.toLowerCase()) || !player.getInventory().contains(ShootingStarPlugin.STAR_DUST, 1)) {
|
||||||
npc("Hello, strange creature.")
|
npc("Hello, strange creature.")
|
||||||
@@ -226,36 +223,36 @@ class StarSpriteDialogue(player: Player? = null) : DialoguePlugin(player) {
|
|||||||
52 -> end()
|
52 -> end()
|
||||||
|
|
||||||
//Inauthentic ring-based dialogue
|
//Inauthentic ring-based dialogue
|
||||||
1000 -> playerl(FacialExpression.ASKING, "Oh, you mean this?").also { stage++ }
|
1000 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Oh, you mean this?").also { stage++ }
|
||||||
1001 -> player.dialogueInterpreter.sendItemMessage(Items.ANCIENT_BLUEPRINT_14651, "You show the blueprint to the Star Sprite.").also { stage++ }
|
1001 -> player.dialogueInterpreter.sendItemMessage(Items.ANCIENT_BLUEPRINT_14651, "You show the blueprint to the Star Sprite.").also { stage++ }
|
||||||
1002 -> npcl(FacialExpression.ASKING, "Yeah, that's the one, alright!").also { stage++ }
|
1002 -> npcl(core.game.dialogue.FacialExpression.ASKING, "Yeah, that's the one, alright!").also { stage++ }
|
||||||
1003 -> npcl(FacialExpression.NEUTRAL, "I'll tell you what.. if you can get ahold of the resources needed to make one, I'm sure me or one of my kin would craft it for you.").also { stage++ }
|
1003 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I'll tell you what.. if you can get ahold of the resources needed to make one, I'm sure me or one of my kin would craft it for you.").also { stage++ }
|
||||||
1004 -> playerl(FacialExpression.ASKING, "You'd just do that for me? For free?").also { stage++ }
|
1004 -> playerl(core.game.dialogue.FacialExpression.ASKING, "You'd just do that for me? For free?").also { stage++ }
|
||||||
1005 -> npcl(FacialExpression.NEUTRAL, "I don't see why not. We used to make these for fun and hand them out to adventurers all the time.").also { stage++ }
|
1005 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "I don't see why not. We used to make these for fun and hand them out to adventurers all the time.").also { stage++ }
|
||||||
1006 -> playerl(FacialExpression.ASKING, "Well, thanks! So.. what do we need to make one?").also { stage++ }
|
1006 -> playerl(core.game.dialogue.FacialExpression.ASKING, "Well, thanks! So.. what do we need to make one?").also { stage++ }
|
||||||
1007 -> npcl(FacialExpression.NEUTRAL, "Looking at the blueprint here...").also { stage++ }
|
1007 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Looking at the blueprint here...").also { stage++ }
|
||||||
1008 -> npcl(FacialExpression.NEUTRAL, "Yes, it seems we need a ring mould, a silver bar, a cut dragonstone and 200 stardust. Oh, and make sure to bring this blueprint with you.").also { stage++ }
|
1008 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, it seems we need a ring mould, a silver bar, a cut dragonstone and 200 stardust. Oh, and make sure to bring this blueprint with you.").also { stage++ }
|
||||||
1009 -> playerl(FacialExpression.FRIENDLY, "Thanks, I'll get right on it!").also { stage++ }
|
1009 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks, I'll get right on it!").also { stage++ }
|
||||||
1010 -> playerl(FacialExpression.ASKING, "So just to make sure I've got it right, I need a ring mould, a silver bar, a cut dragonstone and 200 stardust, as well as this blueprint?").also { stage++ }
|
1010 -> playerl(core.game.dialogue.FacialExpression.ASKING, "So just to make sure I've got it right, I need a ring mould, a silver bar, a cut dragonstone and 200 stardust, as well as this blueprint?").also { stage++ }
|
||||||
1011 -> npcl(FacialExpression.NEUTRAL, "Yeah, you've got it, human. Any of my kin should be able to do this for you.").also { stage++; setAttribute(player, "/save:star-ring:bp-shown", true) }
|
1011 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yeah, you've got it, human. Any of my kin should be able to do this for you.").also { stage++; setAttribute(player, "/save:star-ring:bp-shown", true) }
|
||||||
1012 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
|
1012 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
2000 -> npcl(FacialExpression.NEUTRAL, "Yes, did you bring the components to make it, human?").also { stage++ }
|
2000 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Yes, did you bring the components to make it, human?").also { stage++ }
|
||||||
2001 -> if(inInventory(player, Items.DRAGONSTONE_1615,1) && inInventory(player, Items.RING_MOULD_1592, 1) && inInventory(player, Items.STARDUST_13727, 200) && inInventory(player, Items.SILVER_BAR_2355, 1)){
|
2001 -> if(inInventory(player, Items.DRAGONSTONE_1615,1) && inInventory(player, Items.RING_MOULD_1592, 1) && inInventory(player, Items.STARDUST_13727, 200) && inInventory(player, Items.SILVER_BAR_2355, 1)){
|
||||||
playerl(FacialExpression.FRIENDLY, "Yes, I have them right here, friend.").also { stage++ }
|
playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Yes, I have them right here, friend.").also { stage++ }
|
||||||
} else {
|
} else {
|
||||||
playerl(FacialExpression.HALF_GUILTY, "I'm afraid not, what did I need again?").also { stage = 2100 }
|
playerl(core.game.dialogue.FacialExpression.HALF_GUILTY, "I'm afraid not, what did I need again?").also { stage = 2100 }
|
||||||
}
|
}
|
||||||
2002 -> npcl(FacialExpression.NEUTRAL, "Excellent, give me just a moment here...").also { stage++ }
|
2002 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Excellent, give me just a moment here...").also { stage++ }
|
||||||
2003 -> sendDialogue("You watch as the Star Sprite casts some strange spell.").also { stage++ }
|
2003 -> sendDialogue("You watch as the Star Sprite casts some strange spell.").also { stage++ }
|
||||||
2004 -> if(removeItem(player, Items.SILVER_BAR_2355, Container.INVENTORY) && removeItem(player, Items.DRAGONSTONE_1615, Container.INVENTORY) && removeItem(player, Item(Items.STARDUST_13727, 200), Container.INVENTORY)){
|
2004 -> if(removeItem(player, Items.SILVER_BAR_2355, Container.INVENTORY) && removeItem(player, Items.DRAGONSTONE_1615, Container.INVENTORY) && removeItem(player, Item(Items.STARDUST_13727, 200), Container.INVENTORY)){
|
||||||
addItem(player, Items.RING_OF_THE_STAR_SPRITE_14652)
|
addItem(player, Items.RING_OF_THE_STAR_SPRITE_14652)
|
||||||
player.dialogueInterpreter.sendItemMessage(Items.RING_OF_THE_STAR_SPRITE_14652, "The Star Sprite hands you a strange ring.").also { stage++ }
|
player.dialogueInterpreter.sendItemMessage(Items.RING_OF_THE_STAR_SPRITE_14652, "The Star Sprite hands you a strange ring.").also { stage++ }
|
||||||
} else end()
|
} else end()
|
||||||
2005 -> npcl(FacialExpression.NEUTRAL, "There you go, I hope you enjoy it!").also { stage++ }
|
2005 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "There you go, I hope you enjoy it!").also { stage++ }
|
||||||
2006 -> playerl(FacialExpression.FRIENDLY, "Thank you!").also { stage = END_DIALOGUE }
|
2006 -> playerl(core.game.dialogue.FacialExpression.FRIENDLY, "Thank you!").also { stage = END_DIALOGUE }
|
||||||
|
|
||||||
2100 -> npcl(FacialExpression.NEUTRAL, "A ring mould, a cut dragonstone, a silver bar and 200 stardust.").also { stage = END_DIALOGUE }
|
2100 -> npcl(core.game.dialogue.FacialExpression.NEUTRAL, "A ring mould, a cut dragonstone, a silver bar and 200 stardust.").also { stage = END_DIALOGUE }
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
+7
-11
@@ -1,26 +1,22 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.component.CloseEvent;
|
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.container.access.InterfaceContainer;
|
import core.game.container.access.InterfaceContainer;
|
||||||
import core.game.node.entity.npc.drop.DropFrequency;
|
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.ChanceItem;
|
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.WeightedChanceItem;
|
|
||||||
import org.rs09.consts.Items;
|
import org.rs09.consts.Items;
|
||||||
import rs09.game.world.GameWorld;
|
import core.game.world.GameWorld;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import api.IfaceSettingsBuilder;
|
import core.api.IfaceSettingsBuilder;
|
||||||
|
|
||||||
import rs09.game.system.config.ClueRewardParser;
|
import core.game.system.config.ClueRewardParser;
|
||||||
|
|
||||||
|
import static core.api.ContentAPIKt.addItemOrDrop;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A clue scroll level.
|
* A clue scroll level.
|
||||||
@@ -74,7 +70,7 @@ public enum ClueLevel {
|
|||||||
long rewardValue = 0L;
|
long rewardValue = 0L;
|
||||||
|
|
||||||
for (Item reward : rewards) {
|
for (Item reward : rewards) {
|
||||||
api.ContentAPIKt.addItemOrDrop(player, reward.getId(), reward.getAmount());
|
addItemOrDrop(player, reward.getId(), reward.getAmount());
|
||||||
rewardValue += reward.getValue();
|
rewardValue += reward.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.component.Component;
|
import core.game.component.Component;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import rs09.game.system.SystemLogger;
|
import core.tools.SystemLogger;
|
||||||
import core.game.world.map.zone.MapZone;
|
import core.game.world.map.zone.MapZone;
|
||||||
import core.game.world.map.zone.ZoneBorders;
|
import core.game.world.map.zone.ZoneBorders;
|
||||||
import core.game.world.map.zone.ZoneBuilder;
|
import core.game.world.map.zone.ZoneBuilder;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.node.entity.player.link.emote.Emotes;
|
import core.game.node.entity.player.link.emote.Emotes;
|
||||||
import core.game.world.map.zone.ZoneBorders;
|
import core.game.world.map.zone.ZoneBorders;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
import rs09.plugin.ClassScanner;
|
import core.plugin.ClassScanner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the emote clue plugins.
|
* Initializes the emote clue plugins.
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.world.map.zone.ZoneBorders;
|
import core.game.world.map.zone.ZoneBorders;
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.content.global.action.DigAction;
|
import core.game.global.action.DigAction;
|
||||||
import core.game.content.global.action.DigSpadeHandler;
|
import core.game.global.action.DigSpadeHandler;
|
||||||
import core.game.interaction.Option;
|
import core.game.interaction.Option;
|
||||||
import core.game.node.Node;
|
import core.game.node.Node;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.CombatSpell;
|
import core.game.node.entity.combat.spell.CombatSpell;
|
||||||
import core.game.node.entity.combat.CombatStyle;
|
import core.game.node.entity.combat.CombatStyle;
|
||||||
import core.game.node.entity.combat.equipment.SwitchAttack;
|
import core.game.node.entity.combat.equipment.SwitchAttack;
|
||||||
import core.game.node.entity.npc.AbstractNPC;
|
import core.game.node.entity.npc.AbstractNPC;
|
||||||
@@ -10,8 +10,8 @@ import core.game.node.entity.player.link.SpellBookManager.SpellBook;
|
|||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.world.map.RegionManager;
|
import core.game.world.map.RegionManager;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
import rs09.game.node.entity.combat.CombatSwingHandler;
|
import core.game.node.entity.combat.CombatSwingHandler;
|
||||||
import rs09.game.node.entity.combat.handlers.MultiSwingHandler;
|
import core.game.node.entity.combat.MultiSwingHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles saradomin npc.
|
* Handles saradomin npc.
|
||||||
+3
-5
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import api.LoginListener;
|
import core.api.LoginListener;
|
||||||
import api.PersistPlayer;
|
import core.api.PersistPlayer;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
|
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
@@ -9,8 +9,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.json.simple.JSONArray;
|
import org.json.simple.JSONArray;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the treasure trail of a player.
|
* Handles the treasure trail of a player.
|
||||||
* @author Vexia
|
* @author Vexia
|
||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.cache.def.impl.ItemDefinition;
|
import core.cache.def.impl.ItemDefinition;
|
||||||
import core.cache.def.impl.SceneryDefinition;
|
import core.cache.def.impl.SceneryDefinition;
|
||||||
@@ -9,7 +9,7 @@ import core.game.interaction.OptionHandler;
|
|||||||
import core.game.node.Node;
|
import core.game.node.Node;
|
||||||
import core.game.node.entity.npc.NPC;
|
import core.game.node.entity.npc.NPC;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.entity.skill.agility.AgilityHandler;
|
import content.global.skill.agility.AgilityHandler;
|
||||||
import core.game.node.item.GroundItem;
|
import core.game.node.item.GroundItem;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.node.item.ItemPlugin;
|
import core.game.node.item.ItemPlugin;
|
||||||
@@ -17,7 +17,7 @@ import core.game.world.map.Location;
|
|||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
import core.plugin.Initializable;
|
import core.plugin.Initializable;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
import rs09.plugin.ClassScanner;
|
import core.plugin.ClassScanner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the clue scroll options.
|
* Handles the clue scroll options.
|
||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.content.dialogue.DialoguePlugin;
|
import core.game.dialogue.DialoguePlugin;
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.CombatStyle;
|
import core.game.node.entity.combat.CombatStyle;
|
||||||
import core.game.node.entity.npc.AbstractNPC;
|
import core.game.node.entity.npc.AbstractNPC;
|
||||||
@@ -9,7 +9,7 @@ import core.game.node.entity.player.Player;
|
|||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.world.map.RegionManager;
|
import core.game.world.map.RegionManager;
|
||||||
import core.plugin.Plugin;
|
import core.plugin.Plugin;
|
||||||
import rs09.plugin.ClassScanner;
|
import core.plugin.ClassScanner;
|
||||||
import core.tools.RandomFunction;
|
import core.tools.RandomFunction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package core.game.content.ttrail;
|
package content.global.activity.ttrail;
|
||||||
|
|
||||||
import core.game.node.entity.Entity;
|
import core.game.node.entity.Entity;
|
||||||
import core.game.node.entity.combat.CombatSpell;
|
import core.game.node.entity.combat.spell.CombatSpell;
|
||||||
import core.game.node.entity.combat.CombatStyle;
|
import core.game.node.entity.combat.CombatStyle;
|
||||||
import core.game.node.entity.npc.AbstractNPC;
|
import core.game.node.entity.npc.AbstractNPC;
|
||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
+26
-26
@@ -1,31 +1,31 @@
|
|||||||
package rs09.game.content.ame
|
package content.global.ame
|
||||||
|
|
||||||
import api.Commands
|
import core.api.Commands
|
||||||
import api.LoginListener
|
import core.api.LoginListener
|
||||||
import api.events.EventHook
|
import core.game.event.EventHook
|
||||||
import api.events.TickEvent
|
import core.game.event.TickEvent
|
||||||
import api.getAttribute
|
import core.api.getAttribute
|
||||||
import api.setAttribute
|
import core.api.setAttribute
|
||||||
import core.game.node.entity.Entity
|
import core.game.node.entity.Entity
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.world.map.zone.ZoneRestriction
|
import core.game.world.map.zone.ZoneRestriction
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import rs09.game.Event
|
import core.api.Event
|
||||||
import rs09.game.system.SystemLogger
|
import core.tools.SystemLogger
|
||||||
import rs09.game.system.command.Privilege
|
import core.game.system.command.Privilege
|
||||||
import rs09.game.world.GameWorld
|
import core.game.world.GameWorld
|
||||||
import rs09.game.world.repository.Repository
|
import core.game.world.repository.Repository
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
|
||||||
class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<TickEvent>, Commands {
|
class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<TickEvent>, Commands {
|
||||||
var event: RandomEventNPC? = null
|
var event: content.global.ame.RandomEventNPC? = null
|
||||||
var enabled: Boolean = false
|
var enabled: Boolean = false
|
||||||
var nextSpawn = 0
|
var nextSpawn = 0
|
||||||
val skills = arrayOf("WoodcuttingSkillPulse","FishingPulse","MiningSkillPulse","BoneBuryingOptionPlugin")
|
val skills = arrayOf("WoodcuttingSkillPulse","FishingPulse","MiningSkillPulse","BoneBuryingOptionPlugin")
|
||||||
|
|
||||||
override fun login(player: Player) {
|
override fun login(player: Player) {
|
||||||
if(player.isArtificial) return
|
if(player.isArtificial) return
|
||||||
val instance = RandomEventManager(player)
|
val instance = content.global.ame.RandomEventManager(player)
|
||||||
player.hook(Event.Tick, instance)
|
player.hook(Event.Tick, instance)
|
||||||
setAttribute(player, "random-manager", instance)
|
setAttribute(player, "random-manager", instance)
|
||||||
instance.rollNextSpawn()
|
instance.rollNextSpawn()
|
||||||
@@ -46,18 +46,18 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
|
|||||||
nextSpawn = GameWorld.ticks + 3000
|
nextSpawn = GameWorld.ticks + 3000
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (getAttribute<RandomEventNPC?>(player, "re-npc", null) != null) return
|
if (getAttribute<content.global.ame.RandomEventNPC?>(player, "re-npc", null) != null) return
|
||||||
val currentAction = player.pulseManager.current?.toString() ?: "None"
|
val currentAction = player.pulseManager.current?.toString() ?: "None"
|
||||||
val ame: RandomEvents = if(currentAction.contains("WoodcuttingSkillPulse") && Random.nextBoolean()){
|
val ame: content.global.ame.RandomEvents = if(currentAction.contains("WoodcuttingSkillPulse") && Random.nextBoolean()){
|
||||||
RandomEvents.TREE_SPIRIT
|
content.global.ame.RandomEvents.TREE_SPIRIT
|
||||||
} else if(currentAction.contains("FishingPulse") && Random.nextBoolean()){
|
} else if(currentAction.contains("FishingPulse") && Random.nextBoolean()){
|
||||||
RandomEvents.RIVER_TROLL
|
content.global.ame.RandomEvents.RIVER_TROLL
|
||||||
} else if(currentAction.contains("MiningSkillPulse") && Random.nextBoolean()){
|
} else if(currentAction.contains("MiningSkillPulse") && Random.nextBoolean()){
|
||||||
RandomEvents.ROCK_GOLEM
|
content.global.ame.RandomEvents.ROCK_GOLEM
|
||||||
} else if(currentAction.contains("BoneBuryingOptionPlugin") && Random.nextBoolean()){
|
} else if(currentAction.contains("BoneBuryingOptionPlugin") && Random.nextBoolean()){
|
||||||
RandomEvents.SHADE
|
content.global.ame.RandomEvents.SHADE
|
||||||
} else {
|
} else {
|
||||||
RandomEvents.values().filter { it.type != "skill" }.random()
|
content.global.ame.RandomEvents.values().filter { it.type != "skill" }.random()
|
||||||
}
|
}
|
||||||
event = ame.npc.create(player,ame.loot,ame.type)
|
event = ame.npc.create(player,ame.loot,ame.type)
|
||||||
if (event!!.spawnLocation == null) {
|
if (event!!.spawnLocation == null) {
|
||||||
@@ -71,7 +71,7 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun rollNextSpawn() {
|
private fun rollNextSpawn() {
|
||||||
nextSpawn = GameWorld.ticks + RandomFunction.random(MIN_DELAY_TICKS, MAX_DELAY_TICKS)
|
nextSpawn = GameWorld.ticks + RandomFunction.random(content.global.ame.RandomEventManager.Companion.MIN_DELAY_TICKS, content.global.ame.RandomEventManager.Companion.MAX_DELAY_TICKS)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun defineCommands() {
|
override fun defineCommands() {
|
||||||
@@ -82,16 +82,16 @@ class RandomEventManager(val player: Player? = null) : LoginListener, EventHook<
|
|||||||
if (target == null)
|
if (target == null)
|
||||||
reject(player, "Unable to find player $username!")
|
reject(player, "Unable to find player $username!")
|
||||||
|
|
||||||
getInstance(target!!)?.fireEvent()
|
content.global.ame.RandomEventManager.Companion.getInstance(target!!)?.fireEvent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val AVG_DELAY_TICKS = 6000 // 60 minutes
|
const val AVG_DELAY_TICKS = 6000 // 60 minutes
|
||||||
const val MIN_DELAY_TICKS = AVG_DELAY_TICKS / 2
|
const val MIN_DELAY_TICKS = content.global.ame.RandomEventManager.Companion.AVG_DELAY_TICKS / 2
|
||||||
const val MAX_DELAY_TICKS = MIN_DELAY_TICKS + AVG_DELAY_TICKS // window of 60 min centered on 60 min (30 to 90 min)
|
const val MAX_DELAY_TICKS = content.global.ame.RandomEventManager.Companion.MIN_DELAY_TICKS + content.global.ame.RandomEventManager.Companion.AVG_DELAY_TICKS // window of 60 min centered on 60 min (30 to 90 min)
|
||||||
|
|
||||||
@JvmStatic fun getInstance(player: Player): RandomEventManager?
|
@JvmStatic fun getInstance(player: Player): content.global.ame.RandomEventManager?
|
||||||
{
|
{
|
||||||
return getAttribute(player, "random-manager", null)
|
return getAttribute(player, "random-manager", null)
|
||||||
}
|
}
|
||||||
+7
-7
@@ -1,6 +1,7 @@
|
|||||||
package rs09.game.content.ame
|
package content.global.ame
|
||||||
|
|
||||||
import api.poofClear
|
import content.global.ame.events.MysteriousOldManNPC
|
||||||
|
import core.api.poofClear
|
||||||
import core.game.interaction.MovementPulse
|
import core.game.interaction.MovementPulse
|
||||||
import core.game.node.entity.impl.PulseType
|
import core.game.node.entity.impl.PulseType
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
@@ -10,10 +11,9 @@ import core.game.world.map.Location
|
|||||||
import core.game.world.map.RegionManager
|
import core.game.world.map.RegionManager
|
||||||
import core.game.world.map.path.Pathfinder
|
import core.game.world.map.path.Pathfinder
|
||||||
import core.game.world.update.flag.context.Graphics
|
import core.game.world.update.flag.context.Graphics
|
||||||
import discord.Discord
|
import core.integrations.discord.Discord
|
||||||
import rs09.game.content.ame.events.MysteriousOldManNPC
|
import core.api.utils.WeightBasedTable
|
||||||
import rs09.game.content.global.WeightBasedTable
|
import core.tools.secondsToTicks
|
||||||
import rs09.tools.secondsToTicks
|
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
import kotlin.reflect.full.createInstance
|
import kotlin.reflect.full.createInstance
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ abstract class RandomEventNPC(id: Int) : NPC(id) {
|
|||||||
open fun terminate() {
|
open fun terminate() {
|
||||||
finalized = true
|
finalized = true
|
||||||
pulseManager.clear(PulseType.STANDARD)
|
pulseManager.clear(PulseType.STANDARD)
|
||||||
RandomEventManager.getInstance(player)?.event = null
|
content.global.ame.RandomEventManager.getInstance(player)?.event = null
|
||||||
if (initialized) {
|
if (initialized) {
|
||||||
poofClear(this)
|
poofClear(this)
|
||||||
}
|
}
|
||||||
+15
-15
@@ -1,25 +1,25 @@
|
|||||||
package rs09.game.content.ame
|
package content.global.ame
|
||||||
|
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.game.content.ame.events.MysteriousOldManNPC
|
import content.global.ame.events.MysteriousOldManNPC
|
||||||
import rs09.game.content.ame.events.certer.CerterNPC
|
import content.global.ame.events.certer.CerterNPC
|
||||||
import rs09.game.content.ame.events.drilldemon.SeargentDamienNPC
|
import content.global.ame.events.drilldemon.SeargentDamienNPC
|
||||||
import rs09.game.content.ame.events.evilchicken.EvilChickenNPC
|
import content.global.ame.events.evilchicken.EvilChickenNPC
|
||||||
import rs09.game.content.ame.events.genie.GenieNPC
|
import content.global.ame.events.genie.GenieNPC
|
||||||
import rs09.game.content.ame.events.rivertroll.RiverTrollRENPC
|
import content.global.ame.events.rivertroll.RiverTrollRENPC
|
||||||
import rs09.game.content.ame.events.rockgolem.RockGolemRENPC
|
import content.global.ame.events.rockgolem.RockGolemRENPC
|
||||||
import rs09.game.content.ame.events.sandwichlady.SandwichLadyRENPC
|
import content.global.ame.events.sandwichlady.SandwichLadyRENPC
|
||||||
import rs09.game.content.ame.events.shade.ShadeRENPC
|
import content.global.ame.events.shade.ShadeRENPC
|
||||||
import rs09.game.content.ame.events.treespirit.TreeSpiritRENPC
|
import content.global.ame.events.treespirit.TreeSpiritRENPC
|
||||||
import rs09.game.content.ame.events.zombie.ZombieRENPC
|
import content.global.ame.events.zombie.ZombieRENPC
|
||||||
|
|
||||||
import rs09.game.content.global.WeightBasedTable
|
import core.api.utils.WeightBasedTable
|
||||||
import rs09.game.content.global.WeightedItem
|
import core.api.utils.WeightedItem
|
||||||
|
|
||||||
enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = null) {
|
enum class RandomEvents(val npc: RandomEventNPC, val loot: WeightBasedTable? = null) {
|
||||||
SANDWICH_LADY(SandwichLadyRENPC()),
|
SANDWICH_LADY(SandwichLadyRENPC()),
|
||||||
GENIE(GenieNPC()),
|
GENIE(GenieNPC()),
|
||||||
CERTER(CerterNPC(),WeightBasedTable.create(
|
CERTER(CerterNPC(), WeightBasedTable.create(
|
||||||
WeightedItem(Items.UNCUT_SAPPHIRE_1623,1,1,3.4),
|
WeightedItem(Items.UNCUT_SAPPHIRE_1623,1,1,3.4),
|
||||||
WeightedItem(Items.KEBAB_1971,1,1,1.7),
|
WeightedItem(Items.KEBAB_1971,1,1,1.7),
|
||||||
WeightedItem(Items.UNCUT_EMERALD_1621,1,1,1.7),
|
WeightedItem(Items.UNCUT_EMERALD_1621,1,1,1.7),
|
||||||
+5
-6
@@ -1,9 +1,8 @@
|
|||||||
package rs09.game.content.ame.events
|
package content.global.ame.events
|
||||||
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import rs09.game.content.ame.RandomEventManager
|
import content.global.ame.events.supriseexam.SurpriseExamUtils
|
||||||
import rs09.game.content.ame.events.supriseexam.SurpriseExamUtils
|
import core.game.dialogue.DialogueFile
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
|
||||||
|
|
||||||
class MysteriousOldManDialogue(val type: String) : DialogueFile() {
|
class MysteriousOldManDialogue(val type: String) : DialogueFile() {
|
||||||
|
|
||||||
@@ -23,11 +22,11 @@ class MysteriousOldManDialogue(val type: String) : DialogueFile() {
|
|||||||
1 -> {
|
1 -> {
|
||||||
end()
|
end()
|
||||||
teleport(player!!,type)
|
teleport(player!!,type)
|
||||||
RandomEventManager.getInstance(player!!)?.event?.terminate()
|
content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
|
||||||
}
|
}
|
||||||
2 -> {
|
2 -> {
|
||||||
end()
|
end()
|
||||||
RandomEventManager.getInstance(player!!)?.event?.terminate()
|
content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package rs09.game.content.ame.events
|
package content.global.ame.events
|
||||||
|
|
||||||
|
import content.global.ame.RandomEventNPC
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.game.content.ame.RandomEventNPC
|
import core.api.utils.WeightBasedTable
|
||||||
import rs09.game.content.global.WeightBasedTable
|
|
||||||
|
|
||||||
class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) {
|
class MysteriousOldManNPC(var type: String = "", override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.MYSTERIOUS_OLD_MAN_410) {
|
||||||
override fun init() {
|
override fun init() {
|
||||||
+7
-8
@@ -1,12 +1,11 @@
|
|||||||
package rs09.game.content.ame.events.certer
|
package content.global.ame.events.certer
|
||||||
|
|
||||||
import api.addItemOrDrop
|
import core.api.addItemOrDrop
|
||||||
import core.game.component.Component
|
import core.game.component.Component
|
||||||
import core.game.node.entity.impl.PulseType
|
import core.game.node.entity.impl.PulseType
|
||||||
import core.game.node.entity.player.link.emote.Emotes
|
import core.game.node.entity.player.link.emote.Emotes
|
||||||
import rs09.game.content.ame.RandomEventManager
|
import core.game.dialogue.DialogueFile
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import core.tools.END_DIALOGUE
|
||||||
import rs09.tools.END_DIALOGUE
|
|
||||||
|
|
||||||
class CerterDialogue(val initial: Boolean) : DialogueFile() {
|
class CerterDialogue(val initial: Boolean) : DialogueFile() {
|
||||||
val CERTER_INTERFACE = 184
|
val CERTER_INTERFACE = 184
|
||||||
@@ -31,13 +30,13 @@ class CerterDialogue(val initial: Boolean) : DialogueFile() {
|
|||||||
npc("Sorry, I don't think so.").also {
|
npc("Sorry, I don't think so.").also {
|
||||||
player!!.setAttribute("certer:reward", true)
|
player!!.setAttribute("certer:reward", true)
|
||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
RandomEventManager.getInstance(player!!)?.event?.terminate()
|
content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
npc("Thank you, I hope you like your present. I must be", "leaving now though.").also {
|
npc("Thank you, I hope you like your present. I must be", "leaving now though.").also {
|
||||||
player!!.setAttribute("certer:reward", true)
|
player!!.setAttribute("certer:reward", true)
|
||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
RandomEventManager.getInstance(player!!)!!.event!!.loot!!.roll().forEach { addItemOrDrop(player!!, it.id, it.amount) }
|
content.global.ame.RandomEventManager.getInstance(player!!)!!.event!!.loot!!.roll().forEach { addItemOrDrop(player!!, it.id, it.amount) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +51,7 @@ class CerterDialogue(val initial: Boolean) : DialogueFile() {
|
|||||||
// Wave goodbye
|
// Wave goodbye
|
||||||
npc!!.animate(Emotes.WAVE.animation)
|
npc!!.animate(Emotes.WAVE.animation)
|
||||||
// Terminate the event
|
// Terminate the event
|
||||||
RandomEventManager.getInstance(player!!)?.event?.terminate()
|
content.global.ame.RandomEventManager.getInstance(player!!)?.event?.terminate()
|
||||||
} else {
|
} else {
|
||||||
player!!.setAttribute("random:pause", false)
|
player!!.setAttribute("random:pause", false)
|
||||||
}
|
}
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package rs09.game.content.ame.events.certer
|
package content.global.ame.events.certer
|
||||||
|
|
||||||
|
import content.global.ame.RandomEventManager
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.game.content.ame.RandomEventManager
|
import core.game.interaction.InterfaceListener
|
||||||
import rs09.game.interaction.InterfaceListener
|
|
||||||
|
|
||||||
class CerterEventInterface : InterfaceListener {
|
class CerterEventInterface : InterfaceListener {
|
||||||
val CERTER_INTERFACE = 184
|
val CERTER_INTERFACE = 184
|
||||||
+5
-4
@@ -1,11 +1,12 @@
|
|||||||
package rs09.game.content.ame.events.certer
|
package content.global.ame.events.certer
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.entity.player.link.emote.Emotes
|
import core.game.node.entity.player.link.emote.Emotes
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.game.content.ame.RandomEventNPC
|
import content.global.ame.RandomEventNPC
|
||||||
import rs09.game.content.global.WeightBasedTable
|
import core.api.animate
|
||||||
|
import core.api.utils.WeightBasedTable
|
||||||
|
|
||||||
class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GILES_2538) {
|
class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GILES_2538) {
|
||||||
lateinit var pName: String
|
lateinit var pName: String
|
||||||
@@ -44,6 +45,6 @@ class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NP
|
|||||||
player.setAttribute("random:pause", false)
|
player.setAttribute("random:pause", false)
|
||||||
player.setAttribute("certer:reward", false)
|
player.setAttribute("certer:reward", false)
|
||||||
sendChat(phrases[0])
|
sendChat(phrases[0])
|
||||||
api.animate(this, Emotes.BOW.animation, true)
|
animate(this, Emotes.BOW.animation, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package rs09.game.content.ame.events.drilldemon
|
package content.global.ame.events.drilldemon
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.game.interaction.InteractionListener
|
import core.game.interaction.InteractionListener
|
||||||
import rs09.game.interaction.IntType
|
import core.game.interaction.IntType
|
||||||
|
|
||||||
class DrillDemonListeners : InteractionListener {
|
class DrillDemonListeners : InteractionListener {
|
||||||
val MATS = intArrayOf(10076,10077,10078,10079)
|
val MATS = intArrayOf(10076,10077,10078,10079)
|
||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
package rs09.game.content.ame.events.drilldemon
|
package content.global.ame.events.drilldemon
|
||||||
|
|
||||||
import api.*
|
import core.api.*
|
||||||
import core.game.content.dialogue.FacialExpression
|
import core.game.dialogue.FacialExpression
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.game.node.item.GroundItemManager
|
import core.game.node.item.GroundItemManager
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
@@ -53,7 +53,7 @@ object DrillDemonUtils {
|
|||||||
player.varpManager.get(DD_SIGN_VARP).setVarbit(tempOffsetList[i],tempList[i]).send(player)
|
player.varpManager.get(DD_SIGN_VARP).setVarbit(tempOffsetList[i],tempList[i]).send(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
player.dialogueInterpreter.sendDialogues(NPCs.SERGEANT_DAMIEN_2790,FacialExpression.OLD_NORMAL,when(task){
|
player.dialogueInterpreter.sendDialogues(NPCs.SERGEANT_DAMIEN_2790, core.game.dialogue.FacialExpression.OLD_NORMAL,when(task){
|
||||||
DD_SIGN_JOG -> "Get over there and jog in place!"
|
DD_SIGN_JOG -> "Get over there and jog in place!"
|
||||||
DD_SIGN_JUMP -> "I need 40 jumping jacks stat!"
|
DD_SIGN_JUMP -> "I need 40 jumping jacks stat!"
|
||||||
DD_SIGN_PUSHUP -> "Get over there and give me 20 pushups!"
|
DD_SIGN_PUSHUP -> "Get over there and give me 20 pushups!"
|
||||||
+5
-5
@@ -1,14 +1,14 @@
|
|||||||
package rs09.game.content.ame.events.drilldemon
|
package content.global.ame.events.drilldemon
|
||||||
|
|
||||||
import core.game.content.dialogue.DialoguePlugin
|
import core.game.dialogue.DialoguePlugin
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import core.plugin.Initializable
|
import core.plugin.Initializable
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.tools.END_DIALOGUE
|
import core.tools.END_DIALOGUE
|
||||||
|
|
||||||
@Initializable
|
@Initializable
|
||||||
class SeargentDamienDefaultPlugin(player: Player? = null) : DialoguePlugin(player) {
|
class SeargentDamienDefaultPlugin(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
||||||
override fun newInstance(player: Player?): DialoguePlugin {
|
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
||||||
return SeargentDamienDefaultPlugin(player)
|
return SeargentDamienDefaultPlugin(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
+12
-13
@@ -1,18 +1,17 @@
|
|||||||
package rs09.game.content.ame.events.drilldemon
|
package content.global.ame.events.drilldemon
|
||||||
|
|
||||||
import core.game.content.dialogue.FacialExpression
|
import core.game.dialogue.FacialExpression
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import rs09.game.content.ame.RandomEventManager
|
import core.game.dialogue.DialogueFile
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import core.tools.END_DIALOGUE
|
||||||
import rs09.tools.END_DIALOGUE
|
import core.tools.START_DIALOGUE
|
||||||
import rs09.tools.START_DIALOGUE
|
|
||||||
|
|
||||||
class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
|
class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
|
||||||
override fun handle(componentID: Int, buttonID: Int) {
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
var correctAmt = player!!.getAttribute(DrillDemonUtils.DD_CORRECT_COUNTER,0)
|
var correctAmt = player!!.getAttribute(DrillDemonUtils.DD_CORRECT_COUNTER,0)
|
||||||
if(correctAmt == 4 && RandomEventManager.getInstance(player!!)!!.event == null) {
|
if(correctAmt == 4 && content.global.ame.RandomEventManager.getInstance(player!!)!!.event == null) {
|
||||||
when(stage){
|
when(stage){
|
||||||
0 -> npc(FacialExpression.OLD_NORMAL,"My god you actually did it, you limp","wristed worm-bodied MAGGOT! Take this","and get out of my sight.").also { stage++ }
|
0 -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"My god you actually did it, you limp","wristed worm-bodied MAGGOT! Take this","and get out of my sight.").also { stage++ }
|
||||||
1 -> {
|
1 -> {
|
||||||
end()
|
end()
|
||||||
player!!.unlock()
|
player!!.unlock()
|
||||||
@@ -25,9 +24,9 @@ class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(RandomEventManager.getInstance(player!!)!!.event == null){
|
} else if(content.global.ame.RandomEventManager.getInstance(player!!)!!.event == null){
|
||||||
when(stage){
|
when(stage){
|
||||||
START_DIALOGUE -> if(isCorrect) npc(FacialExpression.OLD_NORMAL,"Good! Now...").also { stage++ } else npc(FacialExpression.OLD_ANGRY1,"WRONG, MAGGOT!").also { stage++ }
|
START_DIALOGUE -> if(isCorrect) npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Good! Now...").also { stage++ } else npc(core.game.dialogue.FacialExpression.OLD_ANGRY1,"WRONG, MAGGOT!").also { stage++ }
|
||||||
1 -> {
|
1 -> {
|
||||||
end()
|
end()
|
||||||
DrillDemonUtils.changeSignsAndAssignTask(player!!)
|
DrillDemonUtils.changeSignsAndAssignTask(player!!)
|
||||||
@@ -35,18 +34,18 @@ class SeargentDamienDialogue(val isCorrect: Boolean = false) : DialogueFile() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
when(stage){
|
when(stage){
|
||||||
START_DIALOGUE -> npc(FacialExpression.OLD_NORMAL,"Would you like to come work out?").also { stage++ }
|
START_DIALOGUE -> npc(core.game.dialogue.FacialExpression.OLD_NORMAL,"Would you like to come work out?").also { stage++ }
|
||||||
1 -> options("Yes, please.", "No, thanks.").also { stage++ }
|
1 -> options("Yes, please.", "No, thanks.").also { stage++ }
|
||||||
2 -> when(buttonID){
|
2 -> when(buttonID){
|
||||||
1 -> {
|
1 -> {
|
||||||
end()
|
end()
|
||||||
DrillDemonUtils.teleport(player!!)
|
DrillDemonUtils.teleport(player!!)
|
||||||
RandomEventManager.getInstance(player!!)!!.event?.terminate()
|
content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
|
||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
}
|
}
|
||||||
2 -> {
|
2 -> {
|
||||||
end()
|
end()
|
||||||
RandomEventManager.getInstance(player!!)!!.event?.terminate()
|
content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
|
||||||
stage = END_DIALOGUE
|
stage = END_DIALOGUE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
package rs09.game.content.ame.events.drilldemon
|
package content.global.ame.events.drilldemon
|
||||||
|
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import org.rs09.consts.NPCs
|
import org.rs09.consts.NPCs
|
||||||
import rs09.game.content.ame.RandomEventNPC
|
import content.global.ame.RandomEventNPC
|
||||||
import rs09.game.content.global.WeightBasedTable
|
import core.api.utils.WeightBasedTable
|
||||||
|
|
||||||
class SeargentDamienNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SERGEANT_DAMIEN_2790) {
|
class SeargentDamienNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.SERGEANT_DAMIEN_2790) {
|
||||||
|
|
||||||
+4
-4
@@ -1,14 +1,14 @@
|
|||||||
package rs09.game.content.ame.events.evilchicken
|
package content.global.ame.events.evilchicken
|
||||||
|
|
||||||
import api.getWorldTicks
|
import core.api.getWorldTicks
|
||||||
import core.game.node.entity.Entity
|
import core.game.node.entity.Entity
|
||||||
import core.game.node.entity.npc.NPC
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.item.GroundItemManager
|
import core.game.node.item.GroundItemManager
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import core.tools.RandomFunction
|
import core.tools.RandomFunction
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
import rs09.game.content.ame.RandomEventNPC
|
import content.global.ame.RandomEventNPC
|
||||||
import rs09.game.content.global.WeightBasedTable
|
import core.api.utils.WeightBasedTable
|
||||||
import java.lang.Integer.max
|
import java.lang.Integer.max
|
||||||
|
|
||||||
val ids = 2463..2468
|
val ids = 2463..2468
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package content.global.ame.events.genie
|
||||||
|
|
||||||
|
import core.api.*
|
||||||
|
import core.game.dialogue.FacialExpression
|
||||||
|
import core.game.dialogue.DialogueFile
|
||||||
|
import core.tools.END_DIALOGUE
|
||||||
|
|
||||||
|
class GenieDialogue : DialogueFile() {
|
||||||
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
|
val assigned = player!!.getAttribute("genie:item",0)
|
||||||
|
npcl(core.game.dialogue.FacialExpression.NEUTRAL, "Ah, so you are there, ${player!!.name.capitalize()}. I'm so glad you summoned me. Please take this lamp and make your wish.")
|
||||||
|
addItemOrDrop(player!!, assigned)
|
||||||
|
content.global.ame.RandomEventManager.getInstance(player!!)!!.event?.terminate()
|
||||||
|
stage = END_DIALOGUE
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user