• 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!

OTClient onMousePress not getting called

poe6man3

Member
Joined
Aug 6, 2020
Messages
87
Solutions
1
Reaction score
12
Using v8

I started learning some otclient coding style and right away i meet a brick wall
Here is the code i started with just wanted to see if this function is gonna get called

Lua:
function init()
    connect(g_game, {
        onGameStart = online,
        onGameEnd = offline,
        onMousePress = onMousePress,
    })
end

function terminate()
    disconnect(g_game, {
        onGameStart = online,
        onGameEnd = offline,
        onMousePress = onMousePress,
    })
  destroy()
end

function onMousePress(mousePos, button)
    print("pizza grande")
    --print(mousePos.x, mousePos.y, mousePos.z)
    --print(button)
end
And its not working, i was thinking maybe im going giga retard mode but i try with function onWalk() and it was working so my guess is i have not meet some requirments to use the function ?
Can anybody provide me some info.
 
Back
Top