ericek111

[WIP] SimpleQuests NPC scripting documentation

Oct 18th, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. Variables:
  2. %executer% = Player name, that executes script.
  3. %nearest% = Nearest player name.
  4. Types:
  5. location: encoded location.
  6. float: number
  7. integer: number
  8. float - number without decimal point.
  9. double: number with double precision.
  10. boolean: true/false value
  11. speed: walked blocks per tick, default 0.2, max. 1.0
  12. range: Range of NPC's pathfinder, default 30
  13. string: text
  14. Commands:
  15. Format:
  16. [command]/[arg1]/[arg2]/[arg3] etc...
  17. Spawn NPC:
  18. Command: spawnnpc
  19. Args: [name of the NPC], [spawn location of NPC]
  20. Example: spawnnpc/Notch/40.548,69.0,522.752,0.872,-2.445,world
  21. Enable/disable Invulnerability:
  22. Command: setInvulnerability
  23. Args: [boolean]
  24. Example: setInvulnerability/true
  25. Set Target of NPC:
  26. Command: setTarget
  27. Args: [name of the target player]
  28. Example: setTarget/ericek111
  29. Enable/disable collisions with entities:
  30. Command: setCollisions
  31. Args: [boolean]
  32. Example: setCollisions/true
  33. Enable/disable gravity for NPC:
  34. Command: setGravity
  35. Args: [boolean]
  36. Example: setGravity/true
  37. Set yaw (angle/azimuth) of NPC:
  38. Command: setYaw
  39. Args: [float]
  40. Example: setYaw/289.3567
  41. Run pathfinding (move NPC) to specified location:
  42. Command: pathfindTo
  43. Args: [location] OR [location]/[speed] OR [location]/[speed]/[range]
  44. Teleport NPC to location:
  45. Command: teleportToLoc
  46. Args: [location]
  47. Example: teleportToLoc/40.548,69.0,522.752,0.872,-2.445,world
  48. Teleport NPC to player:
  49. Command: teleportToPlayer
  50. Args: [name of the online player]
  51. Example: teleportToPlayer/ericek111
  52. Sleep:
  53. Command: sleep
  54. Args: [float] - number of ticks.
  55. Example: sleep/20 - sleep for 1 second (20 MC ticks is 1 real second).
  56. Send message as NPC:
  57. Command: chat
  58. Args: [string]
  59. Example/Hello! My name is John!
Advertisement
Add Comment
Please, Sign In to add comment