Grappling Hook!

Share scripts you wrote for Denizen-Bukkit here!
Post Reply
Xeane
New
New
Posts: 8
Joined: October 21st, 2019, 1:46 pm

Grappling Hook!

Post by Xeane » November 26th, 2019, 7:06 am

This is a simple script for a Zelda-styled hookshot. "Grappling Hook" sounded a more apppropriate name for Minecraft, however.
give it to yourself with `/ex give grappling_hook`, or use it anywhere in your own scripts!


Script: https://one.denizenscript.com/haste/62348
Last edited by Xeane on November 26th, 2019, 9:50 am, edited 2 times in total.

User avatar
mcmonkey
Site Admin
Site Admin
Posts: 236
Joined: August 5th, 2016, 7:27 pm
Location: Los Angeles, California, USA
Contact:

Re: Grappling Hook!

Post by mcmonkey » November 26th, 2019, 7:26 am

".size> == 0:" -> there's an is_empty tag you can use instead of that :D

Also that queue-passing-around seems a bit hackish. Don't offhand have a suggestion to replace it but... that's probably not the ideal way.

.shot_entities.get[1].as_entity.location> you shouldn't need that "as_entity" there... if it is somehow required, report it as a bug. That'd be a bug. Pretty sure it shouldn't be required.

the grappling_hook_pull "if a" + "else if b" + "else" should just be "if a || !b" + "else" (since the code in the first and last block is duplicated).
Denizen lead developer.
http://mcmonkey.org

Xeane
New
New
Posts: 8
Joined: October 21st, 2019, 1:46 pm

Re: Grappling Hook!

Post by Xeane » November 26th, 2019, 9:11 am

Taken the above advice, and updated the script accordingly.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests