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

Gump Script
http://forum.yoko.com.ua/viewtopic.php?f=17&t=17949
Page 1 of 1

Author:  airnax [ 2017-01-23 15:59:28 ]
Post subject:  Gump Script

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

Author:  Nmy [ 2017-01-24 10:13:54 ]
Post subject:  Re: AFK Gump Script Help

uo.say(GetSNum(uo.LastGump('text', 2)))

Author:  airnax [ 2017-01-24 10:34:04 ]
Post subject:  Re: AFK Gump Script Help

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

Author:  Nmy [ 2017-01-24 11:45:08 ]
Post subject:  Re: AFK Gump Script Help

maybe this will help

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

Author:  airnax [ 2017-01-24 16:04:44 ]
Post subject:  Re: AFK Gump Script Help

Thanks it work perfect

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