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}
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: