Anyone could help? [OTCv8] Aim on battle list is unreliable #gamebreaking

/Liro

Advanced OT User
Joined
Jan 18, 2010
Messages
441
Reaction score
167
When aiming on battle list, if the creature is moving, the client often targets the floor tile where the creature was instead of the creature itself, which causes the server to return RETURNVALUE_CANONLYUSETHISRUNEONCREATURES if the rune requires a creature target.
I've tried offsetting to account for this but ultimately been unsuccessful (I think) due to variable creature speeds.

The code below executes when you manually aim a rune on the battle list.

Code:
local creature = clickedWidget:getCreature()
if creature then
g_game.useWith(selectedThing, creature, selectedSubtype)
end
clickedWidget:getCreature() passes the position that the creature is in at the moment of clicking to g_game.useWith which uses that position.

I've tried changing this to work with the creatureId instead but get the same result:

Code:
local creature = clickedWidget:getCreature()
local creatureId = creature:getId()
if creature then
g_game.useWith(selectedThing, g_map.getCreatureById(creatureId), subType)
end
The issue may also be heavily latency based. If the client is collecting and passing the creature pos according to the client (which may be 100+ ms behind server), there is more chance that when the server registers the action, the creature will no longer be at the position.

 
Last edited:

Penthelisea

Member
Joined
Nov 13, 2011
Messages
61
Reaction score
16
@/Liro
Just use GameForceAllowItemHotkeys

@rest of the thread participants
I recommend looking things up before you jump onto the bandwagon of hate, laughing at things you didn't check yourself says a lot about you, guys.
no work this bro i add this g_game.enableFeature(GameForceAllowItemHotkeys) and not work
 
Top