LClick lastgum

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
Injectioner
Posts: 25
Joined: 2005-07-28 20:31:08

LClick lastgum

Post by Injectioner »

How can I do a LClick on the lastgump that appear on the screen?

Ex:

Code: Select all

_____infogump_______
serial   0x00a9874e
gumpid   0x001224f1
X   0
Y   0
108   packet size
0   reply packet size
Buttons: ________
 page 0
    1 [    1] image=0x1582 at 3:510
Checks&Radios: __
Entryes: ________
All commands: ____
    1] NoClose
    2] button 3 510 5505 5506 1 0 1
    3] text 0 570 38 0
Text: ____________
    0] Anti Macro


I Know that this gump is located at X3 Y510, but I want a script that take the cordenates automaticaly.

Thanks.

[]'s
Image
Image
Image
Destruction
Junior Expert
Posts: 3221
Joined: 2004-06-24 22:08:56

Post by Destruction »

Code: Select all

sub antimacro()
    var coord = ""
    repeat
        if uo.lastgump( 'replyed' ) == 0 and uo.lastgump( 'text', 0 ) == 'Anti Macro' then
            coord = uo.lastgump( 'command', 0 )
            coord = explode( ' ', coord )
            uo.lclick( val( coord[1] ), val( coord[2] ) )
            while uo.lastgump( 'replyed' ) == 0
                wait( 100 )
            wait( 100 )
        endif
        wait( 100 )
    until false
endsub

Not tested, written in reply window after long rest from the scripts.

sub explode can be found on this forum.
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Telegram: @tatikom
Post Reply