Gump Script

Ask for scripts here

Moderators: Murderator+, Murderator

Post Reply
airnax
Posts: 4
Joined: 2017-01-23 15:28:45

Gump Script

Post by airnax »

Hello, I'm trying to write a simple anti captcha but can't get it working.. it only require write the text in [] (first a letter then two numbers).

This is the gump info:

Code: Select all

_____infogump_______
injection id   0x31a6cfb8
serial   0x000321dc
gumpid   0x000004bb
X   170
Y   160
in client    yes
458   packet size
0   reply packet size
Buttons: ________
    8 [    1] image=0x0FBE at 367:145
Checks&Radios: __
Entryes: ________
    9 [    1] 83:130*330:35 []
All commands: ____
    1] nomove
    2] resizepic 60 0 5120 370 170
    3] text 83 20 56 0
    4] text 83 100 80 4
    5] text 83 144 80 3
    6] htmlgump 83 40 300 65 1 0 1
    7] resizepic 74 125 3000 345 20
    8] button 367 145 4030 4031 1 0 1
    9] textentry 83 130 330 35 1152 1 2
Text: ____________
    0] Anti Makro System
    1] Girilmesi Gerek Kod [n03]
    2] Enter The Kod [n03]
    3] Write the code on textbox
    4]


Script:

Code: Select all

sub afkcheck()
   repeat
      if uo.LastGump('text',0) == 'Anti Makro System' and uo.LastGump('replyed') == 0 then
         uo.lclick(269,294)
         uo.say(GetSNum(uo.LastGump('text', 3)))
         wait(250)
         uo.sendgumpselect(1)
      endif
      wait(500)
   until uo.dead()
end sub

sub GetSNum(s)
   var l = 14
   var SNum = ''
   while s[l] <> '['
      SNum = SNum+s[l]
      l = l+2
   wend
   return SNum
end sub
Last edited by airnax on 2017-01-25 10:14:38, edited 1 time in total.
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Re: AFK Gump Script Help

Post by Nmy »

uo.say(GetSNum(uo.LastGump('text', 2)))
airnax
Posts: 4
Joined: 2017-01-23 15:28:45

Re: AFK Gump Script Help

Post by airnax »

Thanks for your reply.
If I do uo.say(GetSNum(uo.LastGump('text', 2))) it don't write anything, there is a problem with GetSNum but cant find the wrong.

If I do uo.say(uo.LastGump('text', 3)) it write: Enter The Kod [n03].
Nmy
Expert!
Posts: 2152
Joined: 2005-09-14 15:31:58
Location: Latvia

Re: AFK Gump Script Help

Post by Nmy »

maybe this will help

Code: Select all

sub test()
   var msg = "Enter The Kod [n03]"
   uo.say(GetSNum(msg))
endsub
sub GetSNum(s)
   var n, ret=""
   for n=0 to Len(s)-1
       if s[n] == "[" then
          ret = s[n+1] + s[n+2] + s[n+3]
          return ret
       endif
   next
end sub
airnax
Posts: 4
Joined: 2017-01-23 15:28:45

Re: AFK Gump Script Help

Post by airnax »

Thanks it work perfect
Post Reply