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

Lua [TalkAction] Range Problem

DanneZ

Web-Scripting-Design-Host
Joined
Jan 16, 2010
Messages
84
Reaction score
2
Location
Sweden
Hello Dear Otland People!
If player stand within 1 Square from you, he will be teleported when you say the words.
Like an spell but in talkactions =/

Is there something like this:
Code:
If getPlayerRangeFromYou(player) == 1 Square Then 
doTeleportThing(player, npos)

Thanks for your help hope to solve this!
Yours DanneZ.
 
Isn't getCreaturePosition better?

Getting this error when i use it.
[09/06/2011 14:13:04] [Error - TalkAction Interface]
[09/06/2011 14:13:04] data/talkactions/scripts/lowpvp.lua:eek:nSay
[09/06/2011 14:13:04] Description:
[09/06/2011 14:13:04] (luaGetThingPosition) Thing not found

[09/06/2011 14:13:04] [Error - TalkAction Interface]
[09/06/2011 14:13:04] data/talkactions/scripts/lowpvp.lua:eek:nSay
[09/06/2011 14:13:04] Description:
[09/06/2011 14:13:04] data/lib/032-position.lua:6: attempt to index local 'toPosition' (a boolean value)
[09/06/2011 14:13:04] stack traceback:
[09/06/2011 14:13:05] data/lib/032-position.lua:6: in function 'getDistanceBetween'
[09/06/2011 14:13:05] data/talkactions/scripts/lowpvp.lua:19: in function <data/talkactions/scripts/lowpvp.lua:10>

You saying this is better?
if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(player)) == 1 then
 
Hello Dear Otland People!
If player stand within 1 Square from you, he will be teleported when you say the words.
Like an spell but in talkactions =/

Is there something like this:
Code:
If getPlayerRangeFromYou(player) == 1 Square Then 
doTeleportThing(player, npos)

Thanks for your help hope to solve this!
Yours DanneZ.

I may help you if you explain more in detail what the script needs to do.
 
Back
Top