• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

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

/Liro

Advanced OT User
Joined
Jan 18, 2010
Messages
465
Reaction score
191
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:
@/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
 
Do you trying to edit the

local creature = ClickedWidget feature?
 
modules->features.lua
Lua:
g_game.enableFeature(GameForceAllowItemHotkeys)
 
Back
Top