Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lever.plugin.kts to handle teleporting to Ardougne and back. #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
package gg.rsmod.plugins.content.areas.edgeville.objs
package gg.rsmod.plugins.content.areas.shared.objs

on_obj_option(Objs.LEVER_26761, "pull") {
handleLeverInteraction {
moveTo(3154, 3924)
message("... and teleport into the Wilderness.")
}
}
on_obj_option(Objs.LEVER_1814, "pull") {
handleLeverInteraction {
moveTo(3154, 3924)
message("... and teleport into the Wilderness.")
}
}
on_obj_option(Objs.LEVER_9472, "pull") {
handleLeverInteraction {
moveTo(2561, 3311)
message("... and teleport to Ardougne.")
}
}

fun Plugin.handleLeverInteraction(onAnimationComplete: Player.() -> Unit) {
val obj = player.getInteractingGameObj()

player.queue {
Expand All @@ -26,8 +45,7 @@ on_obj_option(Objs.LEVER_26761, "pull") {
wait(4)

player.animate(-1)
player.moveTo(3154, 3924)
player.message("... and teleport into the Wilderness.")
onAnimationComplete(player)
player.unlock()
}
}
}