You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

TheMann64

Intermediate

  • "TheMann64" started this thread

Posts: 340

Occupation: I do accounting, when I'm not cruising the forums

  • Send private message

1

Wednesday, August 8th 2012, 4:18pm

Chatting with NPCs

Back in chapter 2 there was a macro function that would let you preset which chat option you wanted to select when you spoke with an NPC. I believe it was something like /run SpeakFrame_SpeakOption(1, 2) to select the second chat option. I used to use that function in royals corridor to remove the hassle of hammering energy bars into fragments. Anywho, whatever function I was using was dissabled, so my question today is...

Is there a macro or script function that allows you to select a certain chat option from an NPC? The less I have to click while using my laptop the better :)

Thanks!
Govinda
Guild: Theblacknights
Babesmann - Dwarfmann

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

2

Wednesday, August 8th 2012, 4:43pm

Try

Source code

1
/run ChoiceOption(i)

TheMann64

Intermediate

  • "TheMann64" started this thread

Posts: 340

Occupation: I do accounting, when I'm not cruising the forums

  • Send private message

3

Wednesday, August 8th 2012, 8:49pm

Quoted from "Noguai;563563"

Try

Source code

1
/run ChoiceOption(i)


Cool! That works great for NPC chatting. Do you have a different trick for selecting quests from NPC chat windows?
Govinda
Guild: Theblacknights
Babesmann - Dwarfmann

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

4

Wednesday, August 8th 2012, 9:12pm

To show Questdetails from an NPC window use:

Source code

1
OnClick_QuestListButton(type, i)

Details: http://www.theromwiki.com/API:OnClick_QuestListButton

If you mean accepting them there's the command

Source code

1
/run AcceptQuest()

Completing would be:

Source code

1
/run CompleteQuest()

TheMann64

Intermediate

  • "TheMann64" started this thread

Posts: 340

Occupation: I do accounting, when I'm not cruising the forums

  • Send private message

5

Wednesday, August 8th 2012, 9:22pm

Quoted from "Noguai;563604"

To show Questdetails from an NPC window use:

Source code

1
OnClick_QuestListButton(type, i)

Details: http://www.theromwiki.com/API:OnClick_QuestListButton

If you mean accepting them there's the command

Source code

1
/run AcceptQuest()

Completing would be:

Source code

1
/run CompleteQuest()


Great info. I've got the accepting and completing options down. I think I understand the general concept of how the OnClick_QuestListButton works, but I'm not sure how to activate it. Is there a way to run a /run or /script type command to make it work? Do I have to somehow load it into the game's memory before I click on the NPC?

EDIt: NVM; after researching on theromwiki for a few hours I taught myself how to build some simple functions, and I was able to incorporate the OnClick_QuesListButton into the functions. Thanks again for your help!
Govinda
Guild: Theblacknights
Babesmann - Dwarfmann

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

6

Wednesday, August 8th 2012, 10:14pm

Basically /script or /run (I don't know about any difference between them) compiles the following Lua code and executes it. Every command I have given you right now was only a function call. You just need to add /run to it, that I forgot to do. You could also execute much more complex things, but you need to pay attention that you don't break the code while squeezing it into one line.

TheMann64

Intermediate

  • "TheMann64" started this thread

Posts: 340

Occupation: I do accounting, when I'm not cruising the forums

  • Send private message

7

Wednesday, August 8th 2012, 10:49pm

I tried doing /run OnClick_QuestListButton(1, 1), but that didn't work. I ended up figuring out I could do /script do OnClick_QuestListButton(1, 1), and that's been working wonderfully.

Thanks!
Govinda
Guild: Theblacknights
Babesmann - Dwarfmann