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

Lua Need little help with this quest.

Sopelek

New Member
Joined
Jan 4, 2009
Messages
46
Reaction score
0
I have problem, this is other way to do this quest.
I want to do it like :
Player use the lever, handmaiden summon, if handamiden dead he can summon next. If player dead handmaiden not, handmaiden disappear.
Is it possible? I have TFS 0_4.

/Sorry for english but it sucks.
//Sopelek

My code V
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local standPos = {x = 180, y = 1268, z = 10, stackpos = 1}
local summonPos = {x = 180, y = 1273, z = 10, stackpos = 1}
local fightPos = {x = 179, y = 1280, z = 10, stackpos = 1}
local kamienPos = {x = 180, y = 1267, z = 10, stackpos = 1}

if(item.uid == 9993) then
if(item.itemid == 1945) then
doCreateMonster("The Handmaiden", summonPos)
doTransformItem(item.uid, 1946)
doPlayerSendTextMessage(cid,22,"You can hear that somewhere has change something. It cant be so far.")
doTeleportThing(cid, fightPos)
doCreateItem(1304,1,kamienPos)
elseif(item.itemid == 1946) then
doTransformItem(item.uid, 1945) 
doPlayerSendTextMessage(cid,22,"You can hear that somewhere has change something. It cant be so far.")
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
return true
end
end
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		if not getCreatureByName('The Handmaiden') then
			doCreateMonster('The Handmaiden', {x = 180, y = 1273, z = 10})
			doTeleportThing(cid, {x = 179, y = 1280, z = 10})
			doCreateItem(1304, 1, {x = 180, y = 1267, z = 10})
		else
			return false
		end
	end
	doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
	doCreatureSay(cid, 'You heard something has changed somewhere. It can\'t be too far.')
	return true
end
For the other thing, use onDeath & check area if there is any other players :p
 
Back
Top Bottom