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

SnorkY

Veteran OT User
Joined
Nov 28, 2007
Messages
1,395
Reaction score
264
Hello.

I use remere's mapeditor and avesta 7.6

Non of the NPCs i have come to the map, heres how one of my NPCs look like.

I place an NPC with a name "Gorn" on the map in mapeditor.

the NPC file is called Gorn, and here are the scripts

XML

Code:
<npc name="Gorn" script="data/npc/scripts/seller.lua" autowalk="0" floorchange="0" access="5" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="134" head="114" body="113" legs="113" feet="113" addons="3" corpse="2212"/>
	<parameters>
		<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell ropes (50gp), shovels (10gp), pot (100gp), backpacks (10gp), and machete. I buy vials (10gp)" />
		<parameter key="shop_buyable" value="vial,2006,10;flask,2006,10" />
		<parameter key="shop_buyable" value="shovel,2554,10;backpack,1988,10;rope,2120,50;pot,2562,100,0;machete,2420,50" />
	</parameters>
</npc>

LUA

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

-- OTServ event handling functions start
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
-- OTServ event handling functions end

npcHandler:addModule(FocusModule:new())

I have no idé why the NPC does not come to the server, I get not errors either...

Thanks! =)

EDIT : when i open remere's map editor it says "item.xml cannot be found" or something similar.
 
Last edited:
Code:
<parameter key="shop_buyable" value="shovel,2554,10;backpack,1988,10;rope,2120,50;pot,2562,100,0;machete,2420,50" />
to
Code:
<parameter key="shop_buyable" value="shovel,2554,10;backpack,1988,10;rope,2120,50;pot,2562,100;machete,2420,50" />
 
Code:
<parameter key="shop_buyable" value="shovel,2554,10;backpack,1988,10;rope,2120,50;pot,2562,100,0;machete,2420,50" />
to
Code:
<parameter key="shop_buyable" value="shovel,2554,10;backpack,1988,10;rope,2120,50;pot,2562,100;machete,2420,50" />

I don't think that is the problem, since non of the NPCs work.
 
I'm using Avesta.

I got the same names of the NPCs on the mapeditor as i have on the server. When the server is opened it said "Cannot find (ALL NPC NAMES)"
 
The server keeps crashing with my Avesta, got a better sugestion of what version i should use or even another server?

Thanks...
 
Back
Top