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

[HELP] Module for Use or Atack

chupaescadatri

Banned User
Joined
Jul 5, 2014
Messages
338
Reaction score
49
Is it possible to create a USE function in SQM that is in front of the character in the direction he is looking?
usewindow.jpg
 
Yes, it is. You need to get players pos, direction. Then you need to calculate target tile depending on direction. If all that is done you just need to call function g_game.use(useThing) -- (look how it is made in interface.lua), same goes for attack.
Good luck!
 
Yes, it is. You need to get players pos, direction. Then you need to calculate target tile depending on direction. If all that is done you just need to call function g_game.use(useThing) -- (look how it is made in interface.lua), same goes for attack.
Good luck!
Thanks, but it's just the "calculate target tile" that I can not imagine.
As other functions of use and atack is ok.
 
Back
Top