Yes/No Dialogue Box?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Yes/No Dialogue Box?

#1 Post by grande » Fri Aug 26, 2011 12:14 pm

In Logar, I want to use Tex to buy and use a horse. I can get the part to select a 300 gold horse and I know how to implement code to mount the horse but I can't get the part in the middle where the dialogue box pops up saying "yes" or "no" to actually buy the horse.

Is there a "speakframe" command or something to select yes? Trying to avoid using mouse clicks. Yes, I looked all over on wiki and stuff for speakframe ideas.

Thanks for any help/links.

SpiralV
Posts: 72
Joined: Sat Jun 25, 2011 10:37 am
Location: Germany

Re: Yes/No Dialogue Box?

#2 Post by SpiralV » Fri Aug 26, 2011 2:17 pm

grande wrote:In Logar, I want to use Tex to buy and use a horse. I can get the part to select a 300 gold horse and I know how to implement code to mount the horse but I can't get the part in the middle where the dialogue box pops up saying "yes" or "no" to actually buy the horse.

Is there a "speakframe" command or something to select yes? Trying to avoid using mouse clicks. Yes, I looked all over on wiki and stuff for speakframe ideas.

Thanks for any help/links.
in-game

Code: Select all

/script ClickRequestDialogButton(0)
and in your script, it would be

Code: Select all

sendMacro("ClickRequestDialogButton(0)")

User avatar
grande
Posts: 261
Joined: Tue Jun 28, 2011 4:46 pm

Re: Yes/No Dialogue Box?

#3 Post by grande » Fri Aug 26, 2011 4:14 pm

Awesome, I'll try that. Thank you!

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Yes/No Dialogue Box?

#4 Post by nokirk » Sun Aug 28, 2011 2:43 pm

SpiralV wrote:
in-game

Code: Select all

/script ClickRequestDialogButton(0)
and in your script, it would be

Code: Select all

sendMacro("ClickRequestDialogButton(0)")
A general wondering, how is it possible to find out those lua commands? It kinda can't be theromwiki.com cause most commands don't have any further explantion of usage or in case of

Code: Select all

/script ClickRequestDialogButton(0)
theromwiki.com says
Where 'number' is a number. For what, I do not know.
.

So how to find out the usage? Or how to find out which command to use in the first place? I guess there are a hundred more quite similar dialog commands that could possibly work as well guessing from the name of the command. How do addon developers find out the commands they need? Are there addons or programms that help? Been wondering that for a while, I'd really appreciate some insight :)

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Yes/No Dialogue Box?

#5 Post by lisa » Sun Aug 28, 2011 7:11 pm

When I first started playing with making addons I used an addon called "in game scripts" It basically just makes it so you can type out your code in a text edit type box and then run it. I haven't used it for a while though.

As for actually testing the functions and the args of functions there was a programme I was told about but I never tried it, can't remember the name either, maybe someone else can remember it.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Yes/No Dialogue Box?

#6 Post by rock5 » Sun Aug 28, 2011 8:48 pm

Most commands, if there's not an entry in the romwiki, are derived by trial and error, just going by the name of the function and what error messages say when you try to use it.

The romwiki is quite old and doesn't have all the functions but you can sometimes find dumps of all the function names in some places on the web. How they get them I don't know.

You can also look for functions and how they are used in the .fdb files in the Runes of magic "fdb" folder. For instance I could find no reference to functions related to the new partner pet and mount bag online, to add to the bot player:mount() function, but I found a 'partnerframe.lua' file in the 'interface.fdb' file and in that I could see functions being used related to the partner bag and how they were being used. I was then able to add partnerbag functionallity to the bots player:mount() function.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Yes/No Dialogue Box?

#7 Post by lisa » Sun Aug 28, 2011 9:18 pm

A lot of the function names I found by doing searches with CE, directly from memory.
Then yeah just trial and error, check the error message in game for what it is expecting from the function.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Yes/No Dialogue Box?

#8 Post by rock5 » Mon Aug 29, 2011 3:24 am

How do you search memory for functions? Do you need to know machine language?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Yes/No Dialogue Box?

#9 Post by lisa » Mon Aug 29, 2011 4:51 am

It was a while ago now but I found something in common, cant remember if it was .sys or something similar.
just do view memory and do search memory.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Administrator
Site Admin
Posts: 5306
Joined: Sat Jan 05, 2008 4:21 pm

Re: Yes/No Dialogue Box?

#10 Post by Administrator » Mon Aug 29, 2011 12:40 pm

Another way to do it would be to write an injectable DLL to hook some C-interface Lua functions so you can catch the registration calls. Now inject it into the game when starting it up, catch all registrations, and dump them to a file. Of course this would only work for functions that are written in C. Many of the functions (such as events) are written in Lua. Still, with a bit more work, you could have it dump those, too, but it is more complicated.

nokirk
Posts: 73
Joined: Sat Jul 03, 2010 2:26 pm

Re: Yes/No Dialogue Box?

#11 Post by nokirk » Mon Aug 29, 2011 8:15 pm

I just found quite an interesting addon called LuaExplorer http://rom.curse.com/downloads/rom-addo ... lorer.aspx. Maybe you guys like it aswell.

It seems quite useful, played around with it a little and found soem interesting things. However I'm searching for an addon or programm that can tell you what functions you just used when doing something, without the need to specify functions before (think thats what lua explorer does), cause still the problem is that there are so many. Or is there no other way than learnign how to read functions from memory`?

Thanks

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Yes/No Dialogue Box?

#12 Post by rock5 » Mon Aug 29, 2011 8:49 pm

Looks nice. I think I will use it the next time I'm trying to figure out the name of a frame. The global variables list might come in handy too. :)
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests