-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathtrain_Healing.py
60 lines (44 loc) · 1.92 KB
/
train_Healing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'''
Author: TheWarDoctor95
Other Contributors:
Last Contribution By: TheWarDoctor95 - March 20, 2019
Description: Uses bandages on a player's ghost to train Healing
'''
from Scripts.config import targetClearDelayMilliseconds
from Scripts.glossary.items import FindBandage
from Scripts.glossary.colors import colors
def TrainHealing():
'''
Trains Healing to the skill cap
'''
if Player.GetRealSkillValue( 'Healing' ) == Player.GetSkillCap( 'Healing' ):
Misc.SendMessage( 'You\'ve already maxed out Healing!', colors[ 'green' ] )
return
bandages = FindBandage( Player.Backpack )
if bandages == None:
Misc.SendMessage( 'No bandages to train with', colors[ 'red' ] )
return
ghost = Target.PromptTarget( 'Select ghost to train on' )
Mobiles.Message( ghost, colors[ 'cyan' ], 'Selected for Healing training' )
Journal.Clear()
while Player.GetRealSkillValue( 'Healing' ) < Player.GetSkillCap( 'Healing' ):
# Clear any previously selected target and the target queue
Target.ClearLastandQueue()
# Wait for the target to finish clearing
Misc.Pause( targetClearDelayMilliseconds )
Items.UseItem( bandages )
Target.WaitForTarget( 2000, True )
Target.TargetExecute( ghost )
# Wait for a journal entry to come up stating that the bandage application has finished
while not ( Journal.SearchByType( 'You are unable to resurrect your patient', 'Regular' ) or
Journal.SearchByType( 'You are able to resurrect your patient', 'Regular' ) ):
Misc.Pause( 100 )
Journal.Clear()
bandages = FindBandage( Player.Backpack )
if bandages == None:
Misc.SendMessage( 'Ran out of bandages to train with', colors[ 'red' ] )
return
Misc.Pause( 50 )
Misc.SendMessage( 'Healing training complete!', colors[ 'green' ] )
# Start Healing training
TrainHealing()