Page 1 of 1
Stand by script
Posted: 2004-06-16 02:46:06
by lixo
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
Posted: 2004-06-16 10:51:27
by Lord Ruslan Nightmare
Code: Select all
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
Posted: 2004-06-16 15:03:12
by Yoko
wait(50) after while or before wend, elsewhere script will cause lags (empty cycle)