Lineage 2 Tower Forum

Full Version: Insert into edit box of windows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
(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.
(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?
Yeah, that should be enough, tostring isn't needed.
(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?
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?
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)

Reference URL's