• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Ghost of a priest error

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
Hello, i'm testing out the wrath of the emperor and i got to the npc ghost of a priest and then it kinda bugged, since i only answered me with "hi" and then he just didnt say anything so i thought i could take 2 other "ghost of a priest" lua/xml files but then i got this error... and since i'm the the best lua scripter i thought you guys could help me :)


ghostofapriest.jpg


and here is the npc file wich i got from that wrath of the emperor beta version

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)
				addEvent(npcHandler:say, 5000, "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)
				addEvent(npcHandler:say, 5000, "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)
				addEvent(npcHandler:say, 5000, "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())


kind regards Glidarn
 
I did, but i gave up after this, when i get to chartan he doesnt answer and when i finally got him to answer i could not enter the door to fix all the stuffs with obbi knife and such. its really bumming me out

Its not that easy nabzor x) you must Edit doors etc , because your Map got aid/uid's from barker's leaked wote :ninja:
 
Back
Top