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

{QUEST} Help plx with Inquisitor Quest missions

Bulet

Knight of Apocalypse
Joined
Jul 12, 2009
Messages
183
Reaction score
9
Location
Brazil
Script of Henricus from Inquisitor Mission any idea here is bug i cant find him test a lot times but cant fix that.

FIXED !!!!!
 
Last edited:
Test this
LUA:
local config = {
		gnle1 = { x = 32779, y = 31977, z = 9, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }, -- Garlick Necklace 1 spot
		gnle2 = { x = 32777, y = 31982, z = 9, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }, -- Garlick Necklace 2 spot
		gnle3 = { x = 32781, y = 31982, z = 9, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }, -- Garlick Necklace 3 spot
		mstorage = 1290,
		gnleID = 2199,
		gnle1P = getThingFromPos(config.gnle1),
		gnle2P = getThingFromPos(config.gnle2),
		gnle3P = getThingFromPos(config.gnle3),
				}

	function onUse(cid, item, fromPosition, itemEx, toPosition)		    
		if getPlayerStorageValue(cid,config.mstorage) == -1 then	
			doCreatureSay(cid, "You can cast me maybe you need perform another missions.", TALKTYPE_ORANGE_1)
			
		elseif getPlayerStorageValue(cid,config.mstorage) >= 2 then		
			doPlayerSendCancel(cid, "You already made this mission.")
			
		elseif getPlayerStorageValue(cid,config.mstorage) == 1 then
		
			if(item.itemid == 1416) then
				
				if((gnle1P.itemid ~= config.gnleID) or (gnle2P.itemid ~= config.gnleID) or (gnle3P.itemid ~= config.gnleID)) then
					doPlayerSendCancel(cid, "Place the Garlick Necklace on the correct spot.")
				else	
					doRemoveItem(config.gnle1P.uid, 1)
					doRemoveItem(config.gnle2P.uid, 1)
					doRemoveItem(config.gnle3P.uid, 1)
					doSendMagicEffect(config.gnle1P, CONST_ME_POFF)
					doSendMagicEffect(config.gnle2P, CONST_ME_POFF)
					doSendMagicEffect(config.gnle3P, CONST_ME_POFF)
					doCreatureSay(cid, "Who insists caster me!", TALKTYPE_ORANGE_1)
					doSummonCreature("The Count", getPlayerPosition(cid).x+1)
					doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
					setPlayerStorageValue(cid,config.mstorage,2)
				end
			end

				elseif(item.itemid == 1946) then
					doTransformItem(item.uid, item.itemid - 1)
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		end
	return TRUE
	end

And if it's still an error something with "getThingFromPos", test this:
LUA:
local config = {
		mstorage = 1290,
		gnleID = 2199,
		gnle1P = getThingFromPos({ x = 32779, y = 31977, z = 9, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }),
		gnle2P = getThingFromPos({ x = 32777, y = 31982, z = 9, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }),
		gnle3P = getThingFromPos({ x = 32777, y = 31982, z = 9, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE }),
				}

	function onUse(cid, item, fromPosition, itemEx, toPosition)		    
		if getPlayerStorageValue(cid,config.mstorage) == -1 then	
			doCreatureSay(cid, "You can cast me maybe you need perform another missions.", TALKTYPE_ORANGE_1)
			
		elseif getPlayerStorageValue(cid,config.mstorage) >= 2 then		
			doPlayerSendCancel(cid, "You already made this mission.")
			
		elseif getPlayerStorageValue(cid,config.mstorage) == 1 then
		
			if(item.itemid == 1416) then
				
				if((gnle1P.itemid ~= config.gnleID) or (gnle2P.itemid ~= config.gnleID) or (gnle3P.itemid ~= config.gnleID)) then
					doPlayerSendCancel(cid, "Place the Garlick Necklace on the correct spot.")
				else	
					doRemoveItem(config.gnle1P.uid, 1)
					doRemoveItem(config.gnle2P.uid, 1)
					doRemoveItem(config.gnle3P.uid, 1)
					doSendMagicEffect(config.gnle1P, CONST_ME_POFF)
					doSendMagicEffect(config.gnle2P, CONST_ME_POFF)
					doSendMagicEffect(config.gnle3P, CONST_ME_POFF)
					doCreatureSay(cid, "Who insists caster me!", TALKTYPE_ORANGE_1)
					doSummonCreature("The Count", getPlayerPosition(cid).x+1)
					doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
					setPlayerStorageValue(cid,config.mstorage,2)
				end
			end

				elseif(item.itemid == 1946) then
					doTransformItem(item.uid, item.itemid - 1)
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		end
	return TRUE
	end
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local removals = 
	{
        {x = 32780, y = 31976, z = 9, stackpos = 255},
        {x = 32778, y = 31980, z = 9, stackpos = 255},
        {x = 32782, y = 31980, z = 9, stackpos = 255}
    }
   
ret = false
--if getPlayerStorageValue(cid, 1889) == 22 then   
	for i = 1, #removals do
		local amuletos = getThingfromPos(removals[i])
		if amuletos.itemid == 2199 then
			doRemoveItem(getThingfromPos(removals[i]).uid, 1)
			doCreateMonster("The Count", {x = 32780, y = 31980, z = 9})
		else
			ret = true
		end
	end
		if ret then 
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You need to put the amulets in the altars.")
		end	
--else
--	doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You aren't a member of the inquisition.")
--end
    return TRUE
end

add whatever you need..
 
Code:
local config = {
	garlicPos = {
			{ x = 32779, y = 31977, z = 9},
			{ x = 32777, y = 31982, z = 9},
			{ x = 32781, y = 31982, z = 9}
			},
	storage = 1290,
	garlicID = 2199
	}
		
function onUse(cid, item, fromPosition, itemEx, toPosition)		    
	if getPlayerStorageValue(cid, config.storage) == -1 then	
		doCreatureSay(cid, "You can cast me maybe you need perform another missions.", TALKTYPE_ORANGE_1)
	elseif getPlayerStorageValue(cid, config.storage) > 1 then
		doPlayerSendCancel(cid, "You already made this mission.")
	elseif getPlayerStorageValue(cid, config.storage) == 1 then
		for i, v in ipairs(config.garlicPos) do
			if getTileItemById(v[i], config.garlicID).uid <= 0 then
				doPlayerSendCancel(cid, "Place the Garlick Necklace on the correct spot.")
				return false
			else
				doRemoveItem(getTileItemById(v[i], config.garlicID).uid)
				doSendMagicEffect(v[i], CONST_ME_POFF)
			end
		end
		doCreatureSay(cid, "Who insists caster me!", TALKTYPE_ORANGE_1)
		doSummonCreature("The Count", getThingPos(cid))
		doSendMagicEffect(fromPosition, CONST_ME_ENERGYAREA)
		setPlayerStorageValue(cid, config.storage, 2)
	end
return true
end
 
Last edited:
Code:
local config = {
	garlicPos = {
			{ x = 32779, y = 31977, z = 9, stackpos = 255},
			{ x = 32777, y = 31982, z = 9, stackpos = 255},
			{ x = 32781, y = 31982, z = 9, stackpos = 255}
			},
	storage = 1290,
	garlicID = 2199
	}
		
function onUse(cid, item, fromPosition, itemEx, toPosition)		    
	if getPlayerStorageValue(cid, config.storage) == -1 then	
		doCreatureSay(cid, "You can cast me maybe you need perform another missions.", TALKTYPE_ORANGE_1)
	elseif getPlayerStorageValue(cid, config.storage) > 1 then
		doPlayerSendCancel(cid, "You already made this mission.")
	elseif getPlayerStorageValue(cid, config.storage) == 1 then
		for i, v in ipairs(config.garlicPos) do
			if getThingFromPos(v[i]).itemid ~= config.garlicID then
				return doPlayerSendCancel(cid, "Place the Garlick Necklace on the correct spot.")
			else
				doRemoveItem(getThingFromPos(v[i]).uid)
				doSendMagicEffect(v[i], CONST_ME_POFF)
			end
		end
		doCreatureSay(cid, "Who insists caster me!", TALKTYPE_ORANGE_1)
		doSummonCreature("The Count", getThingPos(cid))
		doSendMagicEffect(fromPosition, CONST_ME_ENERGYAREA)
		setPlayerStorageValue(cid, config.storage, 2)
	end
return true
end
 
Last edited:
@Sypher
line 4 'stackpos' i think is the '," no ?
and if put all ',' bug back again to 'getThingFromPos' line 18
 
@Sypher

we try use that part from StreamSide script
Code:
local amuletos =  getThingfromPos(removals[i])
                if amuletos.itemid == 2199 then
                        doRemoveItem(getThingfromPos(removals[i]).uid, 1)
                        doCreateMonster("The Count", {x = 32780, y = 31980, z = 9})

Code:
[Error - Action Interface]
data/actions/scripts/inq/thecount.lua:onUse
Description:
attempt to index a nil value
stack traceback:
        [C]: in function 'getThingFromPos'
        data/actions/scripts/inq/thecount.lua:18: in function <data/actions/scri
pts/inq/thecount.lua:11>

Thats scripts has tired me today rsrs
Mine version is TFS 0.3.6pl1
 
Last edited:
No more ???? I need that too
I tested StreamSide script but summon 3 THE COUNT and is to simple than that you Bulet and Sypher has doing plx finish him ...
 
No more ???? I need that too
I tested StreamSide script but summon 3 THE COUNT and is to simple than that you Bulet and Sypher has doing plx finish him ...

Sorry but i dont know what can i do more i lost around of 4 hours making that script now Sypher has help me but we cant make thats work ... im with you waiting help :peace:
 
Back
Top