The custom monster of this hold is free for use and modification. Scripting details are in this post in the secret tag, but I recommend that anyone not familiar with the Guardians discover them on their own in the hold first. Their original appearance is
, which may serve as a good introduction for anyone struggling with learning their behavior.
×This is mostly copy/pasted from my earlier post in the script repository thread. A Guardian is an invulnerable monster that waits until Beethro stabs a monster and then moves to his location at that time. It comes in two parts.
The first part is for an invisible character that waits for a monster to be stabbed (by any sworded character or briar) and then stores the player's location into PlayerX and PlayerY. Everything works best if this character is placed before the other(s); only one is required to control all guardians in the room. Someone Else might recognize most of the code:
Click here to view the secret text
× Set var "PlayerX" = 0
Set var "PlayerY" = 0
Label Listen
Wait for event Monster stabbed
Label Find
If ...
Wait for entity Player 0,0,0,31
Set var "PlayerX" = 0
If End
If ...
Wait for entity Player 1,0,1,31
Set var "PlayerX" = 1
If End
If ...
Wait for entity Player 2,0,2,31
Set var "PlayerX" = 2
If End
If ...
Wait for entity Player 3,0,3,31
Set var "PlayerX" = 3
If End
If ...
Wait for entity Player 4,0,4,31
Set var "PlayerX" = 4
If End
If ...
Wait for entity Player 5,0,5,31
Set var "PlayerX" = 5
If End
If ...
Wait for entity Player 6,0,6,31
Set var "PlayerX" = 6
If End
If ...
Wait for entity Player 7,0,7,31
Set var "PlayerX" = 7
If End
If ...
Wait for entity Player 8,0,8,31
Set var "PlayerX" = 8
If End
If ...
Wait for entity Player 9,0,9,31
Set var "PlayerX" = 9
If End
If ...
Wait for entity Player 10,0,10,31
Set var "PlayerX" = 10
If End
If ...
Wait for entity Player 11,0,11,31
Set var "PlayerX" = 11
If End
If ...
Wait for entity Player 12,0,12,31
Set var "PlayerX" = 12
If End
If ...
Wait for entity Player 13,0,13,31
Set var "PlayerX" = 13
If End
If ...
Wait for entity Player 14,0,14,31
Set var "PlayerX" = 14
If End
If ...
Wait for entity Player 15,0,15,31
Set var "PlayerX" = 15
If End
If ...
Wait for entity Player 16,0,16,31
Set var "PlayerX" = 16
If End
If ...
Wait for entity Player 17,0,17,31
Set var "PlayerX" = 17
If End
If ...
Wait for entity Player 18,0,18,31
Set var "PlayerX" = 18
If End
If ...
Wait for entity Player 19,0,19,31
Set var "PlayerX" = 19
If End
If ...
Wait for entity Player 20,0,20,31
Set var "PlayerX" = 20
If End
If ...
Wait for entity Player 21,0,21,31
Set var "PlayerX" = 21
If End
If ...
Wait for entity Player 22,0,22,31
Set var "PlayerX" = 22
If End
If ...
Wait for entity Player 23,0,23,31
Set var "PlayerX" = 23
If End
If ...
Wait for entity Player 24,0,24,31
Set var "PlayerX" = 24
If End
If ...
Wait for entity Player 25,0,25,31
Set var "PlayerX" = 25
If End
If ...
Wait for entity Player 26,0,26,31
Set var "PlayerX" = 26
If End
If ...
Wait for entity Player 27,0,27,31
Set var "PlayerX" = 27
If End
If ...
Wait for entity Player 28,0,28,31
Set var "PlayerX" = 28
If End
If ...
Wait for entity Player 29,0,29,31
Set var "PlayerX" = 29
If End
If ...
Wait for entity Player 30,0,30,31
Set var "PlayerX" = 30
If End
If ...
Wait for entity Player 31,0,31,31
Set var "PlayerX" = 31
If End
If ...
Wait for entity Player 32,0,32,31
Set var "PlayerX" = 32
If End
If ...
Wait for entity Player 33,0,33,31
Set var "PlayerX" = 33
If End
If ...
Wait for entity Player 34,0,34,31
Set var "PlayerX" = 34
If End
If ...
Wait for entity Player 35,0,35,31
Set var "PlayerX" = 35
If End
If ...
Wait for entity Player 36,0,36,31
Set var "PlayerX" = 36
If End
If ...
Wait for entity Player 37,0,37,31
Set var "PlayerX" = 37
If End
If ...
Wait for entity Player 0,0,37,0
Set var "PlayerY" = 0
If End
If ...
Wait for entity Player 0,1,37,1
Set var "PlayerY" = 1
If End
If ...
Wait for entity Player 0,2,37,2
Set var "PlayerY" = 2
If End
If ...
Wait for entity Player 0,3,37,3
Set var "PlayerY" = 3
If End
If ...
Wait for entity Player 0,4,37,4
Set var "PlayerY" = 4
If End
If ...
Wait for entity Player 0,5,37,5
Set var "PlayerY" = 5
If End
If ...
Wait for entity Player 0,6,37,6
Set var "PlayerY" = 6
If End
If ...
Wait for entity Player 0,7,37,7
Set var "PlayerY" = 7
If End
If ...
Wait for entity Player 0,8,37,8
Set var "PlayerY" = 8
If End
If ...
Wait for entity Player 0,9,37,9
Set var "PlayerY" = 9
If End
If ...
Wait for entity Player 0,10,37,10
Set var "PlayerY" = 10
If End
If ...
Wait for entity Player 0,11,37,11
Set var "PlayerY" = 11
If End
If ...
Wait for entity Player 0,12,37,12
Set var "PlayerY" = 12
If End
If ...
Wait for entity Player 0,13,37,13
Set var "PlayerY" = 13
If End
If ...
Wait for entity Player 0,14,37,14
Set var "PlayerY" = 14
If End
If ...
Wait for entity Player 0,15,37,15
Set var "PlayerY" = 15
If End
If ...
Wait for entity Player 0,16,37,16
Set var "PlayerY" = 16
If End
If ...
Wait for entity Player 0,17,37,17
Set var "PlayerY" = 17
If End
If ...
Wait for entity Player 0,18,37,18
Set var "PlayerY" = 18
If End
If ...
Wait for entity Player 0,19,37,19
Set var "PlayerY" = 19
If End
If ...
Wait for entity Player 0,20,37,20
Set var "PlayerY" = 20
If End
If ...
Wait for entity Player 0,21,37,21
Set var "PlayerY" = 21
If End
If ...
Wait for entity Player 0,22,37,22
Set var "PlayerY" = 22
If End
If ...
Wait for entity Player 0,23,37,23
Set var "PlayerY" = 23
If End
If ...
Wait for entity Player 0,24,37,24
Set var "PlayerY" = 24
If End
If ...
Wait for entity Player 0,25,37,25
Set var "PlayerY" = 25
If End
If ...
Wait for entity Player 0,26,37,26
Set var "PlayerY" = 26
If End
If ...
Wait for entity Player 0,27,37,27
Set var "PlayerY" = 27
If End
If ...
Wait for entity Player 0,28,37,28
Set var "PlayerY" = 28
If End
If ...
Wait for entity Player 0,29,37,29
Set var "PlayerY" = 29
If End
If ...
Wait for entity Player 0,30,37,30
Set var "PlayerY" = 30
If End
If ...
Wait for entity Player 0,31,37,31
Set var "PlayerY" = 31
If End
Wait 0
Go to Listen
This one is for the critter itself. It takes the (PlayerX, PlayerY) set by the monitoring character and applies roach movement rules to move there, with an initial "
Wait for monster stabbed"
to make it start stationary. It uses a citizen character base to allow it to move platforms, and the custom tiles attached to this post.
Click here to view the secret text
× Imperative 1
Imperative 7
Imperative 10
Wait for event Monster stabbed
Label Move
If ...
Wait for entity Self 0,0,0,31
Set var "NPCX" = 0
If End
If ...
Wait for entity Self 1,0,1,31
Set var "NPCX" = 1
If End
If ...
Wait for entity Self 2,0,2,31
Set var "NPCX" = 2
If End
If ...
Wait for entity Self 3,0,3,31
Set var "NPCX" = 3
If End
If ...
Wait for entity Self 4,0,4,31
Set var "NPCX" = 4
If End
If ...
Wait for entity Self 5,0,5,31
Set var "NPCX" = 5
If End
If ...
Wait for entity Self 6,0,6,31
Set var "NPCX" = 6
If End
If ...
Wait for entity Self 7,0,7,31
Set var "NPCX" = 7
If End
If ...
Wait for entity Self 8,0,8,31
Set var "NPCX" = 8
If End
If ...
Wait for entity Self 9,0,9,31
Set var "NPCX" = 9
If End
If ...
Wait for entity Self 10,0,10,31
Set var "NPCX" = 10
If End
If ...
Wait for entity Self 11,0,11,31
Set var "NPCX" = 11
If End
If ...
Wait for entity Self 12,0,12,31
Set var "NPCX" = 12
If End
If ...
Wait for entity Self 13,0,13,31
Set var "NPCX" = 13
If End
If ...
Wait for entity Self 14,0,14,31
Set var "NPCX" = 14
If End
If ...
Wait for entity Self 15,0,15,31
Set var "NPCX" = 15
If End
If ...
Wait for entity Self 16,0,16,31
Set var "NPCX" = 16
If End
If ...
Wait for entity Self 17,0,17,31
Set var "NPCX" = 17
If End
If ...
Wait for entity Self 18,0,18,31
Set var "NPCX" = 18
If End
If ...
Wait for entity Self 19,0,19,31
Set var "NPCX" = 19
If End
If ...
Wait for entity Self 20,0,20,31
Set var "NPCX" = 20
If End
If ...
Wait for entity Self 21,0,21,31
Set var "NPCX" = 21
If End
If ...
Wait for entity Self 22,0,22,31
Set var "NPCX" = 22
If End
If ...
Wait for entity Self 23,0,23,31
Set var "NPCX" = 23
If End
If ...
Wait for entity Self 24,0,24,31
Set var "NPCX" = 24
If End
If ...
Wait for entity Self 25,0,25,31
Set var "NPCX" = 25
If End
If ...
Wait for entity Self 26,0,26,31
Set var "NPCX" = 26
If End
If ...
Wait for entity Self 27,0,27,31
Set var "NPCX" = 27
If End
If ...
Wait for entity Self 28,0,28,31
Set var "NPCX" = 28
If End
If ...
Wait for entity Self 29,0,29,31
Set var "NPCX" = 29
If End
If ...
Wait for entity Self 30,0,30,31
Set var "NPCX" = 30
If End
If ...
Wait for entity Self 31,0,31,31
Set var "NPCX" = 31
If End
If ...
Wait for entity Self 32,0,32,31
Set var "NPCX" = 32
If End
If ...
Wait for entity Self 33,0,33,31
Set var "NPCX" = 33
If End
If ...
Wait for entity Self 34,0,34,31
Set var "NPCX" = 34
If End
If ...
Wait for entity Self 35,0,35,31
Set var "NPCX" = 35
If End
If ...
Wait for entity Self 36,0,36,31
Set var "NPCX" = 36
If End
If ...
Wait for entity Self 37,0,37,31
Set var "NPCX" = 37
If End
If ...
Wait for entity Self 0,0,37,0
Set var "NPCY" = 0
If End
If ...
Wait for entity Self 0,1,37,1
Set var "NPCY" = 1
If End
If ...
Wait for entity Self 0,2,37,2
Set var "NPCY" = 2
If End
If ...
Wait for entity Self 0,3,37,3
Set var "NPCY" = 3
If End
If ...
Wait for entity Self 0,4,37,4
Set var "NPCY" = 4
If End
If ...
Wait for entity Self 0,5,37,5
Set var "NPCY" = 5
If End
If ...
Wait for entity Self 0,6,37,6
Set var "NPCY" = 6
If End
If ...
Wait for entity Self 0,7,37,7
Set var "NPCY" = 7
If End
If ...
Wait for entity Self 0,8,37,8
Set var "NPCY" = 8
If End
If ...
Wait for entity Self 0,9,37,9
Set var "NPCY" = 9
If End
If ...
Wait for entity Self 0,10,37,10
Set var "NPCY" = 10
If End
If ...
Wait for entity Self 0,11,37,11
Set var "NPCY" = 11
If End
If ...
Wait for entity Self 0,12,37,12
Set var "NPCY" = 12
If End
If ...
Wait for entity Self 0,13,37,13
Set var "NPCY" = 13
If End
If ...
Wait for entity Self 0,14,37,14
Set var "NPCY" = 14
If End
If ...
Wait for entity Self 0,15,37,15
Set var "NPCY" = 15
If End
If ...
Wait for entity Self 0,16,37,16
Set var "NPCY" = 16
If End
If ...
Wait for entity Self 0,17,37,17
Set var "NPCY" = 17
If End
If ...
Wait for entity Self 0,18,37,18
Set var "NPCY" = 18
If End
If ...
Wait for entity Self 0,19,37,19
Set var "NPCY" = 19
If End
If ...
Wait for entity Self 0,20,37,20
Set var "NPCY" = 20
If End
If ...
Wait for entity Self 0,21,37,21
Set var "NPCY" = 21
If End
If ...
Wait for entity Self 0,22,37,22
Set var "NPCY" = 22
If End
If ...
Wait for entity Self 0,23,37,23
Set var "NPCY" = 23
If End
If ...
Wait for entity Self 0,24,37,24
Set var "NPCY" = 24
If End
If ...
Wait for entity Self 0,25,37,25
Set var "NPCY" = 25
If End
If ...
Wait for entity Self 0,26,37,26
Set var "NPCY" = 26
If End
If ...
Wait for entity Self 0,27,37,27
Set var "NPCY" = 27
If End
If ...
Wait for entity Self 0,28,37,28
Set var "NPCY" = 28
If End
If ...
Wait for entity Self 0,29,37,29
Set var "NPCY" = 29
If End
If ...
Wait for entity Self 0,30,37,30
Set var "NPCY" = 30
If End
If ...
Wait for entity Self 0,31,37,31
Set var "NPCY" = 31
If End
If ...
Wait until var "PlayerX" < NPCX
If ...
Wait until var "PlayerY" < NPCY
Move -1,-1,0,1
Else
If ...
Wait until var "PlayerY" > NPCY
Move -1,1,0,1
Else
Move -1,0,0,1
If End
If End
Else
If ...
Wait until var "PlayerX" > NPCX
If ...
Wait until var "PlayerY" < NPCY
Move 1,-1,0,1
Else
If ...
Wait until var "PlayerY" > NPCY
Move 1,1,0,1
Else
Move 1,0,0,1
If End
If End
Else
If ...
Wait until var "PlayerY" < NPCY
Move 0,-1,0,1
Else
If ...
Wait until var "PlayerY" > NPCY
Move 0,1,0,1
Else
Wait 0
If End
If End
If End
If End
Go to Move
Those final move commands need to have "
Single step"
added to them. Hopefully there aren't any other import/export issues.
This code is free for use and modification, and all that.