Page 9 of 9

Re: createpath + getid + getpos together

Posted: Sun May 17, 2015 10:58 am
by Bill D Cat
I fixed it just fine with what I posted previously. I'll just use that in my copy of createpaths since it generates working code that the bot can understand at runtime. I moved the check for if optiontext == getTEXT("HOUSE_MAID_LEAVE_TALK") to the start of the ChoiceOptionByName() function and everything is working fine here.

I did a few tests by entering a number larger than the total available chat frame options and it correctly handles the error condition. It is only the last option for "Leave conversation" that returns nil, so my fix I posted earlier to the getChoice() function works every time I've tried it.

Re: createpath + getid + getpos together

Posted: Mon Jul 06, 2015 3:09 am
by BlubBlab
After I read this thread to be clear getKeyStrings(..) take the name of an item or mob and return one or a list if matching ids ?
and how long it takes?

Re: createpath + getid + getpos together

Posted: Mon Jul 06, 2015 6:37 am
by rock5
No, this takes a string you see in the game and returns the key string, as I call it. Eg.

Code: Select all

Command> print(getKeyStrings('Introduction to the Auction House'))
        SO_110049_1
This excludes id names such as items and npc names because they had to be excluded to make the function run fast enough.

What you describe can be done with a function from my ToolipIds addons. Eg.

Code: Select all

Command> table.print(RoMScript("GetNameIds('Mailbox')"))
table: 055D40A8
1:      110538
2:      110694
3:      110793
4:      112112
5:      112113
6:      112778
7:      113136
8:      114779
9:      116936
10:     117407
11:     118480
12:     118670
13:     118688
14:     119274
15:     119538
16:     119944
17:     121485
18:     122097
19:     123006
I think the first time it runs it might take a couple of seconds but then it's near instantaneous as it's just a table look-up.

Re: createpath + getid + getpos together

Posted: Mon Jul 06, 2015 8:58 am
by BlubBlab
I have implemented something similar scanning all those ids and putting in table and then save the table into the cache directory. I only took a look because I remembers you guys talked about something similar and I thought maybe this it is ^^ I'm nearly finished with the quest reward function getBestChoiceForItems(item_list), I properly must copy some code out of the item class again(or built my own Item) because all my eval function take an item and not the object from getRaterDataById.