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

Add basic magic teleport plugin for standard spellbook #434

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

charles-m-knox
Copy link
Contributor

This is a very simple and standalone plugin that enables standard spellbook teleports. It further fleshes out the existing magic teleport plugin.

Features:

  • supports air, fire, water, earth staffs (but not multi-element staffs at this time, though i suspect it wouldn't be too hard to implement)
  • grants xp
  • plays the teleport animation and sound
  • prevents the player from moving during a typical teleport animation

Other notable changes that were required in order to implement this:

  • level-up dialogue is now shown 1 tick later than the tick in which it occurred
    • without this change, the dialogue occurs on the same tick as the teleport, which misbehaves.
    • OSRS processes the level-up dialogue 1 tick later as well
  • adds player.metadata.castingStationarySpell and a player.canMove() check for this that prevents walking during spell casts; open to suggestions on a better spot for this if there is one

@charles-m-knox charles-m-knox force-pushed the magic-teleports branch 3 times, most recently from 0ebf878 to f42802c Compare September 7, 2024 00:03
Copy link
Collaborator

@Promises Promises left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, we should probably swap out the itemIds lookup with keys, but its fine

@Promises Promises merged commit 81ce4a2 into runejs:develop Sep 7, 2024
1 check passed
@charles-m-knox charles-m-knox deleted the magic-teleports branch September 7, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants