Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;**************************************************************************
- ;**************************************************************************
- ;***** Script: Tailoring magical sets script *******************
- ;***** Author: Rhino *******************
- ;***** Last update: 2 jan 2010 *******************
- ;***** Version: 2.2 *******************
- ;***** Shard: Neverlands Reborn *******************
- ;**************************************************************************
- ;**************************************************************************
- ;************************ Startup menu **********************************
- ;**************************************************************************
- menu Window Title Rhino's tailorscript ©
- menu Window Size 275 275
- menu show 100 100
- menu Font Name MS Sans Serif
- menu Font Size 8
- menu font style b
- set #SYSMSGCOL 88
- menu Text ClothText 10 10 Select what cloth you want to tailor:
- menu font style
- menu check ShirtChk 10 30 70 15 #true Shirts
- menu check KiltChk 10 45 70 15 #true Kilts
- menu check SashChk 75 30 70 15 #true Sashes
- menu check CloakChk 75 45 70 15 #true Cloaks
- menu check ApronChk 140 30 70 15 #true Aprons
- menu font style b
- menu Text JewelText 10 65 Select what jewels you use:
- menu font style
- menu check TailorChk 10 85 120 15 #true Tailor Jewel
- menu Button TailorBtn 125 85 35 15 Set!
- menu Font Name MS Sans Serif
- menu Font Size 8
- menu check MageryChk 10 102 120 15 #true Magery Jewel
- menu Button MageryBtn 125 102 35 15 Set!
- menu font style b
- menu Text MageryText 165 102 *MageryJewel
- menu Text TailorText 165 85 *TailorJewel
- menu Text JewelText 10 127 Personal settings:
- menu font style
- menu Text BlueText 10 147 Bluerune ID:
- menu Text BrownText 10 162 Brownrune ID:
- menu Text ChestText 10 177 Tailorchest ID:
- menu Text VendorText 10 192 Vendor ID:
- menu font style b
- menu Text BlueText2 90 147 *bluerune
- menu Text BrownText2 90 162 *sellrune
- menu Text ChestText2 90 177 *bag
- menu Text VendorText2 90 192 *vendor
- menu font style
- menu Button BlueBtn 165 147 35 15 Set!
- menu Button BrownBtn 165 162 35 15 Set!
- menu Button BagBtn 165 177 35 15 Set!
- menu Button VendorBtn 165 192 35 15 Set!
- menu font style b
- menu Font Size 12
- menu Button StartBtn 100 225 80 30 Start!
- menu Font Size 8
- set %start #false
- repeat
- {
- if #MENUBUTTON = TailorBtn
- {
- set #TARGCURS 1
- event sysMessage Please target your Tailoring jewel.
- repeat
- until #TARGCURS = 0
- set *TailorJewel #LTARGETID
- menu delete TailorText
- menu Text TailorText 165 85 *TailorJewel
- set #MENUBUTTON N/A
- }
- if #MENUBUTTON = MageryBtn
- {
- set #TARGCURS 1
- event sysMessage Please target your Magery jewel.
- repeat
- until #TARGCURS = 0
- set *MageryJewel #LTARGETID
- menu delete MageryText
- menu Text MageryText 165 102 *MageryJewel
- set #MENUBUTTON N/A
- }
- if #MENUBUTTON = BlueBtn
- {
- set #TARGCURS 1
- event sysMessage Please target your blue rune to your tailoring corner.
- repeat
- until #TARGCURS = 0
- set *bluerune #LTARGETID
- menu delete BlueText2
- menu Text BlueText2 90 147 *bluerune
- set #MENUBUTTON N/A
- }
- if #MENUBUTTON = BrownBtn
- {
- set #TARGCURS 1
- event sysMessage Please target the brown rune to a weaver vendor.
- repeat
- until #TARGCURS = 0
- set *sellrune #LTARGETID
- menu delete BrownText2
- menu Text BrownText2 90 162 *sellrune
- set #MENUBUTTON N/A
- }
- if #MENUBUTTON = BagBtn
- {
- set #TARGCURS 1
- event sysMessage Please target the chest to drop magical items into.
- repeat
- until #TARGCURS = 0
- set *bag #LTARGETID
- menu delete ChestText2
- menu Text ChestText2 90 177 *bag
- set #MENUBUTTON N/A
- }
- if #MENUBUTTON = VendorBtn
- {
- set #TARGCURS 1
- event sysMessage Please target the weaver vendor where your rune recalls to.
- repeat
- until #TARGCURS = 0
- set *vendor #LTARGETID
- menu delete VendorText2
- menu Text VendorText2 90 192 *vendor
- set #MENUBUTTON N/A
- }
- if #MENUBUTTON = StartBtn
- {
- menu get ShirtChk
- set %ShirtCheck #menures
- menu get KiltChk
- set %KiltCheck #menures
- menu get SashChk
- set %SashCheck #menures
- menu get CloakChk
- set %CloakCheck #menures
- menu get ApronChk
- set %ApronCheck #menures
- menu get TailorChk
- set %UseTailorJewel #menures
- menu get MageryChk
- set %UseMageryJewel #menures
- menu hide
- set #MENUBUTTON N/A
- set %start #true
- }
- }
- until %start = #true
- ;**************************************************************************
- ;*************************** Global Variables ***************************
- ;**************************************************************************
- set %cloth CUI
- set %sash FZH
- set %apron XDI
- set %cloak DCI
- set %kilt LDI
- set %shirt TQL
- set %allclothing FZH_DCI_LDI_TQL_XDI
- set %magiccolor 2
- set %sewingkit HAG
- set %magical 0
- set %total 0
- set %food EDF_QQD_FWI_UWI_TWI_KPE_MQE_UQE_CWE_KPE_ZPE_AXI_YWI_WLI_ACG_QRD_NRD_FUD_WBG_JQE
- ;**************************************************************************
- ;************************ Script Using Subs *******************************
- ;**************************************************************************
- Start:
- if %ShirtCheck
- {
- GoSub Hunger
- GoSub EquipJewel
- GoSub TailorShirt
- wait 40
- GoSub UnQuipJewel
- wait 40
- GoSub Selling
- }
- if %KiltCheck
- {
- GoSub Hunger
- GoSub EquipJewel
- GoSub TailorKilt
- wait 40
- GoSub UnQuipJewel
- wait 40
- GoSub Selling
- }
- if %SashCheck
- {
- GoSub Hunger
- GoSub EquipJewel
- GoSub TailorSash
- wait 40
- GoSub UnQuipJewel
- wait 40
- GoSub Selling
- }
- if %CloakCheck
- {
- GoSub Hunger
- GoSub EquipJewel
- GoSub TailorCloak
- wait 40
- GoSub UnQuipJewel
- wait 40
- GoSub Selling
- }
- if %ApronCheck
- {
- GoSub Hunger
- GoSub EquipJewel
- GoSub TailorApron
- wait 40
- GoSub UnQuipJewel
- wait 40
- GoSub Selling
- }
- GoTo Start
- ;**************************************************************************
- ;************************** Subs Defined **********************************
- ;**************************************************************************
- Sub TailorShirt
- FindItem %sewingkit C_ , #BACKPACKID
- Set #LOBJECTID #FINDID
- event macro 17 0 ;Last Object
- target 5s
- finditem %cloth G_2
- if #findkind = -1
- {
- event sysMessage There is no more cloth around you, script is halting.
- halt
- }
- set #LTARGETID #FINDID
- event macro 22 0
- Repeat
- Until #CONTNAME = generic_gump
- wait 20
- click 121 130 dmc
- wait 20
- click 219 208 dmc
- set %quantity 0
- repeat
- {
- finditem %shirt C_ , #BACKPACKID
- wait 10
- if #FINDKIND <> -1
- {
- if #findCol <> 0
- {
- Exevent Drag #findid #findstack
- wait 10
- Exevent Dropc *bag
- wait 10
- set %magical %magical + 1
- }
- set %quantity %quantity + 1
- set %total %total + 1
- ignoreItem #FINDID 1
- if %quantity = 33 || %quantity = 66
- {
- Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
- event macro 19 0
- }
- }
- }
- until %quantity = 100
- ignoreitem reset
- return
- ;**************************************************************************
- Sub TailorKilt
- FindItem %sewingkit C_ , #BACKPACKID
- Set #LOBJECTID #FINDID
- event macro 17 0 ;Last Object
- target 5s
- finditem %cloth G_2
- if #findkind = -1
- {
- event sysMessage There is no more cloth around you, script is halting.
- halt
- }
- set #LTARGETID #FINDID
- event macro 22 0
- Repeat
- Until #CONTNAME = generic_gump
- wait 20
- click 266 130 dmc
- wait 20
- click 159 304 dmc
- set %quantity 0
- repeat
- {
- finditem %kilt C_ , #BACKPACKID
- wait 10
- if #FINDKIND <> -1
- {
- if #findCol <> 0
- {
- Exevent Drag #findid #findstack
- wait 10
- Exevent Dropc *bag
- wait 10
- set %magical %magical + 1
- }
- set %quantity %quantity + 1
- set %total %total + 1
- ignoreItem #FINDID 1
- if %quantity = 33 || %quantity = 66
- {
- Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
- event macro 19 0
- }
- }
- }
- until %quantity = 100
- ignoreitem reset
- return
- ;**************************************************************************
- Sub TailorSash
- FindItem %sewingkit C_ , #BACKPACKID
- Set #LOBJECTID #FINDID
- event macro 17 0 ;Last Object
- target 5s
- finditem %cloth G_2
- if #findkind = -1
- {
- event sysMessage There is no more cloth around you, script is halting.
- halt
- }
- set #LTARGETID #FINDID
- event macro 22 0
- Repeat
- Until #CONTNAME = generic_gump
- wait 20
- click 198 361 dmc
- wait 20
- click 158 207 dmc
- set %quantity 0
- repeat
- {
- finditem %sash C_ , #BACKPACKID
- wait 10
- if #FINDKIND <> -1
- {
- if #findCol <> 0
- {
- Exevent Drag #findid #findstack
- wait 10
- Exevent Dropc *bag
- wait 10
- set %magical %magical + 1
- }
- set %quantity %quantity + 1
- set %total %total + 1
- ignoreItem #FINDID 1
- if %quantity = 33 || %quantity = 66
- {
- Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
- event macro 19 0
- }
- }
- }
- until %quantity = 100
- ignoreitem reset
- return
- ;**************************************************************************
- Sub TailorCloak
- FindItem %sewingkit C_ , #BACKPACKID
- Set #LOBJECTID #FINDID
- event macro 17 0 ;Last Object
- target 5s
- finditem %cloth G_2
- if #findkind = -1
- {
- event sysMessage There is no more cloth around you, script is halting.
- halt
- }
- set #LTARGETID #FINDID
- event macro 22 0
- Repeat
- Until #CONTNAME = generic_gump
- wait 20
- click 119 132 dmc
- wait 20
- click 119 303 dmc
- set %quantity 0
- repeat
- {
- finditem %cloak C_ , #BACKPACKID
- wait 10
- if #FINDKIND <> -1
- {
- if #findCol <> 0
- {
- Exevent Drag #findid #findstack
- wait 10
- Exevent Dropc *bag
- wait 10
- set %magical %magical + 1
- }
- set %quantity %quantity + 1
- set %total %total + 1
- ignoreItem #FINDID 1
- if %quantity = 33 || %quantity = 66
- {
- Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
- event macro 19 0
- }
- }
- }
- until %quantity = 100
- ignoreitem reset
- return
- ;**************************************************************************
- Sub TailorApron
- FindItem %sewingkit C_ , #BACKPACKID
- Set #LOBJECTID #FINDID
- event macro 17 0 ;Last Object
- target 5s
- finditem %cloth G_2
- if #findkind = -1
- {
- event sysMessage There is no more cloth around you, script is halting.
- halt
- }
- set #LTARGETID #FINDID
- event macro 22 0
- Repeat
- Until #CONTNAME = generic_gump
- wait 20
- click 199 361 dmc
- wait 20
- click 159 304 dmc
- set %quantity 0
- repeat
- {
- finditem %apron C_ , #BACKPACKID
- wait 10
- if #FINDKIND <> -1
- {
- if #findCol <> 0
- {
- Exevent Drag #findid #findstack
- wait 10
- Exevent Dropc *bag
- wait 10
- set %magical %magical + 1
- }
- set %quantity %quantity + 1
- set %total %total + 1
- ignoreItem #FINDID 1
- if %quantity = 33 || %quantity = 66
- {
- Event sysmessage You tailored %total pieces of clothing, from which %magical were magical.
- event macro 19 0
- }
- }
- }
- until %quantity = 100
- ignoreitem reset
- return
- ;**************************************************************************
- Sub Selling
- repeat
- {
- event macro 15 30 ;Cast Recall
- wait 6s
- }
- until #TARGCURS = 1
- set #LTARGETID *sellrune
- event macro 22 0 ;Last Target
- wait 30
- ;=====================================================================================
- Brings up the sell all target cursor from the vendor
- ;=====================================================================================
- repeat
- {
- finditem *vendor G_20
- If #FINDID <> -1
- {
- event PathFind #FINDX #FINDY #CHARPOSZ
- wait 60
- }
- wait 20
- set #LOBJECTID *vendor
- event Macro 17 0 ;Last Object
- wait 20
- }
- Until #CONTNAME = generic_gump && #CONTSIZE = 230_318
- click 63 201 DMC ;Sell All Location
- target
- finditem %allclothing C_ , #BACKPACKID
- Set #LTARGETID #FINDID
- event macro 22 0 ;Last Target
- wait 50
- FindItem %sewingkit C_ , #BACKPACKID
- if #FINDCNT < 3
- {
- GoSub BuyKit
- }
- repeat
- {
- event macro 15 30 ;Cast Recall
- wait 6s
- }
- until #TARGCURS = 1
- set #LTARGETID *bluerune
- event macro 22 0 ;Last Target
- wait 30
- set %x #CHARPOSX
- set %y #CHARPOSY
- set %x1 #CHARPOSX - 2
- set %y1 #CHARPOSY - 2
- set %x2 #CHARPOSX + 2
- set %y2 #CHARPOSY + 2
- event PathFind %x1 %y1 #CHARPOSZ
- wait 20
- event PathFind %x2 %y2 #CHARPOSZ
- wait 20
- event PathFind %x %y #CHARPOSZ
- wait 20
- FindItem POF
- If #FINDID <> -1
- {
- Exevent Drag #findid #findstack
- wait 10
- Exevent Dropc *bag
- wait 10
- }
- return
- ;**************************************************************************
- Sub EquipJewel
- if %UseTailorJewel
- {
- set #LOBJECTID *bag
- event macro 17 0 ;Use last object
- wait 20
- Exevent Drag *TailorJewel
- wait 10
- Exevent Droppd
- wait 10
- }
- if %UseMageryJewel
- {
- set #LOBJECTID *bag
- event macro 17 0 ;Use last object
- wait 20
- Exevent Drag *MageryJewel
- wait 10
- Exevent Droppd
- wait 10
- }
- return
- ;**************************************************************************
- Sub UnQuipJewel
- if %UseTailorJewel
- {
- Exevent Drag *TailorJewel
- wait 10
- Exevent Dropc *bag
- wait 10
- }
- if %UseMageryJewel
- {
- Exevent Drag *MageryJewel
- wait 10
- Exevent Dropc *bag
- wait 10
- }
- return
- ;**************************************************************************
- Sub BuyKit
- ;========================================================================
- ;Opens the buy menu of the vendor
- ;========================================================================
- repeat
- {
- finditem *vendor G_20
- wait 20
- set #LOBJECTID *vendor
- event Macro 17 0 ;Last Object
- wait 20
- }
- Until #CONTNAME = generic_gump && #CONTSIZE = 230_318
- Click 87 137
- Wait 1s
- ;========================================================================
- ;Finding sewingkit and buying them
- ;========================================================================
- wait 30
- getShopInfo
- for %r 1 #shopCnt
- {
- getShopInfo
- if #shopItemType = HAG
- {
- click 272 96 d
- setShopItem #shopItemID #shopItemMax
- }
- click 392 205
- }
- click 364 426
- wait 2s
- return
- ;**************************************************************************
- sub hunger
- set %eat N/A
- set %jstart #jIndex
- msg .hunger$
- wait 20
- set %jend #jIndex
- for %ji %jstart %jend
- {
- scanjournal %ji
- if watch_your_weight in #journal
- return
- if three_square_meals in #journal
- return
- if Your_diet_is_consistent in #journal
- set %eat 1
- if Even_thought_you_are_not_starving,_some_food_would_be_welcome. in #journal
- set %eat 3
- if stomach_is_growling in #journal
- set %eat 6
- if Are_you_Anorexic in #journal
- set %eat 8
- }
- if %eat = N/A
- return
- finditem %food c_
- set #LOBJECTID #FINDID
- for %i 1 %eat
- {
- event macro 17
- wait 20
- }
- }
- else
- return
- return
- ;**************************************************************************
- ;************************* End of Script **********************************
- ;**************************************************************************
Add Comment
Please, Sign In to add comment