Yoko

All sides of Injection
It is currently 2026-01-02 14:14:21

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2009-06-21 02:33:24 
Offline

Joined: 2009-06-21 02:26:06
Posts: 2
Ветровский ламбер, все его уже на изусть наверно знают. Проблема такая
[code]
Sub WaitForChange()
var Text1=uo.GetName()+': You hack at the tree for a while, but fail to produce any useable wood.'
var Text2='There are no logs here to chop.'
var Text3="You can't reach this."
var Text4="That is too far away."
var Text5="You can't do much in your current state."
var Text6='There is no wood left to harvest.'
var mess
for var i=0 to 200
mess=uo.Journal(0)
if uo.Journal(0)==Text2 or uo.Journal(0)==Text3 or uo.Journal(0)==Text4 OR uo.Journal(0)==Text6 then
return 1
end if
if uo.Journal(0)==Text1 then
return 0
end if
if mess[0]=='Y' and mess[1]=='o' and mess[2]=='u' and mess[4]=='p' and mess[5]=='u' and mess[6]=='t' then
return 0
end if
wait(50)
next
return 0
end sub
[/code]

Когда с дерева срубается лог без задержки он начинает рубить заново, когда в дереве нет больше логов он идет к другому....
Когда же возникла неудачная попытка срубки лога, возникает дикая задержка... Перечитал текст сообщения раз 20, писал от руки, смотрел в другие скрипты, результата нету, кто нить мне подскажет чего я не досмотрел? Может надо поставить скобки?[/code]


Top
   
 Post subject:
PostPosted: 2009-06-22 08:16:27 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
зачем писать сообщения полностью?

var Text1='any useable wood'
var Text2='no logs'
var Text3='reach this'
var Text4='far away'
var Text5='current state'
var Text6='left to harvest'

Вот так пробуй.

Потому что даже отсутствие или присутствие точки вызывает невидимость заданного сообщения.


Top
   
 Post subject:
PostPosted: 2009-06-22 21:31:15 
Offline

Joined: 2006-08-10 08:25:32
Posts: 106
Mirage wrote:
зачем писать сообщения полностью?

var Text1='any useable wood'
var Text2='no logs'
var Text3='reach this'
var Text4='far away'
var Text5='current state'
var Text6='left to harvest'

Вот так пробуй.

+1

Quote:
Потому что даже отсутствие или присутствие точки вызывает невидимость заданного сообщения.

не говоря уже о опечатках/неправильном регистре.


Top
   
 Post subject:
PostPosted: 2009-06-22 22:07:30 
Offline

Joined: 2009-06-21 02:26:06
Posts: 2
Незнаю мне это не помогло... Помог только такой способ:
[code]sub WaitForChange()
var mess
for var i=0 to 200
mess=uo.Journal(0)
if uo.injournal('There are no logs left here to chop.') then
return 1
endif
if uo.injournal('away to chop.') then
return 1
endif
if uo.injournal('reach this') then
return 1
endif
if uo.InJournal('but fail') then
return 0
end if
if mess[0]=='Y' and mess[1]=='o' and mess[2]=='u' and mess[4]=='p' and mess[5]=='u' and mess[6]=='t' then
return 0
end if
wait(50)
next
return 0
end sub[/code]
Так и не понял почему инжа не принимала стаый код, впринципе тут тоже самое но прописано по отдельности... Странности какие то :)


Top
   
 Post subject:
PostPosted: 2009-06-23 13:07:37 
Offline

Joined: 2009-06-11 14:06:40
Posts: 30
эм кинь полный скрипт правельный .. у меня также проблема .. =(


Top
   
 Post subject:
PostPosted: 2009-06-25 13:08:24 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
все чудесатее и чудесатее :D

Если ты используешь простые сообщения то можно делать так
Code:
f uo.injournal('There are no logs left here to chop|away to chop|reach this') then
return 1
endif

Если задаешь константы на каждое сообщение то надо разделять либо как у Ветра либо как у Дестракшена:
Code:
var Text1='no logs'
var Text2="reach this"
if uo.Journal(Text1 +'|' +Text2) then
return 1
end if


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 3 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