Yoko

All sides of Injection
It is currently 2026-01-16 20:15:41

All times are UTC+02:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Recast-spell after cast.
PostPosted: 2004-08-12 23:49:17 
Offline

Joined: 2004-07-02 12:14:09
Posts: 30
I have to ask how to automatically recast spell (like lightning) in pvp imediatelly after cast. I think i cant use Journal becose that isnt perfect.


Top
   
 Post subject:
PostPosted: 2004-08-13 03:16:17 
Offline

Joined: 2004-07-22 07:37:37
Posts: 51
Simple.

Code:
sub Lightningstrike()

Lightningcast:
UO.Cast('Lightning','lasttarget')

Repeat
Wait(50)
Until UO.InJournal("fizzle") OR timeup>8000 #(or however long lightning takes to cast on your server)

goto Lightningcast


The quick Wait in the repeat should work with the journal since it will check every 0.05 seconds :) Nothing is perfect.


Top
   
 Post subject:
PostPosted: 2004-08-13 13:20:16 
Offline

Joined: 2004-07-02 12:14:09
Posts: 30
Nidht wrote:
Simple.

Code:
sub Lightningstrike()

Lightningcast:
UO.Cast('Lightning','lasttarget')

Repeat
Wait(50)
Until UO.InJournal("fizzle") OR timeup>8000 #(or however long lightning takes to cast on your server)

goto Lightningcast


The quick Wait in the repeat should work with the journal since it will check every 0.05 seconds :) Nothing is perfect.

Still based on pause , but i try that, if someone have another macro i will invite it here. Thx for patience.


Top
   
 Post subject:
PostPosted: 2004-08-15 21:56:54 
Offline

Joined: 2004-07-02 12:14:09
Posts: 30
Nidht wrote:
Simple.

Code:
sub Lightningstrike()

Lightningcast:
UO.Cast('Lightning','lasttarget')

Repeat
Wait(50)
Until UO.InJournal("fizzle") OR timeup>8000 #(or however long lightning takes to cast on your server)

goto Lightningcast


The quick Wait in the repeat should work with the journal since it will check every 0.05 seconds :) Nothing is perfect.

Yoko doesnt know command Timeup, then i cant run that macro.


Top
   
 Post subject:
PostPosted: 2004-08-18 04:28:15 
Offline

Joined: 2004-07-01 06:02:22
Posts: 36
lazy guy...
Code:
sub Lightningstrike() 
var timeup = 3000
var manabefore = 0
while (not uo.Injournal('MYCASTINGSTOP'))
  uo.deletejournal()
  manabefore = uo.mana
  uo.cast('Lightning','lasttarget')
  repeat
    wait (50)
    timeup = timeup + 50
  until (uo.Injournal("fizzle") or (timeup > 800) or (manabefore > uo.mana)
wend
end sub


Top
   
 Post subject:
PostPosted: 2004-08-18 07:09:31 
Offline

Joined: 2004-07-22 07:37:37
Posts: 51
Well, I'd think he would notice that if timeup was a variable that he had to create it..... lol

Sorry, but if I'm not gonna submit the script for mutli-usage or need it myself I'm really lazy :P Atleast I typed out the main part of the code so he would know what exactly he needed to do and fix the rest. Unless of course he is new to scripting...


Top
   
 Post subject:
PostPosted: 2004-08-18 07:11:31 
Offline

Joined: 2004-07-22 07:37:37
Posts: 51
Drakull wrote:
lazy guy...
Code:
sub Lightningstrike() 
var timeup = 3000
var manabefore = 0
while (not uo.Injournal('MYCASTINGSTOP'))
  uo.deletejournal()
  manabefore = uo.mana
  uo.cast('Lightning','lasttarget')
  repeat
    wait (50)
    timeup = timeup + 50
  until (uo.Injournal("fizzle") or (timeup > 800) or (manabefore > uo.mana)
wend
end sub


Why timeup > 800? Lightning isn't necessarily 0.8 seconds to cast. It takes longer on the server I play.

I think it should be:

VAR timeup,timetocast = (whatever time it takes to cast)

And by putting "manabefore > uo.mana" it will do absolutely nothing...


Top
   
 Post subject:
PostPosted: 2004-08-18 09:23:07 
Offline

Joined: 2004-07-01 06:02:22
Posts: 36
Nidht wrote:
Why timeup > 800? Lightning isn't necessarily 0.8 seconds to cast. It takes longer on the server I play.

I think it should be:

VAR timeup,timetocast = (whatever time it takes to cast)

And by putting "manabefore > uo.mana" it will do absolutely nothing...

In fact you are partly right on something: it shouldn't be timeup > 800 but having another variable timeincrease or something like that set to 0 each time is cast and raising the 50. Then the comparison would be timeincrease > timeup. About manabefore > uo.mana it does something: when you cast a spell you use mana, so your mana will decrease. If your mana level is lower than your mana before trying to cast the spell you've sucessfully casted the spell (if for whatever reason it goes faster than what you expected with your time maximum). Also depends on how fast your mana is recovered, that's why I keep the maximum time for casting.
the corrected code should be something like this:
Code:
sub Lightningstrike() 
var timeup = 3000
var timecast = 0
var manabefore = 0
while (not uo.Injournal('MYCASTINGSTOP'))
  uo.deletejournal()
  timecast = 0
  manabefore = uo.mana
  uo.cast('Lightning','lasttarget')
  repeat
    wait (50)
    timecast = timecast + 50
  until (uo.Injournal("fizzle") or (timecast > timeup) or (manabefore > uo.mana)
wend
end sub



Top
   
 Post subject:
PostPosted: 2004-08-18 11:20:04 
Offline

Joined: 2004-07-02 12:14:09
Posts: 30
I thank u all, but any 1 script doesnt work exception in parser or somehow. I want to try it with Lightning and Flamestrike, bud i dont know too much spell scripts, only craft (you put).


Top
   
 Post subject:
PostPosted: 2004-08-18 17:46:32 
Offline

Joined: 2004-07-22 07:37:37
Posts: 51
OH I get it. Manabefore is the ORIGINAL mana and UO.Mana will be less after cast... RIGHT :P Sorry


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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