Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;==========================================
- ; Vash Healer 4.0
- ;==========================================
- ;
- ; IMPORTANTE:
- ; -----------
- ; 1- Tenere sempre zaino e status aperti.
- ; 2- Attivare il Targeting System con l'apposita macro client.
- ; 3- Disattivare l'auto-accoda azioni di Razor.
- ; 4- Compatibile oslo con RunUO 2.0 e shard OSI-Style.
- ;
- ; Ecco le features dello script:
- ; ------------------------------
- ; 1) Avverte se le bende stanno per finire, e se finiscono
- ; č sufficiente rifornirsi, senza doverlo riavviare.
- ; 2) Controlla il journal per verificare che le bende siano
- ; state correttamente applicate, altrimenti riprova.
- ; 3) Mostra il tempo di bendata sulla testa del pg.
- ; 4) Potete precastare magie, e finchč c'č il target fuori,
- ; lo script non benderŕ.
- ; 5) Scarissima interferenza con i target delle spell.
- ; 6) Non benda da hiddati, per non venire revelati.
- ; 7) La bendata entrerŕ in azione subito dopo un mortal strike in modo da finire,
- ; se possibile, poco dopo la fine dell'effetto.
- ; 8) Auto cure e auto refresh.
- ;
- ; Fate il setup qui sotto, ricordando che vero č #true e falso č #false.
- ; SETUP
- ; -----
- ; Settando counter a true, avrete il contatore sopra la testa del pg.
- set %counter #true
- ; La prossima variabile indica il limite di hp al di sotto dei quali curare.
- ; Mettendo 5 ad esempio, se avete 100hp, benderŕ solo al di sotto di 95hp.
- set %limit 5
- ; ANTIMORTAL
- ; ----------
- ; Se avete problemi con l'antimortal settato a 62, mettetelo a 64.
- ; Puň essere utile in caso di pc vecchio, lag, ecc.
- set %antimortal 64
- ; POZIONI
- ; --------
- ; Qui avete due variabili da settare #true o #false.
- ; La prima farŕ bere in automatico allo script le pozze cure.
- ; La seconda berrŕ in automatico pozze refresh.
- set %cure #true
- set %refresh #true
- ; Se avete settato l'auto-refresh, settate al di sotto di quale
- ; valore della stamina č necessario berle:
- set %stamina 30
- ; Sconsiglio vivamente queste opzioni su pg arciere, in quanto
- ; potreste bere in automatico la pozza in un momento critico,
- ; e non č bello venire disarmati in momenti critici.
- ; Adesso, a seconda che utilizziate Razor o Injection e vogliate
- ; usare l'autocure o l'autorefresh, dovete farvi due macro.
- ; Una macro deve togliere scudo (o arma o libro) e bere la pozza cure,
- ; l'altra deve bere la pozza refresh.
- ; Dopodichč scrivete il nome della macro o della sub qui:
- set %macroCure drinkCure
- set %macroRefresh drinkRefresh
- ; Infine, c'č quest'ultima variabile. Metti #true se utilizzi razor,
- ; altrimenti se utilizzi injection metti #false.
- set %razor #false
- ; Abbiamo finito il setup.
- ;==========================================
- ;==========================================
- ; Main Loop
- ; ---------
- set #lpc 30
- set %mortal #false
- if %cure
- {
- if %razor
- set %cureCmd -Macro , #spc , %macroCure
- else
- set %cureCmd ,exec , #spc , %macroCure
- }
- if %refresh
- {
- if %razor
- set %refCmd -Macro , #spc , %macroRefresh
- else
- set %refCmd ,exec , #spc , %macroRefresh
- }
- set %lastStamina #scnt
- _mainloop:
- if yes in #charghost
- {
- wait 1s
- goto _mainloop
- }
- if ( ( ( #hits < ( #maxhits - %limit ) ) || C in #charstatus ) && H notin #charstatus )
- {
- set %hasRefresh #false
- set %hasCure #false
- finditem NUF C_ , #backpackid
- if #findcnt > 0
- set %hasCure #true
- finditem ZUF C_ , #backpackid
- if #findcnt > 0
- set %hasRefresh #true
- GoSub CheckAids
- if #result = #true
- {
- if #targcurs = 1
- GoSub WaitCurs 0
- set %delay ( ( 11 - ( #dex / 20 ) ) * 10 )
- GoSub Apply
- if #result = #false
- goto _mainloop
- GoSub Waitnew
- wait 1
- }
- }
- goSub CheckStamina
- sleep 10
- goto _mainloop
- ;==========================================
- ;==========================================
- ; SUB WAITCURS
- ; ------------
- ; A questa sub si passano 1 o 2 argomenti.
- ; Il primo puň essere 1 o 0. Sta ad indicare
- ; il valore di #targcurs desiderato.
- ; Il secondo, opzionale, indica un timeout in decimi
- ; di secondo. In ogni caso, per evitare che rimanga
- ; all'infinito, c'č un timeout di base di 100 secondi.
- Sub WaitCurs
- if %0 = 2
- set %waitTimeout #scnt2 + %2
- else
- set %waitTimeout #scnt2 + 1000
- while #targcurs <> %1
- {
- if #scnt2 > %waitTimeout
- return #false
- sleep 5
- }
- if %1 = 0
- wait 2 ; per non far fizzare il target appena lanciato
- return #true
- ;==========================================
- ;==========================================
- ; SUB CHECKAIDS
- ; -------------
- ; Controlla che ci siano bende nello zaino.
- ; Avverte se ne rimangono meno di 10.
- ; Mette lo script in attesa quando finiscono.
- ; Setta la variabile %aids.
- Sub CheckAids
- finditem ZLF CA_ , #BACKPACKID
- if #findstack = 0
- {
- event ExMsg #charID 3 0 No bandages found!
- wait 3s
- return #false
- }
- if #findstack < 10 && #findcnt < 2
- event sysmessage ATTENZIONE! Ti rimangono solo #findstack bende!
- set %aids #findid
- return #true
- ;==========================================
- ;==========================================
- ; SUB APPLY
- ; ---------
- ; NOTA: serve la variabile %aids.
- ; Questa sub benda il pg, facendo controlli
- ; di sicurezza per verificare che le bende siano state
- ; effettivamente applicate.
- Sub Apply
- _aidloop:
- if yes in #charghost
- return #false
- set %startIndex #jindex
- finditem ZLF C_ , #BACKPACKID
- set #LOBJECTID #FINDID
- event Macro 17 0
- set %gowienko #SCNT + 2
- while #targcurs = 0
- {
- if %gowienko <= #SCNT
- return #false
- }
- event Macro 23 0
- set %start #scnt2
- wait 1
- if you_begin_applying in #sysmsg
- return #true
- GoSub WaitStartMsg 3
- if #result <> 1
- return #false
- return #true
- ;==========================================
- ;==========================================
- ; SUB WAITSTARTMSG
- ; ----------------
- ; Attende il messaggio di bendata.
- ; Vuole un argomento, il timeout in decimi di secondo.
- ; Restituisce 1 se benda, 0 se non č possibile bendare il pg,
- ; e -1 se le bende non entrano in azione completamente.
- Sub WaitStartMsg
- set %sysTimeout #scnt2 + %1
- _waitsysmsgloop:
- if #jindex > %startIndex
- {
- set %startIndex %startIndex + 1
- scanjournal %startIndex
- if you_begin_applying in #journal
- return 1
- if that_being in #journal
- return 0
- goto _waitsysmsgloop
- }
- if #scnt2 < %sysTimeout
- {
- sleep 5
- goto _waitsysmsgloop
- }
- return -1
- ;==========================================
- ;==========================================
- ; SUB WAITNEW
- ; ----------------
- Sub WaitNew
- set %keypressed 0
- set %end %delay + %start + 1
- set %limitcure %end - 17
- set %oldremaining 10
- wait 2
- _waitloop:
- if %counter
- {
- set %remaining ( ( %end - #scnt2 ) / 10 ) + 1
- if %remaining <> %oldremaining
- {
- event ExMsg #charID 3 0 %remaining
- set %oldremaining %remaining
- }
- }
- if D in #charstatus && %mortal = #false
- {
- set %mortal #true
- set %mortend #scnt2 + %antimortal
- _mortloop:
- if ( ( %delay + #scnt2 ) > %mortend )
- return
- sleep 10
- goto _mortloop
- }
- wait 1
- if C in #charstatus && %cure = #true && %hasCure = #true
- {
- if #scnt2 > %limitcure && %keypressed = 0
- {
- msg $
- wait 1
- msg %cureCmd $
- set %keypressed 1
- }
- }
- goSub CheckStamina
- if #scnt2 >= %end + 2 || you_finish_applying in #sysmsg || you_apply_the in #sysmsg || you_heal in #sysmsg || the_bleeding in #sysmsg || you_have_failed in #sysmsg
- {
- if %mortal
- set %mortal #false
- return
- }
- goto _waitloop
- return ; giusto per essere sicuri
- ;==========================================
- ;==========================================
- ; SUB CHECKSTAMINA
- ; ----------------
- Sub CheckStamina
- if %refresh = #false || %hasRefresh = #false
- return
- if ( #stamina < %stamina )
- {
- if ( #scnt > ( %lastStamina + 3 ) )
- {
- set %lastStamina #scnt
- msg $
- wait 1
- msg %refCmd $
- }
- }
- return
- ;==========================================__________________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement