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

Windows Help! My server do not read the . LUA

grabb_666

Z-athura.mine.nu
Joined
Apr 1, 2008
Messages
60
Reaction score
1
Location
Sweden
Look at this:

erroruo.jpg


Dunno what's wrong ;S


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

npcHandler:addModule(FocusModule:new())


Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- Topic
local talkState = {}

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 onPlayerEndTrade(cid)              npcHandler:onPlayerEndTrade(cid) end
function onPlayerCloseChannel(cid)          npcHandler:onPlayerCloseChannel(cid) end
function onThink()                          npcHandler:onThink() end

-- Boat --
local travelNode = keywordHandler:addKeyword({"Inferesla}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Inferesla for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=780, y=547, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"Newmore}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Newmore for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=988, y=299, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"House island}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to House island for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=304, y=254, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"Prince}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Prince for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=293, y=30, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"Marlboro}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Marlboro for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=543, y=546, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})


-- Talk modules
function creatureSayCallback(cid, type, msg)
	if(not npcHandler:isFocused(cid)) then
		return false
	end


	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
	if(msgcontains(msg, "Yo")) then
  selfSay("Hello..!  Where do you want to go? Newmore, Prince, Inferesla, Marlboro, House Island?", cid)
	elseif(msgcontains(msg, "Hello")) then
  selfSay("Hello..!  Where do you want to go? Newmore, Prince, Inferesla, Marlboro, House Island?", cid)
	elseif(msgcontains(msg, "Hi")) then
  selfSay("Hello..!  Where do you want to go? Newmore, Prince, Inferesla, Marlboro, House Island?", cid)
	elseif(msgcontains(msg, "Newmore")) then
  selfSay("Here you go!", cid)
	elseif(msgcontains(msg, "Marlboro")) then
  selfSay("Here you go!", cid)
	elseif(msgcontains(msg, "Prince")) then
  selfSay("Here you go!", cid)
	elseif(msgcontains(msg, "House Island")) then
  selfSay("Here you go!", cid)
	elseif(msgcontains(msg, "Houseisland")) then
  selfSay("Here you go!", cid)
	elseif(msgcontains(msg, "inferesla")) then
  selfSay("Here you go!", cid)
	elseif(msgcontains(msg, "Inferesla")) then
  selfSay("Here you go!", cid)

	end

	return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())




Help me somone :/
 
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 onPlayerEndTrade(cid)              npcHandler:onPlayerEndTrade(cid) end
function onPlayerCloseChannel(cid)          npcHandler:onPlayerCloseChannel(cid) end
function onThink()                          npcHandler:onThink() end

local travelNode = keywordHandler:addKeyword({"Inferesla"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Inferesla for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=780, y=547, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"Newmore"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Newmore for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=988, y=299, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"House island"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to House island for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=304, y=254, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"Prince"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Prince for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=293, y=30, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})
local travelNode = keywordHandler:addKeyword({"Marlboro"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = "Do you want to travel to Marlboro for 0 gold coins?"})
    travelNode:addChildKeyword({"yes"}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=543, y=546, z=6} })
    travelNode:addChildKeyword({"no"}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = "I wouldn't go there either."})

npcHandler:setMessage(MESSAGE_GREET, "Hello!  Where do you want to go? {Newmore}, {Prince}, {Inferesla}, {Marlboro} or {House Island}?")
npcHandler:addModule(FocusModule:new())
 
This is my default.lua file and on the Forgotten console it said the same thing like boat.lua

cannot loader script

This is my Default.lua:

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

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end

npcHandler:addModule(FocusModule:new())
 
Back
Top