Advertisement
NovaYoshi

some lua thing

Jul 27th, 2011
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. Directions:
  2. 0 - 0: Below robot
  3. 1 - 8: N, NE, E, SE, S, SW, W, NW
  4. 9 - 16: Same, but one block above
  5. 17 - 24: Same, but one block below
  6.  
  7. Block types:
  8. Air - Nothing
  9. Water - Water
  10. Solid - Solid block
  11. CharWall - Char, FG, BG. Like Wall in 64pixels
  12. Wirium - Carries a charge
  13. P-NAND - Emits a charge only if 1 or 2 inputs have a charge
  14. DiCrossuh - Crosses 2 Wirium wires
  15. TriCrossuh - Crosses 3 Wirium wires
  16. Meloder - Plays a tone when given a charge, depending on its "char"
  17. Plate - Emits a charge while stepped on
  18. WiriumSwitch - Can be turned on and off
  19.  
  20. LuaBlock - Block with a Lua script
  21. LuaRobot - Robot with a Lua script
  22.  
  23. Sign - Displays a message when touched
  24. KKKBlock - Imported K-Logic subcircuit for Wirium
  25. LogisimBlock - Imported Logisim subcircuit for Wirium
  26. TelepointPublic - Marks a location. You can teleport to it
  27. TelepointPrivate - Marks a location. Only the builder can teleport to it.
  28. TelepointP2P - Stepping on the telepoint sends you to another TelepointP2P
  29.  
  30.  
  31. This.X - Robot's X position (absolute), float
  32. This.Y - Robot's Y position (absolute), float
  33. This.Char - ASCII character for the robot
  34. This.FGColor - Robot foreground color (0-15)
  35. This.BGColor - Robot background color (0-15)
  36. This.Charge - Does the robot give out a charge? ( Can actually store a byte )
  37. This.Caption - Set caption for when you hover the mouse over the robot
  38. This.Solid - Can players walk through the robot? true/false
  39.  
  40. This.OnBumped - Pointer to function to run when robot is bumped into
  41. This.OnBump - Pointer to function to run when robot moves into something
  42. This.OnTalked - Pointer to function to run when someone talks
  43.  
  44. This:Move(Direction) - Move in direction
  45. This:Move(OffsetX,OffSetY) - Move to offset
  46. This:MoveA(AbsX, AbsY) - Move to absolute XY position
  47.  
  48. GetTile() - Pointer to tile below the robot
  49. GetTile(Direction) - Pointer to tile in direction. 0=Below, 1=North, increments clockwise
  50. GetTile(OffX,OffY) - Pointer to tile in offset
  51. GetTileA(AbsX,AbsY) - (Absolute version of the above)
  52. GetTile(OffX,OffY,OffE) - 3D version
  53. GetTileA(AbsX,AbsY,AbsE) - 3D version
  54.  
  55. Type2TypeId(Type) - Returns the type number for a specified type string
  56. TypeId2Type(TypeId) - Returns the type string for a specified type number
  57.  
  58. Tile.New(Char,FG,BG,Type) - Obtain a pointer to a new tile that doesn't necessarily exist
  59. Tile:Swap(DestinationTile) - Swap tile with a different tile
  60. Tile:Copy(DestinationTile) - Copy tile onto a different tile, overwriting it
  61. Tile.X - Read only absolute X coordinate
  62. Tile.Y - Read only. absolute Y coordinate
  63. Tile.Char - ASCII character for the tile
  64. Tile.FGColor - Tile foreground color (0-15)
  65. Tile.BGColor - Tile background color (0-15)
  66. Tile.Type - Tile type name, "Wall", "Floor", "Wirium" and so on
  67. Tile.TypeId - Tile type as a number
  68. Tile.Charge - Does the tile give out a charge?
  69. Tile.A - Misc counter
  70. Tile.B - Misc counter
  71. Tile.C - Misc counter
  72. Tile.D - Misc counter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement