L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Insert into edit box of windows
Author Message
maybeoutofrain Offline
Goblin Grave Robber
*

Posts: 10
Joined: Oct 2015
Reputation: 0
Version: 1.4.3.143
Post: #1
Insert into edit box of windows

Hi to everyone,
i need to know how i can put a value of a variable into a edit box of a html window in L2.

this is the html code:

PHP Code:
<html><title>Bot window:</title><body><center>The code is:<br>7331<br><edit var=newCode width=160><br><button action="bypass -h Quest AntiBot code $newCodevalue="put the code!" width=140 height=25 back=L2UI_CT1.Button_DF fore=L2UI_CT1.Button_DF></center></body></html


How i can?
I've tried with:

Code:
QuestReply("bypass -h Quest AntiBot code ".. captcha)
QuestReply("var=".. captcha)
Click("bypass -h Quest AntiBot code ".. captcha, "")
Click("var=".. captcha, "")

but seem don't work.

Someone can help me and future users that meet this issue?
I attached a screen of the box.
Thanks.


Attached File(s) Thumbnail(s)
   
10-13-2015 21:21 PM
Find all posts by this user Quote this message in a reply
snapit Offline
Expired VIP Member
**

Posts: 79
Joined: Jul 2015
Reputation: 18
Version: 1.4.2.133
Post: #2
RE: Insert into edit box of windows

Variable captcha contains a string, right?

Edit: Maybe it is a stupid question, since result of adding a string and an int together is a string.
(This post was last modified: 10-13-2015 23:03 PM by snapit.)
10-13-2015 22:41 PM
Find all posts by this user Quote this message in a reply
maybeoutofrain Offline
Goblin Grave Robber
*

Posts: 10
Joined: Oct 2015
Reputation: 0
Version: 1.4.3.143
Post: #3
RE: Insert into edit box of windows

(10-13-2015 22:41 PM)snapit Wrote:  Variable captcha contains a string, right?

Edit: Maybe it is a stupid question, since result of adding a string and an int together is a string.
Not a stupid question at all because i am new with lua programming.
To get my captcha code i use only
captcha = string.match (html, "%d%d%d%d")
And in html variable is contqined the plain html write up.
Can you help me how i can put a string in a box of a window?
I forgot to say that after insert the text i need to click the submit button.
(This post was last modified: 10-14-2015 00:34 AM by maybeoutofrain.)
10-14-2015 00:24 AM
Find all posts by this user Quote this message in a reply
maybeoutofrain Offline
Goblin Grave Robber
*

Posts: 10
Joined: Oct 2015
Reputation: 0
Version: 1.4.3.143
Post: #4
RE: Insert into edit box of windows

(10-14-2015 01:13 AM)TheQQmaster Wrote:  
    LUA Programming
tostring(value)


Ok i've changed the code like here:
Code:
captcha = string.match (html, "%d%d%d%d")
strcaptcha = tostring(captcha)
QuestReply("bypass -h Quest AntiBot code ".. strcaptcha)

That should be enough to insert the variable in the textbox and press submit button?
10-14-2015 09:29 AM
Find all posts by this user Quote this message in a reply
snapit Offline
Expired VIP Member
**

Posts: 79
Joined: Jul 2015
Reputation: 18
Version: 1.4.2.133
Post: #5
RE: Insert into edit box of windows

Yeah, that should be enough, tostring isn't needed.
10-14-2015 10:13 AM
Find all posts by this user Quote this message in a reply
maybeoutofrain Offline
Goblin Grave Robber
*

Posts: 10
Joined: Oct 2015
Reputation: 0
Version: 1.4.3.143
Post: #6
RE: Insert into edit box of windows

(10-14-2015 10:13 AM)snapit Wrote:  Yeah, that should be enough, tostring isn't needed.

Infact string.match return a string.
But now when the window appear and i control if the window appear and i get the code nothing is putted in the edit box.
What i wrong?
10-14-2015 12:37 PM
Find all posts by this user Quote this message in a reply
snapit Offline
Expired VIP Member
**

Posts: 79
Joined: Jul 2015
Reputation: 18
Version: 1.4.2.133
Post: #7
RE: Insert into edit box of windows

It's normal that nothing is in the edit/text box (filling the text box is client's way of sending a packet), QuestReply just sends a packet with string data to the server, that should be all u need to get trough the captcha.

Sever might be expecting a different packet for all i know. Sever name?
(This post was last modified: 10-14-2015 13:50 PM by snapit.)
10-14-2015 13:46 PM
Find all posts by this user Quote this message in a reply
snapit Offline
Expired VIP Member
**

Posts: 79
Joined: Jul 2015
Reputation: 18
Version: 1.4.2.133
Post: #8
RE: Insert into edit box of windows

For anyone reading this, having similar issues, the solution in this case seems to be removal of "bypass -h ":
    LUA Programming
QuestReply("Quest AntiBot code ".. captcha)

10-16-2015 23:42 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Is there any way to get process id from l2 windows using script? fekipeht 1 2,467 01-05-2017 00:46 AM
Last Post: TheQQmaster
  l2 tower windows x64 summoner11 0 2,270 11-12-2015 16:34 PM
Last Post: summoner11
Star Any Other Bots For More Than 3 Windows mindeee 5 4,596 11-04-2015 13:47 PM
Last Post: jokey
  Windows 10 problem Raaf1383 4 4,052 10-11-2015 07:57 AM
Last Post: rip2808
  Error while trying to enter interlude server (windows 10 x64bit) dont794 0 2,248 09-10-2015 08:09 AM
Last Post: dont794
  Windows 10 L2T Premium Licence mrchocolate 1 2,543 07-30-2015 16:02 PM
Last Post: hukdonphonix
  Windows 10 KainSneoX 5 8,097 07-29-2015 19:29 PM
Last Post: Conde
  Delay on windows when having two or more. kossthegreat 3 3,394 04-15-2015 00:41 AM
Last Post: kossthegreat
  Change Name (Windows Box) NaoJogoMais 7 5,813 04-11-2015 00:50 AM
Last Post: capucine
  L2Tower Windows 8.1 klevi 5 4,653 02-23-2015 23:09 PM
Last Post: klevi



User(s) browsing this thread: 1 Guest(s)