• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TalkAction Local Player command! helps exiva someone!

Damon

Check my status to contact me :)
Joined
Mar 26, 2011
Messages
6,214
Solutions
1
Reaction score
2,033
Location
Germany
this little script shows the player, where he is located!
he just have to look to one side and say !local
and then script tells him, if its nort,south...
so "exiva" will get easier:
Player is far to the nort!
!local
you are looking to north...

i found this script in my ots folder, don't know if you already have it or it is new?

goto:
\data\talkactions\scripts
and create new .lua file named "local"
and add:


PHP:
-- [( Script edited by Doidin )] --
function onSay(cid, words, param)

local direction = getCreatureLookDirection(cid)

if direction == NORTH then
doPlayerSendTextMessage(cid, 23, "You are looking to north.")

elseif direction == EAST then
doPlayerSendTextMessage(cid, 23, "You are looking to east.")

elseif direction == SOUTH then
doPlayerSendTextMessage(cid, 23, "You are looking to south.")

elseif direction == WEST then
doPlayerSendTextMessage(cid, 23, "You are looking to west.")
end
return TRUE
end

then add to talkactions.xml

PHP:
<talkaction words="!local" event="script" value="local.lua"/>

Kind Regards,
Damon

if new, pls rep++
 
hehe, thanks! I will not have to lookup throught my whole dictionary to know where my character is looking now.

@
Not really, but it may be useful for peoples that just don't know proper words for directions in english. Otherwise, useless.
 
lol, using the script from LUA_FUNCTIONS.
you just added the 'function onSay(cid, words, param)' and the return true <.<
 
Great for non-native speakers that don't have a compass on their gran hur hotkey :p

Red
 
Back
Top