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

[Request] Need script to Vocation&Lvl Door.

Kubuxxx

Title
Joined
May 25, 2009
Messages
91
Reaction score
2
Hello!
I need script which open the door only when get X vocation and X lvl.
I have that
PHP:
function onUse(cid, item, frompos, item2, topos)

if item.uid == 10093 then
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
doPlayerSendTextMessage(cid, 22, "You can pass, you are a Druid.")
pos = getPlayerPosition(cid)

if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Please stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'You can\'t pass, you aren\'t a Druid.')
end
return 1
else
return 0
end
end
But it dont work with action id of the door (ex. action 1200 - 200lvl).
Can anyone help me with that ? I would be very pleased
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == [B][COLOR="red"]CLOSED_DOOR_ID[/COLOR][/B] then
		if getPlayerLevel(cid) >= [B][COLOR="red"]100[/COLOR][/B] and [B]is[COLOR="red"]Druid[/COLOR][/B](cid) then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition)
		else
			doPlayerSendCancel(cid, 'Only [B][COLOR="red"]druids[/COLOR][/B] of level [B][COLOR="red"]100[/COLOR][/B] or higher may pass.')
		end
		return true
	end
end
 
@up

what's the point of doTeleportThing if there is no onStepOut movement script included, which would transfer the doors back when player steps out?
 
@up

what's the point of doTeleportThing if there is no onStepOut movement script included, which would transfer the doors back when player steps out?
i'm assuming he's going to use a gate of expertise (level door) or a quest door
 
Cykotitan , your script is very good, but when im click 2x or more on the door, its bugged, and door is transfor to id ex. 1000 +1 +1 +1 +1 +1.
You know what about i say ?
 
Door id 1243.
When im using door its just open but when im "in" the door, and then i clik one time or more, the script going crazy and door do transform to 1244, 1245
 
strange, it shouldn't be happening
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1243 then
		if getPlayerLevel(cid) >= 100 and isDruid(cid) then
			doTransformItem(item.uid, 1244)
			doTeleportThing(cid, toPosition)
		else
			doPlayerSendCancel(cid, 'Only druids of level 100 or higher may pass.')
		end
		return true
	end
end
 
Back
Top