diff --git a/README.md b/README.md index 60054bcf8..2dd61ac3b 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,20 @@ There are many ways everyone can contribute! From the most seasoned programmers * **Code Contributors**: As a remake, we have massive amounts of content that need to be implemented or corrected. If you know how to program or are willing to learn, this is where you could be extremely helpful! We need everything from quests, to dialogue, to mini-games, to skills that still need to be corrected or implemented. This is perhaps one of the most valuable ways someone could help out the project! If you are interested in developing content, reach out in the development channel of the Discord. + +### Policy on Use of AI Tools + +You, the contributor, agree to submit quality code to the best of your ability which you have tested yourself and confirmed that it works as intended, and if it doesn’t work, you agree to take constructive feedback and fix it. + +You should be able to explain or defend how any part of your code works, without the use of AI or any other assistive tools. + +2009scape reserves the right to reject your MR on grounds of poor quality, poor functionality, poor code style, poor attitudes or unethical over-reliance on assistive tools. + +2009scape reserves the right to bar an individual from contributing due to patterns of aforementioned behavior, and close or delete all future MRs or issues or suggestions from said person without given explanation. + +AI may not be used to generate your MR description, your issue description, or any responses to any discourse present on the Gitlab at any time or in any fashion. If you use AI in any of these places, it will be assumed that your entire contribution is AI and that you have no clue how it functions, and the remainder of the policy outlined above will be applied to you immediately. + + ## Content Developers: Setting Up the Project. ### GitLab Setup **Note: This allows you to commit changes to the main repo (with approval)! Also, always stay up to date with the most recent updates by pulling into your copy when 2009Scape updates!** diff --git a/Server/src/main/content/global/ame/RandomEventNPC.kt b/Server/src/main/content/global/ame/RandomEventNPC.kt index e31b5f36d..a4f3072f7 100644 --- a/Server/src/main/content/global/ame/RandomEventNPC.kt +++ b/Server/src/main/content/global/ame/RandomEventNPC.kt @@ -1,8 +1,10 @@ package content.global.ame import content.global.ame.events.surpriseexam.MysteriousOldManNPC +import core.api.getAttribute import core.api.playGlobalAudio import core.api.poofClear +import core.api.removeAttribute import core.api.sendMessage import core.api.setAttribute import core.api.utils.WeightBasedTable @@ -25,8 +27,6 @@ import core.tools.secondsToTicks import core.tools.ticksToCycles import org.rs09.consts.NPCs import org.rs09.consts.Sounds -import kotlin.math.ceil -import kotlin.math.min import kotlin.random.Random import kotlin.reflect.full.createInstance @@ -37,7 +37,6 @@ abstract class RandomEventNPC(id: Int) : NPC(id) { val SMOKE_GRAPHICS = Graphics(86) var initialized = false var finalized = false - var timerPaused = false var ticksLeft = secondsToTicks(180) private val combatBracket = intArrayOf(10, 20, 40, 60, 90) @@ -57,6 +56,7 @@ abstract class RandomEventNPC(id: Int) : NPC(id) { poofClear(this) playGlobalAudio(this.location, Sounds.SMOKEPUFF_1930, ticksToCycles(1)) } + removeAttribute(player, "random:pause") finalized = true } @@ -93,7 +93,6 @@ abstract class RandomEventNPC(id: Int) : NPC(id) { override fun init() { initialized = true finalized = false - timerPaused = false spawnLocation ?: terminate() location = spawnLocation player.setAttribute("re-npc", this) @@ -150,7 +149,8 @@ abstract class RandomEventNPC(id: Int) : NPC(id) { } fun sayLine(npc: NPC, phrases: Array, hasOpeningPhrase: Boolean, hasOverTimePhrase: Boolean) { - if (!timerPaused && (ticksLeft % 20 == 0 || ticksLeft <= 2)) { //unless the Certer interface is up, speak every 20 ticks, or in the 2nd-to-last tick before attack/note-&-teleport + val inInteraction = getAttribute(player, "random:pause", false) //used by Certer + if ((ticksLeft % 20 == 0 || ticksLeft <= 2) && !inInteraction) { //speak every 20 ticks, or in the 2nd-to-last tick before attack/note-&-teleport var playDwarfWhistle = true if (ticksLeft == secondsToTicks(180) && hasOpeningPhrase) { sendChat(phrases[0]) diff --git a/Server/src/main/content/global/ame/events/certer/CerterNPC.kt b/Server/src/main/content/global/ame/events/certer/CerterNPC.kt index 20b172404..dee88ed3a 100644 --- a/Server/src/main/content/global/ame/events/certer/CerterNPC.kt +++ b/Server/src/main/content/global/ame/events/certer/CerterNPC.kt @@ -6,6 +6,7 @@ import org.rs09.consts.NPCs import content.global.ame.RandomEventNPC import core.api.animate import core.api.lock +import core.api.setAttribute import core.api.utils.WeightBasedTable class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NPCs.GILES_2538) { @@ -33,8 +34,7 @@ class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NP "It's really rude to ignore someone, ${player.username}!", "No-one ignores me!" ) - player.setAttribute("random:pause", false) - player.setAttribute("certer:reward", false) + setAttribute(player, "certer:reward", false) animate(this, Emotes.BOW.animation, true) } @@ -42,4 +42,4 @@ class CerterNPC(override var loot: WeightBasedTable? = null) : RandomEventNPC(NP noteAndTeleport() terminate() } -} \ No newline at end of file +}