• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action deleted thread

Not bad. I downloaded the first beta, it's safe. I'll try it out Tecky, thanks for sharing.
 
Amazing ... But release The New Frontier. <3

Will do, but atm I need to stabilize wote. I'will probably release it one day after I release wote alpha 1.

@edit

rev 3 is out
 
Last edited:
Code:
[Warning - NpcEvents: :NpcEvents] Cannot load script: data/npc/scripts/ghost of a priest.lua

[Error - LuaInterface::loadFile] data/npc/scripts/ghost of a priest.lua:26: function arguments expected near ','

Just this error then Im ready to try it out. :)
 
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
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 onThink()
	npcHandler:onThink()
end
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, "mission")) then
		if(getPlayerStorageValue(cid, STORAGE_ZALAMON) == 4) then
			if(getPlayerStorageValue(cid, STORAGE_GHOST) < 1) then
				npcHandler:say("Although we are willing to hand this item to you, there is something you have to understand: There is no such thing as 'the' sceptre. ...", cid)
				npcHandler:say("Those sceptres are created for special purposes each time anew. Therefore you will have to create one on your own. It will be your mission to find us three keepers and to get the three parts of the holy sceptre. ...", cid, true)
				npcHandler:say("Then go to the holy altar and create a new one.", cid, true)
				setPlayerStorageValue(cid, STORAGE_GHOST, 1)
			elseif(getPlayerStorageValue(cid, STORAGE_GHOST) > 0) then
				npcHandler:say("Even though we are spirits, we can't create anything out of thin air. You will have to donate some precious metal which we can drain for energy and substance. ...", cid)
				npcHandler:say("The equivalent of 5000 gold will do. Are you willing to make such a donation?", cid, true)
				talkState[talkUser] = getPlayerPosition(cid).z
			end
		end
	elseif(msgcontains(msg, "yes")) then
		if(talkState[talkUser]) then
			if(getPlayerMoney(cid) >= 5000) then
				doPlayerAddItem(cid, 12339 - talkState[talkUser], 1)
				doPlayerRemoveMoney(cid, 5000)
				npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple. ", cid)
			else
				npcHandler:say("If you bring me 5000 gold we can talk this out, if no then no.", cid)
			end
			talkState[talkUser] = 0
		end
	elseif(msgcontains(msg, "no") and talkState[talkUser]) then
		npcHandler:say("No deal then.", cid)
		talkState[talkUser] = 0
	end
	return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Try this out.
 
Alright, Started up with not a single error now. Though im getting errors while talking to Zalamon. He's answering to Hi but when asking for a mission.

Code:
[Error - NpcScript Interface]
data/npc/scripts/zalamon.lua:onCreatureSay
Description:
data/npc/lib/npcsystem/npchandler.lua:623: attempt to compare boolean with number
stack traceback:
data/npc/lib/npcsystem/npchandler.lua:623: in function 'say'
data/npc/scripts/zalamon.lua:32: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:423: in function 'onCreatureSay'
data/npc/scripts/zalamon.lua:12: in function <data/npc/scripts/zalamon.lua:11>
 
Alright, Started up with not a single error now. Though im getting errors while talking to Zalamon. He's answering to Hi but when asking for a mission.

Code:
[Error - NpcScript Interface]
data/npc/scripts/zalamon.lua:onCreatureSay
Description:
data/npc/lib/npcsystem/npchandler.lua:623: attempt to compare boolean with number
stack traceback:
data/npc/lib/npcsystem/npchandler.lua:623: in function 'say'
data/npc/scripts/zalamon.lua:32: in function 'callback'
data/npc/lib/npcsystem/npchandler.lua:423: in function 'onCreatureSay'
data/npc/scripts/zalamon.lua:12: in function <data/npc/scripts/zalamon.lua:11>

You sure you copied and loaded successfully 101-wrath of the emperor lib? And what distro and revision are you using?

The error might be here: \data\npc\lib\npcsystem\npchandler.lua
In:
Lua:
	function NpcHandler:say(message, focus, shallDelay)
		local shallDelay = shallDelay or false
		if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE or not shallDelay) then
			if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
				selfSay(message, focus)
				return
			else
				selfSay(message)
				return
			end
		end

		-- TODO: Add an event handling method for delayed messages
		if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
			self.talkDelay[focus] = {
				message = message,
				time = os.time() + self.talkDelayTime,
			}
		else
			self.talkDelay = {
				message = message,
				time = os.time() + self.talkDelayTime
			}
		end
	end
 
You sure you copied and loaded successfully 101-wrath of the emperor lib? And what distro and revision are you using?

The error might be here: \data\npc\lib\npcsystem\npchandler.lua
In:
Lua:
	function NpcHandler:say(message, focus, shallDelay)
		local shallDelay = shallDelay or false
		if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE or not shallDelay) then
			if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
				selfSay(message, focus)
				return
			else
				selfSay(message)
				return
			end
		end

		-- TODO: Add an event handling method for delayed messages
		if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then
			self.talkDelay[focus] = {
				message = message,
				time = os.time() + self.talkDelayTime,
			}
		else
			self.talkDelay = {
				message = message,
				time = os.time() + self.talkDelayTime
			}
		end
	end

It loaded correctly, Using TFS 0.4 rev 3884. I think it's something with the Npc handler because I changed it a time ago.
 
It loaded correctly, Using TFS 0.4 rev 3884. I think it's something with the Npc handler because I changed it a time ago.

0.4 you say. The whole code is made for 0.3.6. :s When I release alpha I'll make this quest working on 0.2 and 0.4 but right now I need to make it bug free.
 
Used movements in Your script
for the rooms are much better and instead of putting the teleport with the map editor put it here, plus so you can add to quest.log


local pos1 = {x=33186, y=32938, z=11}
function onStepIn(cid, item, pos)

if getPlayerStorageValue(cid, storage) == -1 then
doPlayerSetStorageValue(cid, storage, 1)
doCreatureSay(cid, "Text enter in room", TALKTYPE_ORANGE_1)
doTeleportThing(cid, pos1)
else
doPlayerSendCancel(cid, "You already have completed this room..!")
end

return true
end

looks good hope to see an update, have if I can help with something..
 
Humm.. Can you describe what missions are included in it , is it like rl ? or it is only the last missions? Don't tell me download and see.
 
Humm.. Can you describe what missions are included in it , is it like rl ? or it is only the last missions? Don't tell me download and see.
All misssions but first It's like 90% rl. Fully real dialogues.
 
That's must have been tooo boring to make, nice work. I would have never release that for free. :)
 
Back
Top