sub dress start bandages regs potions arrows horse mm blood restores h

  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
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
sub dress.start( bandages, regs, potions, arrows, horse, mm, blood, restores, healstones, race, armor, gs, crystal, bow )
if uo.dead() then
uo.msg( '.home' )
wait( 10000 )
endif
var plen = 5
dim packIndex[val(str(plen))]
packIndex[0] = '1' ; 100 band
packIndex[1] = '2' ; 1 potions
packIndex[2] = '3' ; 1 reg
packIndex[3] = dress.horse( horse )
packIndex[4] = '6' ; 100 arr
dim packItems[val(str(plen))]
packItems[0] = bandages
packItems[1] = potions
packItems[2] = regs
packItems[4] = arrows
dim packTypes[val(str(plen))]
packTypes[0] = '0x0E21'
packTypes[1] = '0x09B0'
packTypes[2] = '0x0E76'
packTypes[4] = '0x0F3F'
if uo.countground('0x0ED4') then
uo.set('finddistance','3')
var i,n,j
var equip_stone = dress.getStone('0x079B', false)
var armor_stone = dress.getStone('0x0ED4', false)
var weapon_stone = dress.getStone('0x04B0', false)
var guild_stone = dress.getStone('-1', true)
if not uo.ObjAtLayer('Torso') or uo.count('0x0EFA') == 0 then ; pack check
use( 'backpack' )
wait(5)
endif
for i = 0 to plen - 1
if i == 3 then
if not uo.ObjAtLayer('Horse') then
uo.recall( equip_stone, packIndex[i] )
repeat
wait(5)
until uo.ObjAtLayer('Horse')
endif
else
if packItems[i] then
while ( uo.count( packTypes[i] ) <> packItems[i] )
uo.recall( equip_stone, packIndex[i] )
deljournal( 'You put' )
repeat
wait(5)
until uo.injournal( 'You put' )
wend
endif
endif
next
if not gs then
var pvp = get('ch_pvp'), armindex
if pvp == 'N/A' then
pvp = dress.setPVP( armor_stone )
endif
if armor == 'auto' then
if race == 'n' || race == 'a' then
# ama arm
# leather arm
else
uo.recall( armor_stone, dress.getArmorIndex(val(pvp)) )
endif
else
uo.recall( armor_stone, armor )
endif
else
endif
if crystal then
uo.recall( armor_stone, 11 )
wait(5)
endif
dress.equipRaceItems( race )
endif
uo.msg( 'dress script by Korzhik' )
endsub
sub dress.getArmorIndex( p )
var r = 1
dim a[7]
a[0] = 270
a[1] = 215
a[2] = 155
a[3] = 65
a[4] = 35
a[5] = 15
dim r[7]
r[0] = '7'
r[1] = '6'
r[2] = '5'
r[3] = '4'
r[4] = '3'
r[5] = '2'
for var i = 0 to 5
if p > a[i] then
return r[i]
endif
next
return '1'
endsub
sub dress.equipRaceItems( race )
endsub
sub dress.setPVP( s )
use(s)
while uo.LastGump('replyed') <> 0
wait(5)
wend
var s = uo.LastGump('text', 17)
uo.rclick(189,275)
return set('ch_pvp', explode(s, ' ', 2))
endsub
sub dress.getStone(c,g)
var t = '0x0ED4'
if g then
t = '0x151C'
endif
uo.findtype ( t, c, 'ground' )
return uo.getsearial( 'finditem' )
endsub
sub dress.horse(n)
dim s[4]
s[0] = 'l'
s[1] = 'cl'
s[2] = 'z'
s[3] = 'cz'
dim r[4]
r[0] = 8
r[1] = 10
r[2] = 4
r[3] = 5
for var i = 0 to 3
if s[i] == n then
return r[i]
endif
next
return r[0]
endsub