Page 1 of 1

Spam

Posted: 2012-07-14 14:36:45
by Staszek
Hey

I need help with creat scripts for spam two spell.
Fireball
Magic Arrow
Fireball
...
...
loop.

I use this sub for Fireball and arrow.

sub Fireball()
if not uo.waiting() then
UO.exec("cast 'Fireball' lasttarget")
end if
if (UO.InJournal('cliloc# 0xA3A1') or UO.InJournal('cliloc# 0xAB74')) then
UO.exec("cast 'Fireball' ")
UO.DeleteJournal()
end if
end sub

sub Arrow()
if not uo.waiting() then
UO.exec("cast 'Magic Arrow' lasttarget")
end if
if (UO.InJournal('cliloc# 0xA3A1') or UO.InJournal('cliloc# 0xAB74')) then
UO.exec("cast 'Magic Arrow' ")
UO.DeleteJournal()
end if
end sub

I need to Connect this two scripts with one. To spam one time Sub Fireball and one time Sub Arrow, or creat new scripts what will be use Sub fireball and sub arrow.

Re: Spam

Posted: 2012-07-14 21:41:52
by Mirage
If I understand correctly then something like this:

Code: Select all

sub loop()
repeat
Fireball()
wait(500)
Arrow()
wait(500)
until uo.dead()
endsub

Re: Spam

Posted: 2012-07-16 14:22:01
by Staszek
almost like this but without repeat.
Scripts shuold work like this.

When i press one time sub loop()
scripts should cast
Fireball
when I press second time
scripts should cast
Magic Arrow


Not like now when i press sub loop()
scripts cast fireball and arrow.



Scripts should works like this from easyuo.

set %gowienko 0
mainLoop:
onHotKey a
gosub czary
goto mainLoop
sub czary
if %gowienko = 0
{
event macro 15 17
wait 15
set %gowienko 1
return
}
event macro 15 4
wait 5
set %gowienko 0
return

When i press key a
Scripts spam all the time one time fireball and one time arrow.
one push a cast fireball second time push a arrow when i hold key scripts cast loop fireball arrow fireball arrow.

Re: Spam

Posted: 2012-07-19 15:11:38
by Staszek
up

Re: Spam

Posted: 2012-07-19 18:58:00
by ZeroDX

Code: Select all

sub lighter()
    if uo.getglobal('lighter') == 'arrow' then
        uo.setglobal('lighter', 'ball')
        Arrow()
    else
        uo.setglobal('lighter', 'arrow')
        Fireball()
    endif
endsub

Re: Spam

Posted: 2012-07-19 20:47:03
by Staszek
almost perfect, some time scripts spam 3xfireball or arrow, can fix it ?

Re: Spam

Posted: 2012-07-19 21:53:35
by ZeroDX
Staszek wrote:almost perfect, some time scripts spam 3xfireball or arrow, can fix it ?

when you press hotkey once, your character will casts fireball three times?

Re: Spam

Posted: 2012-07-19 23:19:09
by Staszek
no, when i press key one time I cast one spell, but when i hold key to spam all time, scripts spam some time 3x arrow sometime works good.

Re: Spam

Posted: 2012-07-20 08:14:46
by Mirage
It is not necessary to hold the button of the clamped. :roll:

Re: Spam

Posted: 2012-07-21 12:28:42
by Staszek
It necessary becouse.

sub Arrow()
if not uo.waiting() then
UO.exec("cast 'Magic Arrow' lasttarget")
end if
if (UO.InJournal('cliloc# 0xA3A1') or UO.InJournal('cliloc# 0xAB74')) then
UO.exec("cast 'Magic Arrow' ")
UO.DeleteJournal()
end if
end sub

I use this scripts for spell and i can hold key and I can spam Arrow with max speed and without fizzzle.
Image

Image

ImageShack.us

Like in screen, I try to do the same with arrow fireball.
the scripts works almost perfect but when i push faster key it cast 2x the same spell.
I need to hold key i cast with max speed.

Re: Spam

Posted: 2012-07-21 18:35:41
by ZeroDX

Code: Select all

sub lighter()
    if not uo.waiting() then
        if uo.getglobal('lighter') <> 'Fireball' then
            uo.setglobal('lighter', 'Fireball')
        else
            uo.setglobal('lighter', 'Magic Arrow')
        endif
        UO.exec("cast " + uo.getglobal('lighter') +  " lasttarget")
    end if
    if (UO.InJournal('cliloc# 0xA3A1') or UO.InJournal('cliloc# 0xAB74')) then
        if uo.getglobal('lighter') <> 'Fireball' then
            uo.setglobal('lighter', 'Fireball')
        else
            uo.setglobal('lighter', 'Magic Arrow')
        endif
        UO.exec("cast " + uo.getglobal('lighter'))
        UO.DeleteJournal()
    end if
end sub

Re: Spam

Posted: 2012-07-22 11:32:41
by Staszek
All the time scripts spam only Fireball.

Re: Spam

Posted: 2012-07-22 17:24:48
by ZeroDX
previous post updated

Re: Spam

Posted: 2012-07-23 10:22:50
by Staszek
Scripts dont work.

Fireball
Invalid serial index
fireball
invalid serial index

dont cast magic arrow, only massage invalid serial index.

Re: Spam

Posted: 2012-07-23 11:09:07
by ZeroDX
try this

Code: Select all

sub lighter()
    if not uo.waiting() then
        if uo.getglobal('lighter') <> 'Fireball' then
            uo.setglobal('lighter', 'Fireball')
        else
            uo.setglobal('lighter', "'Magic Arrow'")
        endif
        UO.exec("cast " + uo.getglobal('lighter') +  " lasttarget")
    end if
    if (UO.InJournal('cliloc# 0xA3A1') or UO.InJournal('cliloc# 0xAB74')) then
        if uo.getglobal('lighter') <> 'Fireball' then
            uo.setglobal('lighter', 'Fireball')
        else
            uo.setglobal('lighter', "'Magic Arrow'")
        endif
        UO.exec("cast " + uo.getglobal('lighter'))
        UO.DeleteJournal()
    end if
end sub

Re: Spam

Posted: 2012-07-23 11:14:32
by Juicy Fruit
ZeroDX wrote:try this

Code: Select all

sub lighter()
    if not uo.waiting() then
        if uo.getglobal('lighter') <> 'Fireball' then
            uo.setglobal('lighter', 'Fireball')
        else
            uo.setglobal('lighter', "'Magic Arrow'")
        endif
        UO.exec("cast " + uo.getglobal('lighter') +  " lasttarget")
    end if
    if (UO.InJournal('cliloc# 0xA3A1') or UO.InJournal('cliloc# 0xAB74')) then
        if uo.getglobal('lighter') <> 'Fireball' then
            uo.setglobal('lighter', 'Fireball')
        else
            uo.setglobal('lighter', "'Magic Arrow'")
        endif
        UO.exec("cast " + uo.getglobal('lighter'))
        UO.DeleteJournal()
    end if
end sub


А если lasttarget заменить на laststatus?

Code: Select all

UO.exec("cast " + uo.getglobal('lighter') +  " laststatus")

Re: Spam

Posted: 2012-07-23 11:42:14
by Staszek
Ok scripts work very good like I need :) thx very much.
And second think its possible to add, a repeat spell what was interrupted ??

Like this: I cast fireball, enemy interrupted clumsy, and scripts repeat fireball. ??

Re: Spam

Posted: 2012-07-23 14:26:01
by ZeroDX
Juicy Fruit wrote:А если lasttarget заменить на laststatus?

Code: Select all

UO.exec("cast " + uo.getglobal('lighter') +  " laststatus")

Там была проблемма с пробелом в названии спелла. Из-за этого вместо ласттаргет инжа воспринимала Arrow как объект.

Staszek wrote:And second think its possible to add, a repeat spell what was interrupted ??

How will be "the spell fizzles' in cliloc?

Re: Spam

Posted: 2012-07-23 14:42:01
by Staszek
I mean interrupted spell from enemy, like someone cast arrow and do dmg, my spell is interrupted and fizzle.

Ah You understand me what I mean, but i dont know :(

Re: Spam

Posted: 2012-07-23 15:05:04
by ZeroDX
you need to:
1) start cast.
2) interrupt cast
3) do ,showjournal
last string in journal will be the latest in opened text window