Yoko
http://forum.yoko.com.ua/

Wait for spell
http://forum.yoko.com.ua/viewtopic.php?f=3&t=8292
Page 1 of 1

Author:  Knight1106 [ 2006-07-21 22:07:25 ]
Post subject:  Wait for spell

Is there any comand that shows if the character is casting or not a spell ?
Like uo.poisoned() shows if the character is poisoned or not...
I was needing it in this script, because with "wait" there is a chance to frizzle the spell because of the lag...


Code:
sub F3() #Disturb
loop:
 uo.cast('Weaken','laststatus')
 while Uo.casting()
 wait(10)
 wend
goto loop
end sub


if anyone understood me, plz help...

thanks

Author:  DerMeister =) [ 2006-07-21 22:29:28 ]
Post subject: 

You may use something like this:
Code:
sub F3() #Disturb 
loop:
 uo.cast('Weaken','laststatus')
 while uo.waiting()
 wait(100)
 wend
goto loop
end sub


PS: There is no any special command that shows if the character is casting a spell =_(

Author:  knicholes [ 2006-08-21 00:46:34 ]
Post subject:  Try this one

This code is called right after you cast a spell. It will wait until you lose mana or if it fizzles.


Code:
##### Waits until you lose mana #################
sub lostmana()
var current
current = UO.MANA
while UO.MANA >= current
if UO.InJournal("fizzle") then
return
endif
wait(100)
wend
end sub


Author:  Nmy [ 2006-08-21 01:03:55 ]
Post subject: 

Code:
sub F3() #Disturb
VAR m
 m=uo.mana
 uo.cast('Weaken','laststatus')
 repeat
 wait(5)   
 until uo.mana<m
end sub


but there is no sense in that script

Author:  knicholes [ 2006-08-21 02:25:49 ]
Post subject: 

To cast the spell over and over again, the best way to code this would be:

NMY wrote:
Code:
sub F3() #Disturb
VAR m
 m=uo.mana
 uo.cast('Weaken','laststatus')
 repeat
 wait(5)   
 until uo.mana<m
end sub


but there is no sense in that script


Code:
sub F3() #Disturb 
loop:
 uo.cast('Weaken','laststatus')
 lostmana()
goto loop
end sub

Author:  Nmy [ 2006-08-21 11:43:49 ]
Post subject: 

you mean:

Code:
Sub LIGHTNING()
   If uo.getglobal('Lightning')=='On' then
   uo.setglobal('Lightning',0)
   uo.print(' !!! -= Lightning terminated =- !!! ')
   uo.exec('terminate Lightning')
   else
   uo.setglobal('Lightning','On')
   uo.print(' !!! -= Lightning: on =- !!! ')
   VAR m
   repeat
   m=uo.mana
   #var t=uo.timer()
   #uo.textopen()
   uo.cast('Lightning','last')
   repeat
   wait(5)
   IF uo.mana==uo.int then
   m=uo.int
   end if
   until uo.mana<m
   #t=uo.timer()-t
   #uo.textprint(t)
   until uo.mana < 11
   uo.setglobal('Lightning',0)
   uo.print(' !!! -= Lightning: OFF =- !!! ')
end sub


man... use search :roll:

Author:  Azt [ 2007-11-17 04:12:16 ]
Post subject:  Re: Try this one

knicholes wrote:
This code is called right after you cast a spell. It will wait until you lose mana or if it fizzles.


Code:
##### Waits until you lose mana #################
sub lostmana()
var current
current = UO.MANA
while UO.MANA >= current
if UO.InJournal("fizzle") then
return
endif
wait(100)
wend
end sub



this script in stopped when someone cast a spell on you....

when i cast a spell anche someone disturbs my concentration, the script stops...

Author:  Azt [ 2007-11-17 14:39:04 ]
Post subject: 

up

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/