kuks
New Member
- Joined
- Apr 30, 2017
- Messages
- 24
- Reaction score
- 3
Hi all,
I would like create my own NPC "Captain Jack" and i think everythink is fine but my serwer didn't read this npc.
This is error from my consol but i don't know why he read double line data/npc/scripts/data/npc/scripts/
data/NPC/scripts/Captain Jack
data/NPC/Captain Jack
I would like create my own NPC "Captain Jack" and i think everythink is fine but my serwer didn't read this npc.
This is error from my consol but i don't know why he read double line data/npc/scripts/data/npc/scripts/
Code:
[Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/Captain Jack.lua
cannot open data/npc/scripts/data/npc/scripts/Captain Jack.lua: No such file or directory
data/NPC/scripts/Captain Jack
Code:
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
local travelNode = keywordHandler:addKeyword({'Roshamuul'}, StdModule.say, {npcHandler = npcHandler, text = 'Do you want go to Roshamuul?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = Position(1555, 819, 7) })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, reset = true, text = 'We would like to serve you some time.'})
npcHandler:addModule(FocusModule:new())
data/NPC/Captain Jack
Code:
<npc name="Captain Jack" script="data/npc/scripts/Captain Jack.lua" autowalk="1" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="133" head="20" body="120" legs="75" feet="13" corpse="2212"/>
<parameters>
</parameters>
</npc>