Ultimate Questmakers’ Class

World Scripts

You can create scripts for areas on the server. The world scripts are similar to the NPC scripts, except instead of creating chat and click triggers, you’re going to create scripts triggered by events.

The first event you’ll want to include is the one that gives a name to an area of the server. Use the following:

scriptsspecialblock:
  type: world
  events:
    on script reload:
    – note cu@-158,119,151,greatunknown|46,30,198,greatunknown as:myarea

Then you need to choose what events you want the server to watch for.

  on player enters myarea:
  on player damaged by fall in myarea:
  on projectile hits block in myarea:

The full list is found here: https://one.denizenscript.com/denizen/evts/

After you’ve chosen what event you’re going to have trigger your script, you’ll need to choose the actions that should happen. You can use narrate. You can modify blocks. You can add flags to players so that NPCs will treat them differently when they talk to the NPC. You can use titles using a variation of this command:

– title “title:<green>Put Title Content Here” “subtitle:<gold>Put your subtitle here.”

I would recommend we use the title command sparingly, for when you enter larger areas but use the narrate command for giving flavour text, partly because the title command doesn’t last long.

If you want to have a player dig something up, you could do this:

on player breaks stone in triassicfossilarea:
– if <util.random.int[1].to[50]> > 48 determine i@triassic2

In the example above, I@triassic2 refers to a custom item. The script for custom items goes like this:

triassic2:
  type: item
  material: bone
  display name: fossil
  lore:
  – from a pterosaur

You can have NPCs give custom items to people as well, or have them use the if command to determine if a player has a particular custom item.

So, what kind of things could you create with world scripts? Here are just a few ideas:

  1. Create an area where a person can find special items by digging in the dirt.
  2. Narrate events as players enter areas. Let them know things about the building they’ve entered or the people they see there.
  3. Trigger lightening. (Use – strike <player.location> or if you want the lightening to miss then use – strike <player.location.adds[<util.random.int[-5].to[5]>,<util.random.int[-5].to[5]>,<util.random.int[-5].to[5]>]>)
  4. Create a parkour course where blocks fall away at intervals after the person enters the room. Use commands such as the following:
    • wait 2s
    • modifyblock [48,47,165,questworld] stone
    • wait 10s
    • modifyblock [48,47,165,questworld] air
  5. Create a target that players have to shoot with a bow and arrow. Use an event like the following – on projectile hits red_wool in myarea.
No comments yet! You be the first to comment.

Leave a Reply