Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;==================================
- ; Script Name: Pangaea's House Buddy
- ; Author: Callum O'Lyre
- ; Version: 1.2
- ; Client Tested with: 5.0.9.1
- ; Shard FS: Pangaea
- ; Public Release: 28.07.2013
- ; Purpose: Give those house designers a nice menu to work with.
- ; Changes:
- ; 1.1 - Fixed an issue with dropping an item at your current position
- ; 1.2 - Added two new buttons at the very bottom, Circle of Transparency Toggle
- ; and Flip Item button.
- ;==================================
- GoSub showHouseDesignermenu
- GoSub Buttons
- sub showHouseDesignermenu
- menu Clear
- menu Window Title House Buddy
- menu Window Color Black
- menu Window Size 208 484
- menu Font Transparent #true
- menu Font Align Right
- menu Font Name MS Sans Serif
- menu Font Size 8
- menu Font Style
- menu Font Color WindowText
- menu Button MoveWestButton 4 72 65 25 Move West
- menu Button MoveNorthButton 140 72 65 25 Move North
- menu Button MoveEastButton 140 128 65 25 Move East
- menu Button MoveSouthButton 4 128 65 25 Move South
- menu Button MoveSWButton 4 100 65 25 Move SW
- menu Button MoveNEButton 140 100 65 25 Move NE
- menu Button MoveNWButton 72 72 65 25 Move NW
- menu Button MoveSEButton 72 128 65 25 Move SE
- menu Button DropHereButton 72 100 65 25 Drop Here
- menu Button RaiseButton 4 4 97 25 Raise Item
- menu Font BGColor Window
- menu Edit RaiseEditBox 104 6 100 RaiseBy
- menu Font BGColor BtnFace
- menu Button LowerButton 4 32 97 25 Lower Item
- menu Font BGColor Window
- menu Edit LowerEditBox 104 34 100 LowerBy
- menu Font BGColor BtnFace
- menu Button LockDownButton 4 168 201 25 Lockdown Item
- menu Button DecorationButton 4 196 201 25 Lockdown For Decoration
- menu Button LockDownCheckButton 4 224 201 25 Lockdown Check
- menu Button SecureButton 4 264 201 25 Secure Container
- menu Button SecureLevelButton 4 292 201 25 Change Secure Level
- menu Button RefreshButton 4 332 201 25 Refresh House
- menu Button BanButton 4 360 201 25 Ban That Pesky Intruder!
- menu Button HouseOptionsButton 4 388 201 25 House Options
- menu Button CircleofTransparencyToggle 4 428 201 25 Circle of Transparency
- menu Button FlipItem 4 456 201 25 Flip Item
- menu Show 421 270
- return
- Sub Buttons
- set #menuButton N/A
- While #True
- {
- if #MenuButton = RaiseButton
- {
- menu GetNum RaiseEditBox 1
- GoSub ManipulateZAxis #MenuRes raise
- set #menuButton N/A
- }
- if #MenuButton = LowerButton
- {
- menu GetNum LowerEditBox 1
- GoSub ManipulateZAxis #MenuRes lower
- set #menuButton N/A
- }
- if #MenuButton = MoveWestButton
- {
- GoSub ManipulateXYAxis - 1 - 0
- set #menuButton N/A
- }
- if #MenuButton = MoveNWButton
- {
- GoSub ManipulateXYAxis - 1 - 1
- set #menuButton N/A
- }
- if #MenuButton = MoveNorthButton
- {
- GoSub ManipulateXYAxis - 0 - 1
- set #menuButton N/A
- }
- if #MenuButton = MoveSWButton
- {
- GoSub ManipulateXYAxis - 1 + 1
- set #menuButton N/A
- }
- if #MenuButton = DropHereButton
- {
- GoSub ManipulateXYAxis
- set #menuButton N/A
- }
- if #MenuButton = MoveNEButton
- {
- GoSub ManipulateXYAxis + 1 - 1
- set #menuButton N/A
- }
- if #MenuButton = MoveSouthButton
- {
- GoSub ManipulateXYAxis - 0 + 1
- set #menuButton N/A
- }
- if #MenuButton = MoveSEButton
- {
- GoSub ManipulateXYAxis + 1 + 1
- set #menuButton N/A
- }
- if #MenuButton = MoveEastButton
- {
- GoSub ManipulateXYAxis + 1 - 0
- set #menuButton N/A
- }
- if #MenuButton = LockDownButton
- {
- Event Macro 3 0 I wish to lock this down
- set #menuButton N/A
- }
- if #MenuButton = DecorationButton
- {
- Event Macro 3 0 I wish to lock this down for decoration
- set #menuButton N/A
- }
- if #MenuButton = LockDownCheckButton
- {
- Event Macro 3 0 .LockDownCheck
- set #menuButton N/A
- }
- if #MenuButton = SecureButton
- {
- Event Macro 3 0 I wish to secure this
- set #menuButton N/A
- }
- if #MenuButton = SecureLevelButton
- {
- Event Macro 3 0 I wish to change secure level
- set #menuButton N/A
- }
- if #MenuButton = RefreshButton
- {
- Event Macro 3 0 I wish to refresh this house
- set #menuButton N/A
- }
- if #MenuButton = BanButton
- {
- Event Macro 3 0 I Ban Thee!
- set #menuButton N/A
- }
- if #MenuButton = HouseOptionsButton
- {
- Event Macro 3 0 .House
- set #menuButton N/A
- }
- if #MenuButton = CircleofTransparencyToggle
- {
- Event Macro 29 0
- set #MenuButton N/A
- }
- if #MenuButton = FlipItem
- {
- Event Macro 1 0 .Flip
- set #menuButton N/A
- }
- if #MenuButton = closed
- {
- halt
- }
- }
- Sub ManipulateXYAxis
- set #TargCurs 1
- Event Sysmessage Move which item?
- While #TargCurs <> 0
- wait 1
- FindItem #LTargetID
- if #FindBagID <> X && %0 = 0
- {
- Event Macro 3 0 I wish to drop this here
- while #TargCurs <> 1
- wait 1
- Event Macro 22 0
- return
- }
- Set %ItemToMove #FindID
- Set %ItemAmount #FindStack
- if #FindDist =< 2
- {
- if %0 < 1
- {
- set %XAxis #CharPosX
- set %YAxis #CharPosY
- set %ZAxis #CharPosZ
- }
- else
- {
- set %XAxis ABS ( #FindX %1 %2 )
- set %YAxis ABS ( #FindY %3 %4 )
- set %ZAxis #FindZ
- }
- }
- Set %XDist ABS ( #CharPosX - %XAxis )
- Set %YDist ABS ( #CharPosY - %YAxis )
- if %XDist < 3 && %YDist < 3
- {
- ExEvent Drag %ItemToMove %ItemAmount
- wait 2
- ExEvent Dropg %XAxis %YAxis %ZAxis
- wait 2
- }
- else
- {
- Event Sysmessage Silly Interior Designer, you cannot move an item more than 3 tiles from where you are standing!
- }
- return
- Sub ManipulateZAxis
- set #TargCurs 1
- Event Sysmessage %2 which item?
- While #TargCurs <> 0
- wait 1
- if %1 > 15
- {
- set %1 15
- Event Sysmessage Changing the Z difference to %1
- }
- for %i 1 %1
- {
- Event Macro 3 0 I wish to %2 this
- while #TargCurs <> 1
- wait 1
- Event Macro 22 0
- wait 5
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement