Zeldaboy111

Skript #212 - test

Jul 16th, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. #Directions etc.
  2.  
  3. function fillDir(p: player, block: String, world: String, d: direction, x: String, y: String, z: String, loc2: location, xa: number, ya: number, za: number):
  4. set {_loc1} to location ({_x} parsed as a number), ({_y} parsed as a number), ({_z} parsed as a number) of world "%{_world}%"
  5.  
  6. clear {scematic::block::%{_p}%::types::*}
  7.  
  8.  
  9. #addDir({_d}, {_xa} parsed as a number, {_ya} parsed as a number, {_za} parsed as a number, {_loc2})
  10. addDir({_d}, {_xa}, {_ya}, {_za}, {_loc2})
  11. #loop blocks between block at {_loc1} and block at {_loc2}:
  12.  
  13.  
  14.  
  15. #function fillDir(x: String, y: String, z: String, loc2: location, world: String, block: String, p: player):
  16. #set {_loc1} to location ({_x} parsed as a number), ({_y} parsed as a number), ({_z} parsed as a number) of world "%{_world}%"
  17. #if {_block} is "scematic_dirt_machine":
  18. # clear {scematic::block::%{_p}%::types::*}
  19. # loop blocks between block at {_loc1} and block at {_loc2}:
  20. # add "%location of loop-block%$%loop-block%" to {scematic::block::%{_p}%::types::*}
  21.  
  22. # if loop-block is air:
  23. # set block at location of loop-block to green glass block
  24.  
  25. # else:
  26. # set block at location of loop-block to red glass block
  27.  
  28. function addDir(dir: direction, xa: number, ya: number, za: number, l: location) :: number:
  29. loop split "%{_dir}%" by "and":
  30. if {_dir} is not set:
  31. set {_dir} to numbersIn(loop-value)
  32. set {_final} to loop-value
  33.  
  34. else if numbersIn(loop-value) > {_dir}:
  35. set {_dir} to numbersIn(loop-value)
  36. set {_final} to loop-value
  37.  
  38. loop split "%{_l}%" by ",":
  39. send "%loop-value%" to console
  40.  
  41.  
  42. if {_final} contains "north":
  43. return 1
  44. if {_final} contains "east":
  45. return 2
  46. if {_final} contains "south":
  47. return 3
  48. if {_final} contains "west":
  49. return 4
Add Comment
Please, Sign In to add comment