blackdtools / Blackd-Proxy-CLASSIC

Blackd Proxy CLASSIC
MIT License
9 stars 7 forks source link

Possible issue with exiva check and it's result $lastchecktileid$ #45

Open Nrated opened 8 years ago

Nrated commented 8 years ago

Well...I'm not sure about this cuz I've found this problem on OT server 7.6 so it might work for other tibia versions/servers but here's the thing: If there's more than one permament item on the pos, and you will throw cash or anything on top of it, then check will "look" at cash but $lastcheckresult$ returns ID of permament item behind cash Damn...I wish I could explain this thing better but im bounded by my english skills It has to be tested anyways : P

Beggari commented 8 years ago

Lately I discovered a bug on it, as well.

I was using a script that would "look" (exiva check) at xyz and get the item from that sqm to BP. So what I was doing was: exiva check xyz then exiva > packet to move from ground to container. Where the item ID bit is I was using $lastchecktileid$ because I think there is no "take all item ID" code, such as using FF FF or 00 00 (perhaps I just don't know it).

So if there was like 10 different items on that sqm and I run the script, it would exiva check that sqm and then move the item to my BP. What happens is that after taking some items, $lastchecktileid$ "stopped working". It was working and taking lets say item AA AA, BB BB etc and then AFTER taking BB BB to my bp and using exiva check again, the $lastchecktileid$ was ALWAYS returning the BB BB (which already had been moved to my BP), even though the exiva check was "looking" to the right sqm and looking the right item (the one on top).

Maybe I didn't explain it very well, so I'll try to make explain better

exiva check xyz (sees item tile id AA AA) exiva > packettomoveetc $lastchecktileid$ (returns AA AA)
^This one worked and moved item AA AA to my BP. Then loops the code, same thing happen with different item exiva check xyz (sees item tile id BB BB) exiva > packettomoveetc $lastchecktileid$ (returns BB BB) ^Worked again and moved item BB BB to my BP. And it works a few times, until this happens: exiva check xyz (sees item tile id CC CC) exiva > packettomoveetc $lastchecktileid$ (returns BB BB) ^Doesn't work. It will try to move item BB BB (which have already been moved earlier) when it should move CC CC.

Is there a way to move any id ? That would be SO good for so many things...

Nrated commented 8 years ago

I don't know if it's something with stack pos in older tibia, exiva check function or Matrix itself You should do some tests considering the "BB BB" item and it's properties like alwaysOnTop, isMoveable, etc

You can't move "any" item except if server is bugged and accepts invalid packets. There has to be valid ID, item count and stackPos and since there's some kind of problem with reading stack then you won't be able to get it right Sounds like Matrix isn't removing items from stack properly but I might be wrong