Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;==================================
- ; Script Name: Callum's Magically Wonderful Container Emptying Machine
- ; Author: Callum O'Lyre
- ; Version: 1.0
- ; Shard: Pangaea
- ; Public Release: 08.07.2012
- ; Purpose: Moves items between two containers, written in response to an idea posted
- ; in the ideas section regarding the inability to unsecure containers which contain items.
- ; ToDo: Probably missing some container types so add missing container types
- ;==================================
- set %Box1 N/A
- set %Box2 N/A
- menu Clear
- menu Window Title Callum's Box Cleaner
- menu Window Color Black
- menu Window Size 215 103
- 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 Font BGColor Yellow
- menu Button Box1 4 24 19 20 C1
- menu Font BGColor Yellow
- menu Button Box2 4 52 19 20 C2
- menu Font Color WindowText
- menu Font BGColor Yellow
- menu Button MoveItems 4 76 200 20 Move Items
- menu Show 421 270
- Reset:
- set %name N/A
- set #menubutton 0
- Listener:
- if #menubutton = Box1
- {
- Event Sysmessage Select the box you wish to move items from.
- gosub ContainerSelection
- set %Box1 %ContType
- menu Delete BoxName1
- gosub ItemProps
- menu Font Align Left
- menu Font Color Yellow
- menu Text BoxName1 26 25 %name ( %ContType )
- goto Reset
- }
- if #menubutton = Box2
- {
- Event Sysmessage Select the box you wish to move items to.
- gosub ContainerSelection
- set %Box2 %ContType
- menu Delete BoxName2
- gosub ItemProps
- menu Font Align Left
- menu Font Color Yellow
- menu Text BoxName2 26 53 %name ( %ContType )
- goto Reset
- }
- if #menubutton = MoveItems
- {
- menu Delete MoveItems
- set #menubutton 0
- menu Font Align Center
- menu Font Color Yellow
- menu Text ProcessingText 38 76 Processing Item Movement...
- gosub moveItems %Box1 %Box2
- menu Delete ProcessingText
- menu Font Color WindowText
- menu Font BGColor Yellow
- menu Button MoveItems 4 76 200 20 Move Items
- goto Reset
- }
- if #menubutton = CLOSED
- {
- halt
- }
- goto Listener
- sub ContainerSelection
- {
- set #targcurs 1
- targloop:
- wait 5
- {
- if #targcurs = 1
- goto targloop
- wait 5
- finditem #ltargetid
- if #findtype in BO_WN_UMF_CTD_DLN_CUD_UXM_CKF_JKF_TXM_ZTD_VMF_TMF_LKF_AUD_OKF_ZJF_BKF
- {
- set %ContType #LTARGETID
- set #lobjectid #ltargetid
- Event Macro 17 0
- wait 5
- return
- }
- else
- {
- event sysmessage That is not a recognized container type.
- wait 1s
- set #targcurs 1
- wait 5
- goto targloop
- }
- }
- return
- }
- sub ItemProps
- finditem #ltargetid
- event property #findid
- wait 5
- str pos #property $
- set %tmp #strres - 1
- str left #property %tmp
- set %name #strres
- if #findstack > 1
- {
- str len #findstack
- set %tmp #strres + 1
- str del %name 1 %tmp
- set %name #strres
- }
- return
- ;==================================
- ; Script Name: A fast moveItems Sub
- ; Author: Lord Helmchen
- ; Version: 1.2
- ; Client Tested with: 4.0.9b
- ; EUO version tested with: 1.5 Test 58
- ; Shard OSI / FS: RunUO
- ; Revision Date: 13.09.2005
- ; Public Release: 30.07.2005
- ; Purpose: Moves items between two containers as fast as possible.
- ; Usage: gosub moveItems sourceContainer targetContainer [itemTypes]
- ;==================================
- sub moveItems ns
- {
- namespace push
- namespace local moveItems
- set !dragTimeout 5 ;1/10 s
- set !dragTimer #scnt2
- set !items %3
- if %0 < 3
- set !items *
- set !from %1
- set !to %2
- finditem !items C_ , !from
- for #findindex 1 #findcnt
- {
- if #findkind = 0
- {
- set !amt 1
- if #findstack > 1
- set !amt #findstack
- while #scnt2 < !dragTimer
- wait 0
- exevent drag #findid !amt
- exevent dropc !to
- set !dragTimer #scnt2 + !dragTimeout
- }
- }
- namespace clear
- namespace pop
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement