Kód: Vybrat vše
#---------------------------------------------
sub odemkni()
#---------------------------------------------
uo.print('Co chces odemknout?')
uo.addobject('Truhla')
while uo.targeting()
wait(100)
wend
If UO.GetGraphic('Truhla')=='0x0000' then
return
endif
if not UO.Hidden() then
uo.sayu('Odemykam...')
else
uo.print('Odemykam...')
endif
repeat
uo.deletejournal()
uo.waitTargetObject('Truhla')
uo.usetype('0x14FB')
repeat #opatreni vuci ws
wait(100)
until uo.inJournal('What do you want')
repeat
wait(100)
until uo.injournal('attempt to unlock|You broke|This item cannot be')
wait(200)
until uo.injournal('This item cannot be|No item') OR UO.Count('0x14FB')==0
if UO.Count('0x14FB') >0 then
IF NOT UO.Hidden() then
uo.say('Odemceno, zatim neotvirat!')
else
uo.print('Odemceno')
endif
else
IF NOT UO.Hidden() then
uo.sayu('Dosly locky')
else
uo.print('Dosly locky')
endif
endif
end sub