• 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 No load Npc

Elexonic

Well-Known Member
Joined
Jun 18, 2008
Messages
1,920
Reaction score
59
I have this error.
I have a problem when I open my server, I get the following errors in the console.
But if I run the command / n rebel if I make it the npc .. that can be?
greetings.

dibujoqip.png



Zlak.xml-
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Zlak" script="data/npc/scripts/default.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="339" head="0" body="0" legs="0" feet="0" />
</npc>

Rebel.xml-

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Rebel" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="114" head="0" body="0" legs="0" feet="0" />
</npc>

a sleeping dragon.xml -
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="a sleeping dragon" script="a sleeping dragon.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look typeex="128"/>
</npc>

Lizard Tunnel Guard.xml-
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lizard Tunnel Guard" script="data/npc/scripts/Lizard Tunnel Guard.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="338" head="0" body="0" legs="0" feet="0" />
</npc>
 
Last edited:
change
Code:
<npc name="Zlak" script="data/npc/scripts/default.lua" walkinterval="0" floorchange="0">

to
Code:
<npc name="Zlak" script="default.lua" walkinterval="0" floorchange="0">
 
Picachu: Rebel is a npc, i sumon /n rebel and work,but not loaded at startup.

Up:I think it serves no other npc that looks like this and not have it work well: S
 
Picachu: Rebel is a npc, i sumon /n rebel and work,but not loaded at startup.

Up:I think it serves no other npc that looks like this and not have it work well: S

Oh sorry, my bad. :p

I saw wheres your problem.
Its on your spawn.xml :p
Look at the error: addMonster
On spawns.xml your is liek that:

<monster name="Rebel" .... spawntime="60"/>

It should be liek THAT:

<npc name="Rebel" .. spawntime="60"/>
 
Picachu: Rebel is a npc, i sumon /n rebel and work,but not loaded at startup.

Up:I think it serves no other npc that looks like this and not have it work well: S




script="default.lua" the script part must look like this.....not like data/sadas/asdsa/das/d/sad/sa
 
script="default.lua" the script part must look like this.....not like data/sadas/asdsa/das/d/sad/sa

Ye i edited the post and u didnt saw it.
on spawn.xml its monster name=" instead of npc name="
Im pretty sure of it.
Just see the error he is getting on console :p
 
MM I have-
<spawn centerx="33200" centery="31061" centerz="8" radius="1">
<monster name="Rebel" x="1" y="0" z="8" spawntime="60"/>
</spawn>
and
<spawn centerx="33209" centery="31051" centerz="9" radius="1">
<monster name="Rebel" x="1" y="0" z="9" spawntime="60"/>
</spawn>
<spawn centerx="33218" centery="31051" centerz="9" radius="1">
<monster name="Rebel" x="1" y="0" z="9" spawntime="60"/>
</spawn>

In spawn..
edit: AAAAAAAAAA LAL :P wait :P
 
I think it works to try it at night when I'm telling you right Picachu msn

thanks all.

Edit npc Lizard Tunnel Guard, give my error,
anyone have this npc?
thanks.
 
Last edited:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lizard Tunnel Guard" script="data/npc/scripts/Lizard Tunnel Guard.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="338" head="0" body="0" legs="0" feet="0" />
</npc>

LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid)			npcHandler:onCreatureAppear(cid)			end
function onCreatureDisappear(cid)		npcHandler:onCreatureDisappear(cid)			end
function onCreatureSay(cid, type, msg)		npcHandler:onCreatureSay(cid, type, msg)		end
function onThink()				npcHandler:onThink()					end

npcHandler:addModule(FocusModule:new())
function onCreatureSay(cid, type, msg)
local jail = {x=33362, y=31208, z=8}
	doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
	doTeleportThing(cid, jail, TRUE)
	doCreatureSay(cid, 'The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.', TALKTYPE_ORANGE_1)
	doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
                  		doPlayerRemoveItem(cid, 12245, 1)
end
 
Back
Top