Yoko

All sides of Injection
It is currently 2025-12-08 20:04:07

All times are UTC+02:00




Post new topic  Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Wait for spell
PostPosted: 2006-07-21 22:07:25 
Offline

Joined: 2005-09-08 18:38:12
Posts: 64
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


Top
   
 Post subject:
PostPosted: 2006-07-21 22:29:28 
Offline
Expert!
User avatar

Joined: 2006-02-25 21:48:38
Posts: 1032
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 =_(

_________________
DerMeister сейчас на нейрале!


Top
   
 Post subject: Try this one
PostPosted: 2006-08-21 00:46:34 
Offline

Joined: 2004-05-16 00:08:59
Posts: 9
Location: Utah
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



Top
   
 Post subject:
PostPosted: 2006-08-21 01:03:55 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
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

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2006-08-21 02:25:49 
Offline

Joined: 2004-05-16 00:08:59
Posts: 9
Location: Utah
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


Top
   
 Post subject:
PostPosted: 2006-08-21 11:43:49 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
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:

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject: Re: Try this one
PostPosted: 2007-11-17 04:12:16 
Offline

Joined: 2007-09-03 16:31:57
Posts: 43
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...


Last edited by Azt on 2007-11-17 18:52:49, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2007-11-17 14:39:04 
Offline

Joined: 2007-09-03 16:31:57
Posts: 43
up


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users 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:  
cron
Powered by phpBB® Forum Software © phpBB Limited