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

Action Vocation doors

Komic

MChem
Joined
Jun 8, 2007
Messages
359
Reaction score
51
This works with action.ids that you set in the map editor. You set the actionid of the quest door to 1000+ the vocation id you want to use the door. Promoted versions of the vocation can enter through the doors aswell.

Replace what you have in questdoor.lua with this (for TFS}

Code:
function onUse(cid, item, frompos, item2, topos)
if item.actionid <= 1008 then
	if (getPlayerVocation(cid) == item.actionid - 1000) or (getPlayerVocation(cid) == item.actionid - 996) then
		doTransformItem(item.itemid,item.itemid+1)
		doTeleportThing(cid,frompos,1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Your vocation can not pass through this door.')
	end
else
	if getPlayerStorageValue(cid, item.actionid) == -1 then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'The door seems to be sealed against unwanted intruders.')
	else
		doTransformItem(item.uid, item.itemid+1)
		doTeleportThing(cid, frompos, 1)
	end
end
	return 1
end
 
Last edited:
good work but if i replace the questdoor.lua then i cant put doors with levels (i think)
 
This works on the doors with the glowing red door knob, level doors have the gold across them, different IDs
 
Thank you, now I will have to consider vocational quests instead of just lvl based.. very intresting.. I will be sure to use it in my next map/otserv..
 
Back
Top