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

Spam
http://forum.yoko.com.ua/viewtopic.php?f=17&t=17031
Page 1 of 1

Author:  Staszek [ 2012-07-14 14:36:45 ]
Post subject:  Spam

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.

Author:  Mirage [ 2012-07-14 21:41:52 ]
Post subject:  Re: Spam

If I understand correctly then something like this:
Code:
sub loop()
repeat
Fireball()
wait(500)
Arrow()
wait(500)
until uo.dead()
endsub

Author:  Staszek [ 2012-07-16 14:22:01 ]
Post subject:  Re: Spam

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.

Author:  Staszek [ 2012-07-19 15:11:38 ]
Post subject:  Re: Spam

up

Author:  ZeroDX [ 2012-07-19 18:58:00 ]
Post subject:  Re: Spam

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

Author:  Staszek [ 2012-07-19 20:47:03 ]
Post subject:  Re: Spam

almost perfect, some time scripts spam 3xfireball or arrow, can fix it ?

Author:  ZeroDX [ 2012-07-19 21:53:35 ]
Post subject:  Re: Spam

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?

Author:  Staszek [ 2012-07-19 23:19:09 ]
Post subject:  Re: Spam

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.

Author:  Mirage [ 2012-07-20 08:14:46 ]
Post subject:  Re: Spam

It is not necessary to hold the button of the clamped. :roll:

Author:  Staszek [ 2012-07-21 12:28:42 ]
Post subject:  Re: Spam

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.

Author:  ZeroDX [ 2012-07-21 18:35:41 ]
Post subject:  Re: Spam

Code:
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

Author:  Staszek [ 2012-07-22 11:32:41 ]
Post subject:  Re: Spam

All the time scripts spam only Fireball.

Author:  ZeroDX [ 2012-07-22 17:24:48 ]
Post subject:  Re: Spam

previous post updated

Author:  Staszek [ 2012-07-23 10:22:50 ]
Post subject:  Re: Spam

Scripts dont work.

Fireball
Invalid serial index
fireball
invalid serial index

dont cast magic arrow, only massage invalid serial index.

Author:  ZeroDX [ 2012-07-23 11:09:07 ]
Post subject:  Re: Spam

try this
Code:
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

Author:  Juicy Fruit [ 2012-07-23 11:14:32 ]
Post subject:  Re: Spam

ZeroDX wrote:
try this
Code:
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:
UO.exec("cast " + uo.getglobal('lighter') +  " laststatus")

Author:  Staszek [ 2012-07-23 11:42:14 ]
Post subject:  Re: Spam

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. ??

Author:  ZeroDX [ 2012-07-23 14:26:01 ]
Post subject:  Re: Spam

Juicy Fruit wrote:
А если lasttarget заменить на laststatus?
Code:
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?

Author:  Staszek [ 2012-07-23 14:42:01 ]
Post subject:  Re: Spam

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 :(

Author:  ZeroDX [ 2012-07-23 15:05:04 ]
Post subject:  Re: Spam

you need to:
1) start cast.
2) interrupt cast
3) do ,showjournal
last string in journal will be the latest in opened text window

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