mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-04 08:39:05 +00:00
Astraeus Dialogue System Port (#512)
* - Marked As Deprecated - Reorganized DialogueOptions.java so that option buttons are grouped with each interface - Added temporary Dialogue Executor to make new Dialogue System function - Remove Man, Woman, and Banker Dialogue and Dialogue Options * - Refactored Dialogue.java into DialoguePacket.java - Moved DialoguePacket.java into impl packets package - Added Astraeus dialogue executor * - Removed useless file - Reorganized the Misc.java file * - Ported Astraeus Dialogue System - Rewrote Man, Woman, and Banker Dialogues - Added line splitter in AstraeusDialogueFactory.java * - Renamed Astraeus* classes to *Plugin - Fixed an issue where the Dialogue Option buttons were not executed through the Kotlin file
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package plugin.click.npc
|
||||
|
||||
import com.rs2.GameConstants
|
||||
import com.rs2.event.EventContext
|
||||
import com.rs2.event.EventSubscriber
|
||||
import com.rs2.event.SubscribesTo
|
||||
import com.rs2.event.impl.NpcFirstClickEvent
|
||||
import com.rs2.game.npcs.Npc
|
||||
import com.rs2.game.content.skills.SkillHandler
|
||||
import com.rs2.game.players.Player
|
||||
import com.rs2.util.Misc
|
||||
import plugin.npc.banker.BankerDialogue
|
||||
import plugin.npc.manwoman.ManWomanDialogue
|
||||
|
||||
|
||||
@SubscribesTo(NpcFirstClickEvent::class)
|
||||
@@ -18,18 +19,17 @@ class NpcFirstClick : EventSubscriber<NpcFirstClickEvent> {
|
||||
if (player.playerRights >= 3) {
|
||||
player.packetSender.sendMessage("[click= npc], [type = first], [id= ${event.npc}], [Type= ${event.npc}]");
|
||||
}
|
||||
|
||||
|
||||
when(event.npc) {
|
||||
|
||||
1,2,3,4,5,6 -> if (Misc.random(10) <= 5) {
|
||||
player.dialogueHandler.sendDialogues(3869, player.npcType)
|
||||
} else {
|
||||
player.dialogueHandler.sendDialogues(3872, player.npcType)
|
||||
}
|
||||
// Man or Woman
|
||||
1,2,3,4,5,6 -> player.dialogueFactory.sendDialogue(ManWomanDialogue(Misc.random(22)))
|
||||
|
||||
//else ->
|
||||
// Banker (NOT INCLUDING GHOST BANKER IN PORT PHASMATYS)
|
||||
166, 494, 495, 496, 497, 498, 499, 953, 1036, 1360, 2163, 2164, 2354, 2355, 2568, 2569, 2570 ->
|
||||
if (!SkillHandler.isSkilling(player)) {
|
||||
player.dialogueFactory.sendDialogue(BankerDialogue())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user