Ho provato a creare questo script per fare potion keg, se avete un poco di tempo vi chiedo se potete testarlo e dirmi come vi sembra, non posso testarlo io perchè sto ancora skillando carpentery per craftare Keg.
Ditemi se è troppo lento e se c'è bisogno di aggiustare qualche cosa...
codice:
;------------------------ ;-- Drael Keg Crafting -- ;------------------------ ;-- Autore: Drael ------ ;-- Versione: 0.7 ------ ;------------------------ ; -- Variabili globali usate: *DraelResSecure, *DraelKegSecure Set %ResSecure *DraelResSecure Set %KegSecure *DraelKegSecure Set %M 0 GoSub ShowMenu Loop: GoSub DragDrop %SecureRisorse #BackPackID TLK 27 Wait 10 GoSub DragDrop %SecureRisorse #BackPackID ENK 7 Wait 10 GoSub DragDrop %SecureRisorse #BackPackID WUF 10 Wait 10 GoSub ClickMenu 30 90 235 90 BTL 3 ZHG_EGG #BackPackID 530_437 CNT Wait 10 GoSub ClickMenu 30 90 235 110 OJL 3 ZHG_EGG #BackPackID 530_437 CNT Wait 10 GoSub ClickMenu 30 130 235 170 DJL 1 KTL #BackPackID 530_437 CNT Wait 10 GoSub ClickMenu 30 130 235 110 IEG 1 KTL #BackPackID 530_437 CNT Wait 10 GoSub ClickMenu2 30 130 230 250 JKF 1 ZHG_EGG #BackPackID 530_437 CNT 385 270 Wait 10 GoSub ClickMenu 30 210 235 210 QMJ 1 KTL #BackPackID 530_437 CNT Wait 10 GoSub DragDrop #BackPackID %KegSecure QMJ 1 Wait 10 Set %M %M + 1 Menu Set Costruiti %M Costruiti If %M = %KegMake Halt GoTo Loop ;----------------------------------------- ;-- Sub Drag e Drop di Drael -- ;----------------------------------------- ;-- Autore: Drael ------------------------ ;-- Versione: 1.0 ------------------------ ;----------------------------------------- ; GoSub DragDrop Secure Bag Type Stack Sub DragDrop Set %Secure %1 Set %Secure2 %2 Set %Type %3 Set %Stack %4 RipetiDrag: Set #lObjectID %Secure Event Macro 17 Wait 1s ScanJournal 1 If I_can't_reach_that. in #Journal { FindItem %Secure G_25 Move #FindX #FindY 1 Set #lObjectID %Secure Event Macro 17 } While #ContID <> %Secure GoTo RipetiDrag FindItem %Type C_ . %Secure If #FindKind = -1 Return #False ExEvent Drag #FindID %Stack Wait 10 ExEvent DropC %Secure2 Return ;----------------------------------------- ;-- Sub Apri Menu e Costruisci di Drael -- ;----------------------------------------- ;-- Autore: Drael ------------------------ ;-- Versione: 1.0 ------------------------ ;----------------------------------------- ; GoSub ClickMenu X Y X2 Y2 Type Stack Tool Bag SizeMenu Sub ClickMenu Set %X %1 Set %Y %2 Set %X2 %3 Set %Y2 %4 Set %Type %5 Set %Stack %6 Set %Tool %7 Set %Bag %8 Set %Size %9 Set %FindStack %10 ;Set %Stack %Stack - 1 RipetiMenu: FindItem %Type C_ . %Bag If #FindCnt = %Stack && %FindStack = CNT Return If #FindStack = %Stack && %FindStack = Stack Return FindItem %Tool C_ . %Bag If #FindKind = -1 { GoSub DragDrop %SecureRisorse #BackPackID %Tool 1 FindItem %Tool C_ . %Bag If #FindKind = -1 { Event SysMessage Errore! Lo strumento non è stato trovato! Return #False } } Set #lObjectID #FindID Event Macro 17 Wait 10 While #ContSize <> %Size Wait 1s Else { FindItem %Tool C_ . %Bag Set #lObjectID #FindID Event Macro 17 } Set %XX #ContPosX + %X Set %YY #ContPosY + %Y Click %XX %YY Wait 10 While #ContSize <> %Size Wait 1s Set %XX #ContPosX + %X2 Set %YY #ContPosY + %Y2 Click %XX %YY Wait 1s FindItem %Type C_ . %Bag If #FindKind = -1 { Wait 1s GoTo RipetiMenu } If #FindCnt < %Stack && %FindStack = CNT GoTo RipetiMenu If #FindStack < %Stack && %FindStack = Stack GoTo RipetiMenu Return ;----------------------------------------- ;----------------------------------------- ;-- Sub Apri Menu e Costruisci di Drael -- ;----------------------------------------- ;-- Autore: Drael ------------------------ ;-- Versione: 1.1 ------------------------ ;----------------------------------------- ; GoSub ClickMenu X Y X2 Y2 Type Stack Tool Bag SizeMenu Sub ClickMenu Set %X %1 Set %Y %2 Set %X2 %3 Set %Y2 %4 Set %Type %5 Set %Stack %6 Set %Tool %7 Set %Bag %8 Set %Size %9 Set %FindStack %10 Set %X3 %11 Set %Y3 %12 Set %Stack %Stack - 1 RipetiMenu: FindItem %Type C_ . %Bag If #FindCnt = %Stack && %FindStack = CNT Return If #FindStack = %Stack && %FindStack = Stack Return FindItem %Tool C_ . %Bag If #FindKind = -1 { GoSub DragDrop %SecureRisorse #BackPackID %Tool 1 FindItem %Tool C_ . %Bag If #FindKind = -1 { Event SysMessage Errore! Lo strumento non è stato trovato! Return #False } } Set #lObjectID #FindID Event Macro 17 Wait 10 While #ContSize <> %Size Wait 1s Else { FindItem %Tool C_ . %Bag Set #lObjectID #FindID Event Macro 17 } Set %XX #ContPosX + %X Set %YY #ContPosY + %Y Click %XX %YY Wait 10 While #ContSize <> %Size Wait 1s Set %XX #ContPosX + %X3 Set %YY #ContPosY + %Y3 Click %XX %YY Wait 10 While #ContSize <> %Size Wait 1s Set %XX #ContPosX + %X2 Set %YY #ContPosY + %Y2 Click %XX %YY Wait 1s FindItem %Type C_ . %Bag If #FindKind = -1 { Wait 1s GoTo RipetiMenu } If #FindCnt < %Stack && %FindStack = CNT GoTo RipetiMenu If #FindStack < %Stack && %FindStack = Stack GoTo RipetiMenu Return ;----------------------------------------- ;-- Menu -- ;----------------------------------------- sub ShowMenu menu Clear menu Window Title Drael's Keg Crafting menu Window Color BtnFace menu Window Size 263 138 menu Font Transparent #true menu Font Align Right menu Shape EUOShape1 4 4 257 21 3 7 1 AppWorkSpace 7 BtnFace menu Font Name MS Sans Serif menu Font Size 8 menu Font Style menu Font Color WindowText menu Font Transparent #false menu Font Align Left menu Text EUOLabel1 80 8 Drael's Keg Crafting menu Shape EUOShape2 4 28 257 53 3 7 1 AppWorkSpace 7 BtnFace menu Text EUOLabel2 8 36 Secure Risorse: menu Text EUOLabel3 8 60 Secure Keg: menu Shape EUOShape3 4 84 257 29 3 7 1 AppWorkSpace 7 BtnFace menu Text EUOLabel4 8 92 Keg da costruire: menu Text Costruiti 180 92 %M Costruiti menu Font BGColor Window menu Edit Secure 96 32 109 %ResSecure menu Edit KegSecure 96 56 109 %KegSecure menu Font BGColor BtnFace menu Button Set 208 32 49 21 Set menu Button Set2 208 56 49 21 Set menu Font BGColor Window menu Edit KegMake 96 88 73 1 menu Font BGColor BtnFace menu Button Costruisci 4 116 257 21 Costruisci Potion Keg menu Show 540 460 While #MenuButton <> N/A2 { If #MenuButton = Set { Event SysMessage Seleziona il secure con le risorse! Set #TargCurs 1 While #TargCurs = 1 Wait 1s Set %SecureRisorse #lTargetID Set %ResSecure #lTargetID Set *DraelResSecure %ResSecure Set #MenuButton N/A menu Set Secure %ResSecure } If #MenuButton = Set2 { Event SysMessage Seleziona il secure dove depositare i Keg! Set #TargCurs 1 While #TargCurs = 1 Wait 1s Set %KegSecure #lTargetID Set *DraelKegSecure %KegSecure Set #MenuButton N/A menu Set KegSecure %KegSecure } If #MenuButton = Costruisci { Set %SecureRisorse *DraelResSecure Set %KegSecure *DraelKegSecure menu GetNum KegMake 1 Set %KegMake #MenuRes Set #MenuButton N/A return } } ;-----------------------------------------
Commenta