mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
3c61ba69f3
* Disabled The Old Dialogue System * Converted CooksAssistant/Lumbridge Cook Dialogue * Only Show Log Info For New Dialogue System When Server Is In Debug Mode
26 lines
779 B
Kotlin
26 lines
779 B
Kotlin
package plugin.quests.cooksassistant
|
|
|
|
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.players.Player
|
|
import plugin.quests.cooksassistant.dialogue.LumbridgeCookDialogue
|
|
|
|
|
|
@SubscribesTo(NpcFirstClickEvent::class)
|
|
class FirstClick : EventSubscriber<NpcFirstClickEvent> {
|
|
|
|
override fun subscribe(context: EventContext, player: Player, event: NpcFirstClickEvent) {
|
|
|
|
when(event.npc) {
|
|
//Lumbridge Cook (278)
|
|
278 -> {
|
|
if (player.playerRights >= 3) {
|
|
player.packetSender.sendMessage("[click= npc], [type = first/quest], [id= ${event.npc}], [Type= ${event.npc}]")
|
|
}
|
|
player.dialogueFactory.sendDialogue(LumbridgeCookDialogue())
|
|
}
|
|
}
|
|
}
|
|
} |