• 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 npc question

Emky

Not Active Member
Joined
May 15, 2015
Messages
345
Reaction score
49
is there a way to spawn an npc on the map via lua script as soon the server start instead of adding it directly in RME?

using otserv/othire
 
I'm doing it that way - make npc say /s <npcname> - if he has the access, the command should work and spawn the npc that you want - no idea if it will work on your server, but give it a try!
 
Note: Npc spawned into game have no 'border'.. meaning they can walk anywhere, with no restrictions.
Code:
<globalevent name="npc_start_up" type="start" event="script" value="npc_start_up.lua"/>
Code:
function onStartup()
   doCreateNpc("npc name", {x = 1000, y = 1000, z = 7})
   return true
end
No idea if othire has globalevents though.
 
Back
Top