Yoko

All sides of Injection
It is currently 2024-03-29 03:18:31

All times are UTC+02:00




Post new topic  Reply to topic  [ 20 posts ] 
Author Message
 Post subject: Spam
PostPosted: 2012-07-14 14:36:45 
Offline

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-14 21:41:52 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
If I understand correctly then something like this:
Code:
sub loop()
repeat
Fireball()
wait(500)
Arrow()
wait(500)
until uo.dead()
endsub

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-16 14:22:01 
Offline

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-19 15:11:38 
Offline

Joined: 2012-07-14 14:30:23
Posts: 11
up


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-19 18:58:00 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
Code:
sub lighter()
    if uo.getglobal('lighter') == 'arrow' then
        uo.setglobal('lighter', 'ball')
        Arrow()
    else
        uo.setglobal('lighter', 'arrow')
        Fireball()
    endif
endsub


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-19 20:47:03 
Offline

Joined: 2012-07-14 14:30:23
Posts: 11
almost perfect, some time scripts spam 3xfireball or arrow, can fix it ?


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-19 21:53:35 
Offline
User avatar

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-19 23:19:09 
Offline

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-20 08:14:46 
Offline
User avatar

Joined: 2009-05-28 09:58:28
Posts: 2802
Location: Иваново
It is not necessary to hold the button of the clamped. :roll:

_________________
Image
YokoInjection CodeSweeper
Ошибка "Unhandled exception in parser"
Стрелялка для олдов.


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-21 12:28:42 
Offline

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-21 18:35:41 
Offline
User avatar

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


Last edited by ZeroDX on 2012-07-22 17:23:37, edited 1 time in total.

Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-22 11:32:41 
Offline

Joined: 2012-07-14 14:30:23
Posts: 11
All the time scripts spam only Fireball.


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-22 17:24:48 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
previous post updated


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 10:22:50 
Offline

Joined: 2012-07-14 14:30:23
Posts: 11
Scripts dont work.

Fireball
Invalid serial index
fireball
invalid serial index

dont cast magic arrow, only massage invalid serial index.


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 11:09:07 
Offline
User avatar

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 11:14:32 
Offline

Joined: 2011-06-11 19:54:23
Posts: 820
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")


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 11:42:14 
Offline

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 14:26:01 
Offline
User avatar

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 14:42:01 
Offline

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


Top
   
 Post subject: Re: Spam
PostPosted: 2012-07-23 15:05:04 
Offline
User avatar

Joined: 2006-12-08 10:51:50
Posts: 718
Location: Москва
you need to:
1) start cast.
2) interrupt cast
3) do ,showjournal
last string in journal will be the latest in opened text window


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 10 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