|
Post by Titan on Mar 17, 2015 16:40:04 GMT
This is an annoying one. Currently any scripts using the itemid property are working but not all the time. If there are any additional items on the blank ground tile with the intended item then the .itemid will return the wrong value. I will need to do more testing to determine the order in which it finds the ids.
To give an example of the bug we can look at using an obsidian knife to skin a dragon lord. If the dragon lord is on a blank ground tile then using the obsidian knife will work perfectly as intended. If the body of the dragon lord is on top pebbles, ground texture, even a border, the .itemid property will return the item id for the wrong item and the dragon lord will not be skinned.
A very similar problem occurs when you place one of those pink flame things on the pedestal to access Yalahar demons. The script is acting perfectly but when the flame is places on top the pedestal the .itemid property reads the item id of the pedestal rather than the flame and will always return false. Once I removed the pedestal and left a blank ground tile the portal worked perfectly.
I have done no research into this bug yet so I do not know how easy a solution will be.
|
|
|
Post by Titan on Mar 17, 2015 16:52:52 GMT
After a brief search I found a plausible solution. I found a function getTileItemById(pos, itemid).uid which will return a positive number if a certain id is in a specific position (in the stack). I will test this out tonight by checking for this function rather than the .itemid property. Fingers crossed!
|
|
|
Post by masterslacker on Mar 17, 2015 17:20:25 GMT
Very interesting o.o keep up the great work!
|
|
|
Post by Titan on Mar 17, 2015 19:32:14 GMT
Found the reason for the bug. Apparently its an issue with how OTclient reads the target not an issue with the actual scripts. We should try to find if this is fixed in some version of otclient. Also, for now I used getTileItemById(pos, itemid) to make a few quests work that didnt before (on OT client).
|
|