Yoko

All sides of Injection
It is currently 2025-11-06 15:37:32

All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Stand by script
PostPosted: 2004-06-16 02:46:06 
Offline

Joined: 2004-05-08 00:34:20
Posts: 9
I have tried many times to make my script stay in "stand by". When a certain phrase appears in the journal, my character should do an action.

ex: with the script already running, if i say $, my char casts in lor on me


Top
   
 Post subject:
PostPosted: 2004-06-16 10:51:27 
Offline
Expert!

Joined: 2004-04-25 11:11:07
Posts: 359
Code:
uo.deletejournal()
while 1
  var cmd = " cast on me " #syntax - <name> cast on me <spell>
  var index = uo.injournal(cmd)
  var s = uo.journal(index)
  var myname = uo.getname()
  if index and index == uo.injournal(myname) then
    uo.waittargetobject(uo.journalserial(index))
    uo.exec("cast " +right(s,len(s)-len(myname)-len(cmd)))
    wait(3000)
  endif
  wait(50)
wend

_________________
Без труда не выловишь и рыбку из пруда,
А без пруда не выловишь её и с трудом...


Last edited by Lord Ruslan Nightmare on 2004-06-18 08:10:34, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2004-06-16 15:03:12 
Offline
Site Admin
User avatar

Joined: 2004-04-03 16:49:38
Posts: 1964
wait(50) after while or before wend, elsewhere script will cause lags (empty cycle)


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

All times are UTC+02:00


Who is online

Users browsing this forum: Bing [Bot] and 2 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