Advertisement
DavidJSGardner

House Buddy 1.2

Jul 28th, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. ;==================================
  2. ; Script Name: Pangaea's House Buddy
  3. ; Author: Callum O'Lyre
  4. ; Version: 1.2
  5. ; Client Tested with: 5.0.9.1
  6. ; Shard FS: Pangaea
  7. ; Public Release: 28.07.2013
  8. ; Purpose: Give those house designers a nice menu to work with.
  9. ; Changes:
  10. ; 1.1 - Fixed an issue with dropping an item at your current position
  11. ; 1.2 - Added two new buttons at the very bottom, Circle of Transparency Toggle
  12. ; and Flip Item button.
  13. ;==================================
  14.  
  15. GoSub showHouseDesignermenu
  16. GoSub Buttons
  17.  
  18. sub showHouseDesignermenu
  19. menu Clear
  20. menu Window Title House Buddy
  21. menu Window Color Black
  22. menu Window Size 208 484
  23. menu Font Transparent #true
  24. menu Font Align Right
  25. menu Font Name MS Sans Serif
  26. menu Font Size 8
  27. menu Font Style
  28. menu Font Color WindowText
  29. menu Button MoveWestButton 4 72 65 25 Move West
  30. menu Button MoveNorthButton 140 72 65 25 Move North
  31. menu Button MoveEastButton 140 128 65 25 Move East
  32. menu Button MoveSouthButton 4 128 65 25 Move South
  33. menu Button MoveSWButton 4 100 65 25 Move SW
  34. menu Button MoveNEButton 140 100 65 25 Move NE
  35. menu Button MoveNWButton 72 72 65 25 Move NW
  36. menu Button MoveSEButton 72 128 65 25 Move SE
  37. menu Button DropHereButton 72 100 65 25 Drop Here
  38. menu Button RaiseButton 4 4 97 25 Raise Item
  39. menu Font BGColor Window
  40. menu Edit RaiseEditBox 104 6 100 RaiseBy
  41. menu Font BGColor BtnFace
  42. menu Button LowerButton 4 32 97 25 Lower Item
  43. menu Font BGColor Window
  44. menu Edit LowerEditBox 104 34 100 LowerBy
  45. menu Font BGColor BtnFace
  46. menu Button LockDownButton 4 168 201 25 Lockdown Item
  47. menu Button DecorationButton 4 196 201 25 Lockdown For Decoration
  48. menu Button LockDownCheckButton 4 224 201 25 Lockdown Check
  49. menu Button SecureButton 4 264 201 25 Secure Container
  50. menu Button SecureLevelButton 4 292 201 25 Change Secure Level
  51. menu Button RefreshButton 4 332 201 25 Refresh House
  52. menu Button BanButton 4 360 201 25 Ban That Pesky Intruder!
  53. menu Button HouseOptionsButton 4 388 201 25 House Options
  54. menu Button CircleofTransparencyToggle 4 428 201 25 Circle of Transparency
  55. menu Button FlipItem 4 456 201 25 Flip Item
  56. menu Show 421 270
  57. return
  58.  
  59. Sub Buttons
  60. set #menuButton N/A
  61. While #True
  62. {
  63. if #MenuButton = RaiseButton
  64. {
  65. menu GetNum RaiseEditBox 1
  66. GoSub ManipulateZAxis #MenuRes raise
  67. set #menuButton N/A
  68. }
  69. if #MenuButton = LowerButton
  70. {
  71. menu GetNum LowerEditBox 1
  72. GoSub ManipulateZAxis #MenuRes lower
  73. set #menuButton N/A
  74. }
  75. if #MenuButton = MoveWestButton
  76. {
  77. GoSub ManipulateXYAxis - 1 - 0
  78. set #menuButton N/A
  79. }
  80. if #MenuButton = MoveNWButton
  81. {
  82. GoSub ManipulateXYAxis - 1 - 1
  83. set #menuButton N/A
  84. }
  85. if #MenuButton = MoveNorthButton
  86. {
  87. GoSub ManipulateXYAxis - 0 - 1
  88. set #menuButton N/A
  89. }
  90. if #MenuButton = MoveSWButton
  91. {
  92. GoSub ManipulateXYAxis - 1 + 1
  93. set #menuButton N/A
  94. }
  95. if #MenuButton = DropHereButton
  96. {
  97. GoSub ManipulateXYAxis
  98. set #menuButton N/A
  99. }
  100. if #MenuButton = MoveNEButton
  101. {
  102. GoSub ManipulateXYAxis + 1 - 1
  103. set #menuButton N/A
  104. }
  105. if #MenuButton = MoveSouthButton
  106. {
  107. GoSub ManipulateXYAxis - 0 + 1
  108. set #menuButton N/A
  109. }
  110. if #MenuButton = MoveSEButton
  111. {
  112. GoSub ManipulateXYAxis + 1 + 1
  113. set #menuButton N/A
  114. }
  115. if #MenuButton = MoveEastButton
  116. {
  117. GoSub ManipulateXYAxis + 1 - 0
  118. set #menuButton N/A
  119. }
  120. if #MenuButton = LockDownButton
  121. {
  122. Event Macro 3 0 I wish to lock this down
  123. set #menuButton N/A
  124. }
  125. if #MenuButton = DecorationButton
  126. {
  127. Event Macro 3 0 I wish to lock this down for decoration
  128. set #menuButton N/A
  129. }
  130. if #MenuButton = LockDownCheckButton
  131. {
  132. Event Macro 3 0 .LockDownCheck
  133. set #menuButton N/A
  134. }
  135. if #MenuButton = SecureButton
  136. {
  137. Event Macro 3 0 I wish to secure this
  138. set #menuButton N/A
  139. }
  140. if #MenuButton = SecureLevelButton
  141. {
  142. Event Macro 3 0 I wish to change secure level
  143. set #menuButton N/A
  144. }
  145. if #MenuButton = RefreshButton
  146. {
  147. Event Macro 3 0 I wish to refresh this house
  148. set #menuButton N/A
  149. }
  150. if #MenuButton = BanButton
  151. {
  152. Event Macro 3 0 I Ban Thee!
  153. set #menuButton N/A
  154. }
  155. if #MenuButton = HouseOptionsButton
  156. {
  157. Event Macro 3 0 .House
  158. set #menuButton N/A
  159. }
  160. if #MenuButton = CircleofTransparencyToggle
  161. {
  162. Event Macro 29 0
  163. set #MenuButton N/A
  164. }
  165. if #MenuButton = FlipItem
  166. {
  167. Event Macro 1 0 .Flip
  168. set #menuButton N/A
  169. }
  170. if #MenuButton = closed
  171. {
  172. halt
  173. }
  174. }
  175.  
  176. Sub ManipulateXYAxis
  177. set #TargCurs 1
  178. Event Sysmessage Move which item?
  179.  
  180. While #TargCurs <> 0
  181. wait 1
  182.  
  183. FindItem #LTargetID
  184. if #FindBagID <> X && %0 = 0
  185. {
  186. Event Macro 3 0 I wish to drop this here
  187.  
  188. while #TargCurs <> 1
  189. wait 1
  190.  
  191. Event Macro 22 0
  192. return
  193. }
  194.  
  195. Set %ItemToMove #FindID
  196. Set %ItemAmount #FindStack
  197. if #FindDist =< 2
  198. {
  199. if %0 < 1
  200. {
  201. set %XAxis #CharPosX
  202. set %YAxis #CharPosY
  203. set %ZAxis #CharPosZ
  204. }
  205. else
  206. {
  207. set %XAxis ABS ( #FindX %1 %2 )
  208. set %YAxis ABS ( #FindY %3 %4 )
  209. set %ZAxis #FindZ
  210. }
  211. }
  212.  
  213. Set %XDist ABS ( #CharPosX - %XAxis )
  214. Set %YDist ABS ( #CharPosY - %YAxis )
  215. if %XDist < 3 && %YDist < 3
  216. {
  217. ExEvent Drag %ItemToMove %ItemAmount
  218. wait 2
  219. ExEvent Dropg %XAxis %YAxis %ZAxis
  220. wait 2
  221. }
  222. else
  223. {
  224. Event Sysmessage Silly Interior Designer, you cannot move an item more than 3 tiles from where you are standing!
  225. }
  226. return
  227.  
  228. Sub ManipulateZAxis
  229. set #TargCurs 1
  230. Event Sysmessage %2 which item?
  231.  
  232. While #TargCurs <> 0
  233. wait 1
  234.  
  235. if %1 > 15
  236. {
  237. set %1 15
  238. Event Sysmessage Changing the Z difference to %1
  239. }
  240.  
  241. for %i 1 %1
  242. {
  243. Event Macro 3 0 I wish to %2 this
  244.  
  245. while #TargCurs <> 1
  246. wait 1
  247.  
  248. Event Macro 22 0
  249. wait 5
  250. }
  251. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement