Yoko

All sides of Injection
It is currently 2025-11-06 15:54:59

All times are UTC+02:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: 2005-07-08 13:36:11 
Offline
User avatar

Joined: 2004-09-05 10:41:06
Posts: 57
Code:
sub Portal()
UO.exec("warmode 0")
var portal='0x1183'
uo.usefromground(portal)
 if uo.hp<uo.str or uo.injournal('No item found','You can't do it in current state!')
 then
  return
UO.Print('5')
wait (1000)
UO.Print('4')
wait (1000)
UO.Print('3')
wait (1000)
UO.Print('2')
wait (1000)
UO.Print('1')
wait (1000)
UO.Print('GO')
UO.exec("warmode 0")
wait (1000)
UO.exec("warmode 0")
end sub


Вот я тут накуралесил основная задача в том , чтобы Есле lastmsg =
You can't do it in current state! или No item found
то он отменял запрос , можно ли исправить мою мазню?


Top
   
 Post subject:
PostPosted: 2005-07-08 13:57:34 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
Code:
if uo.hp<uo.str or uo.injournal('No item found','You can't do it in current state!') 
 then


Измени на

Code:
if uo.hp<uo.str or uo.injournal('No item found')  OR UO.InJournal('You can't do it in current state!')  then


Top
   
 Post subject:
PostPosted: 2005-07-08 14:01:04 
Offline
User avatar

Joined: 2004-09-05 10:41:06
Posts: 57
всеравно ошибку выдаёт там получилось так

Code:
sub Portal()
UO.exec("warmode 0")
var portal='0x1183'
uo.usefromground(portal)
if uo.hp<uo.str or uo.injournal('No item found')  OR UO.InJournal('You can't do it in current state!')
 then
return
UO.Print('5')
wait (1000)
UO.Print('4')
wait (1000)
UO.Print('3')
wait (1000)
UO.Print('2')
wait (1000)
UO.Print('1')
wait (1000)
UO.Print('GO')
UO.exec("warmode 0")
wait (1000)
UO.exec("warmode 0")
end sub



в твоей строке ошибку даёт.


Top
   
 Post subject:
PostPosted: 2005-07-08 14:04:08 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
ты забыл EndIf


Top
   
 Post subject:
PostPosted: 2005-07-08 14:06:35 
Offline
User avatar

Joined: 2004-09-05 10:41:06
Posts: 57
Code:
sub Portal() 
UO.exec("warmode 0")
var portal='0x1183'
uo.usefromground(portal)
if uo.hp<uo.str or uo.injournal('No item found')  OR UO.InJournal('You can't do it in current state!')
 then
return
endif
UO.Print('5')
wait (1000)
UO.Print('4')
wait (1000)
UO.Print('3')
wait (1000)
UO.Print('2')
wait (1000)
UO.Print('1')
wait (1000)
UO.Print('GO')
UO.exec("warmode 0")
wait (1000)
UO.exec("warmode 0")
end sub


тоесть тогда так , но ошибка всеравно вылазиет
в твоей строке.


Top
   
 Post subject:
PostPosted: 2005-07-08 14:08:03 
Offline
User avatar

Joined: 2004-09-05 10:41:06
Posts: 57
я думаю там ошибка if uo.hp<uo.str чтото наверно не правильно
может лучше сделать так
if uo.hp<170хелпоинтов , токо я хз как это написать ?!


Top
   
 Post subject:
PostPosted: 2005-07-08 14:52:33 
Offline
Expert!
User avatar

Joined: 2004-08-11 23:56:17
Posts: 746
Location: The Citadel
А вообще-то нет такой функции, как UO.HP
Используй UO.Life


Top
   
 Post subject:
PostPosted: 2005-07-11 07:18:49 
Offline
Expert!
User avatar

Joined: 2005-04-23 10:19:43
Posts: 388
И еще:
Было:
Code:
('You can't do it in current state!')

Нужно:
Code:
("You can't do it in current state!")

Это так как в предложении апостроф.


Top
   
 Post subject:
PostPosted: 2005-07-12 01:14:40 
Offline
Expert!
User avatar

Joined: 2004-10-15 22:38:04
Posts: 1396
Location: Moscow City.
Вот почему я почти вседа юзаю двойные ковычки :lol:


Top
   
 Post subject:
PostPosted: 2005-07-12 08:09:43 
Offline
User avatar

Joined: 2004-09-05 10:41:06
Posts: 57
только всеравно не помогло :(


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited