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

Solved Need help with simple LUA script

Kvix

New Member
Joined
Jan 21, 2010
Messages
9
Reaction score
0
So a lot of servers that I find use custom items and maps are sometimes very confusing. I wanna make a "tutorial" for the new users of nrkyOT, with this NPC teleporting them to rooms and with messages telling them how and what some of the items do and so on and so forth. Right now I'm trying to figure out how to teleport the user and also talk to him while doing so.

This is the current script I have wrote, and I don't know what's wrong but I can't seem to get myself teleported by the doTeleport(bla,bla) function.

Code:
if msgcontains(msg, "nrkyOT") then
         selfSay("{♫} I will show you the server! {♫}", cid)
         --Do stuff and teleport user to areas while sending messages to tell him how and what to do
         --Sleep so user than read and check out what the items are
         --This will teleport the user back to the base after the journey
         doTeleport(cid, posi.spawn)
         doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"And now we're back here, so you can start your own journey!")
end

No errors show up in the console either, he just doesn't respond to nrkyOT message. Not even with the line "I will show you the server".

What did I do wrong?

posi.spawn is this
Code:
local posi = {
    spawn = {x="1000",y="1003",z="7"}

}
 
Last edited:
Post the whole script and tell us what server version you're using.
Example: TFS 1.X, TFS 0.2, etc.

The teleport function should be like this:
Code:
doTeleportThing(cid, posi.spawn)
 
Back
Top