New (hopefully last) Gump Solving.

Ask for scripts here

Moderators: Murderator+, Murderator

SmokeHemp
Posts: 15
Joined: 2008-02-10 13:48:55

New (hopefully last) Gump Solving.

Post by SmokeHemp »

Here is a simple Gump.

Code: Select all

_____infogump_______ 
serial   0x027ee33d
gumpid   0x00049b74
X   0
Y   0
429   packet size
33   reply packet size
Buttons: ________
 page 0
    1 [    2] image=0x0851 at 115:160
Checks&Radios: __
Entryes: ________
All commands: ____
    1] noclose
    2] resizepic 40 50 3500 200 150
    3] HtmlGump 55 75 280 60 0 0 0
    4] resizepic 70 130 3000 150 20
    5] TextEntry 70 130 150 20 900 3 1
    6] button 115 160 2130 2129 1 0 2
Text: ____________
    0] Tentativas: 1<br>Digite os numeros abaixo:<br>      { 9, 9, 4 }<br><br><br><br><br>Precisa de Ajuda ? Clique aqui
    1] Tentativas: 1<br>Digite os numeros abaixo:<br>      { 9, 9, 4 }<br><br><br><br><br>Precisa de Ajuda ? Clique aqui
Reply: ___________
 [0002] primary reply
 Checks&Radios (0)
 Entryes (1)
  [0003] 994
0000: 39 39 34 -- -- -- -- -- -- -- -- -- -- -- -- -- : 994



What i have to do is, get the values 9 9 4 from the texts (dont know how to get em, since they can be 3, 4 or 5 values, write em in the textentry, witch is simple, then press ok witch is simple too... I Just donw know how i get those values, can be 3 4 5 numbers, and the numbers are randomly shown.
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

T  e  n  ... {     9  ,     9  ,     4     }  <...
00 01 02 ... 52 53 54 55 56 57 58 59 60 61 62 63 ...


Code: Select all

sub GetSNum(s)
   
   var l = 54
   var snum = ''
   
   while s[l] <> '<'
      l = l+3
      snum = snum+s[l]
   wend
   
   return snum

end sub
SmokeHemp
Posts: 15
Joined: 2008-02-10 13:48:55

Post by SmokeHemp »

Text 0 [54] would be the first number ? could you explain a little, i understand a little bit if how u could do this.
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

sub test()

   uo.Print(GetSNum(uo.LastGump('text', 0)))

end sub


Will print 994

All need are understand GetSNum and use it... no need to change it...
SmokeHemp
Posts: 15
Joined: 2008-02-10 13:48:55

Post by SmokeHemp »

I undertand, thanx, it works, but when 3 numbers only. Sometimes 4 numbers, sometime 5 numbers...how could i make this ? Would i need to LEN from { to } ?
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

are u test it with 4 numbers?
SmokeHemp
Posts: 15
Joined: 2008-02-10 13:48:55

Post by SmokeHemp »

Code: Select all

sub Solve() 

   var code = ""
   var line = ""
   var i = 0
   
   if not uo.LastGump('replyed') then
      if uo.LastGump('text', 0) == 'Anti Macro' then
         uo.LClick(3, val(Right(uo.LastGump('button', 0), 3)))
         repeat
            wait(1000)
         until uo.LastGump('replyed', 0)
         return 1
      endif
   
            code = GetSNum(uo.LastGump('text', 0))
            next
            uo.Say(code)
            wait(1000)
            line = Right(uo.LastGump('button', 0), 7)
            uo.LClick(val(Left(line, 3)), val(Right(line, 3)))
            repeat
               wait(1000)
            until uo.LastGump('replyed', 0)
            return 2
   endif
   
end sub

sub GetSNum(s)
   
   var l = 54
   var snum = ''
   
   while s[l] <> '<'
      l = l+3
      snum = snum+s[l]
   wend
   
   return snum

end sub




Not working, im not too good at this, probably something wrong.


This :

if not uo.LastGump('replyed') then
if uo.LastGump('text', 0) == 'Anti Macro' then
uo.LClick(3, val(Right(uo.LastGump('button', 0), 3)))
repeat
wait(1000)
until uo.LastGump('replyed', 0)
return 1
endif

is because you click "Antimacro" before u put numbers.
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

only answer to my questions...
GetSNum work correct with 4 and 5 numbers?
SmokeHemp
Posts: 15
Joined: 2008-02-10 13:48:55

Post by SmokeHemp »

I Dont know, i couldnt fit it into a script to test it. Im no good programmer yet, i couldnt make ur Sub into an antimacro complete script. Could you help ?
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

sub test() 

   uo.Print(GetSNum(uo.LastGump('text', 0)))

end sub

sub GetSNum(s)
   
   var l = 54
   var snum = ''
   
   while s[l] <> '<'
      l = l+3
      snum = snum+s[l]
   wend
   
   return snum

end sub

test it...///...///...///...
SmokeHemp
Posts: 15
Joined: 2008-02-10 13:48:55

Post by SmokeHemp »

4 numbers : 1 2 3 4 he say 1 2 3 <

3 numbers 1 2 3 he say < 2 3
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

sub test() 

   uo.Print(GetSNum(uo.LastGump('text', 0)))

end sub

sub GetSNum(s)
   
   var l = 54
   var snum = ''
   
   while s[l] <> '<'
      snum = snum+s[l]
      l = l+3
   wend
   
   return snum

end sub

give shard adress and when is antimacro appear?
courtney
Posts: 3
Joined: 2008-02-13 20:33:03

Post by courtney »

didnt work... here's 2 Screenshots:

Image



Image

second one is whan I clicked the gump... you have to click the textfield and write those numbers.. any ideas?
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

Code: Select all

sub Solve()

   var code = ""
   var line = ""
   var i = 54
   
   if not uo.LastGump('replyed') then
      line = uo.LastGump('text', 0)
      if line == 'Anti Macro' then
         uo.LClick(3, val(Right(uo.LastGump('button', 0), 3)))
         repeat
            wait(1000)
         until uo.LastGump('replyed', 0)
         return 1
      else
         if Left(line, 10) == 'Tentativas' then
            while line[i] <> '<'
               code = code+line[i]
               i = i+3
            wend
            uo.Say(code)
            wait(1000)
            line = Right(uo.LastGump('button', 0), 7)
            uo.LClick(val(Left(line, 3)), val(Right(line, 3)))
            repeat
               wait(1000)
            until uo.LastGump('replyed', 0)
            return 2
         end if
      end if
   endif

end sub
surupimpuapua
Posts: 7
Joined: 2008-02-17 20:06:06

Post by surupimpuapua »

still not working....


see topic:

viewtopic.php?p=71592#71592
courtney
Posts: 3
Joined: 2008-02-13 20:33:03

Post by courtney »

something has changed ... when antimacro button appears on top left of screen.. it`s not clicking the right place... dont know why.. any tips?
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

infogump of first gump...
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

ани типс... тормоза :)
courtney
Posts: 3
Joined: 2008-02-13 20:33:03

Post by courtney »

I fixed it myself...
Grin
Expert!
Posts: 2580
Joined: 2005-05-04 14:05:19
Location: Москва

Post by Grin »

good:)
Post Reply