Spam

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Spam

Post 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.
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Spam

Post 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
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post 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.
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post by Staszek »

up
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post 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
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post by Staszek »

almost perfect, some time scripts spam 3xfireball or arrow, can fix it ?
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post 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?
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post 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.
Mirage
Posts: 2802
Joined: 2009-05-28 09:58:28
Location: Иваново
Contact:

Re: Spam

Post by Mirage »

It is not necessary to hold the button of the clamped. :roll:
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post 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.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post 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
Last edited by ZeroDX on 2012-07-22 17:23:37, edited 1 time in total.
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post by Staszek »

All the time scripts spam only Fireball.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post by ZeroDX »

previous post updated
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post by Staszek »

Scripts dont work.

Fireball
Invalid serial index
fireball
invalid serial index

dont cast magic arrow, only massage invalid serial index.
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post 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
Juicy Fruit
Posts: 820
Joined: 2011-06-11 19:54:23

Re: Spam

Post 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")
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post 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. ??
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post 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?
Staszek
Posts: 11
Joined: 2012-07-14 14:30:23

Re: Spam

Post 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 :(
ZeroDX
Posts: 718
Joined: 2006-12-08 10:51:50
Location: Москва
Contact:

Re: Spam

Post 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
Post Reply