-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathPotion_SmartPot_Sallos.py
33 lines (30 loc) · 1.06 KB
/
Potion_SmartPot_Sallos.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
# Sallos SmartPot by MatsaMilla
# Drinks cure if poisoned, otherwise drinks heal
def potDrink():
if Player.Poisoned:
Player.ChatSay( 1 , '[drink greatercurepotion')
Misc.Pause(100)
if Journal.Search( 'You do not have any of those potions.'):
Player.HeadMessage(33, "No Cure pots!")
else:
Player.ChatSay( 1 , '[drink greaterhealpotion')
Misc.Pause(100)
if Journal.Search( 'You do not have any of those potions.'):
Player.HeadMessage(33, "No Heal pots!")
def usePot():
if Player.Poisoned:
orangePot = Items.FindByID(0x0F07,0,Player.Backpack.Serial,True)
if orangePot:
Items.UseItem(orangePot)
else:
Player.HeadMessage(33, "No Cure pots!")
else:
yellowPot = Items.FindByID(0x0F0C,0,Player.Backpack.Serial,True)
if yellowPot:
Items.UseItem(orangePot)
else:
Player.HeadMessage(33, "No Heal pots!")
if Misc.ShardName() == "Ultima Forever" or Misc.ShardName() == "UOForever":
potDrink()
else:
usePot()