• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Vocational Door

Jordan_August

New Member
Joined
Jul 24, 2012
Messages
122
Reaction score
4
I have literally searched the forums a million times over and every vocation door script for 8.60 i use, fails. could someone please make me a vocational door that teleports a player to an xyz position and allows multiple vocations to use such as a promoted voc/not (3,7 etc). and maybe throwing in a level requirement would be great. i just can't get the script working 100% with any edits i do. thank you in advance.
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local coords = {x = 1000, y = 1000, z = 1111111}
	local requiredlevel = 10

	return isInArray({1, 2, 3, 4, 5, 6, 7, 8}, getPlayerVocation(cid)) and getPlayerLevel(cid) >= requiredlevel and doTeleportThing(cid, coords, TRUE) or doPlayerSendCancel(cid, "Sorry not posible.")
end

Edit coords and level, np you in advance

Ahhh edit 1, 2, 3, 4, 5, 6, 7, 8 for vocs u want to check
 
ye i got it limos can you help me im doing door for training place and i want that when players open door it goes to xxx place it it takes time to wirte the whole postion of each training place :/

- - - Updated - - -

ok i solved it too but one thing more i want that in doors read like you have to be lvl 10 to enter to this door.

- - - Updated - - -

Nvm i found it thnx for help :P
 
Last edited:
how would i add in this type of addition doPlayerRemoveItem(cid, 2159, 50) to the following script properly? thanks in advance~ this is using an item amount of something, not money.
 
LUA:
local t = {
    coords = {x = 1000, y = 1000, z = 7},
    requiredlevel = 10,
    vocations = {1, 2, 3, 4, 5, 6, 7, 8}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isInArray(t.vocations, getPlayerVocation(cid)) and getPlayerLevel(cid) >= t.requiredlevel and getPlayerItemCount(cid, 2159) >= 50 then
        doTeleportThing(cid, t.coords, TRUE)
        doPlayerRemoveItem(cid, 2159, 50)
    else
        doPlayerSendCancel(cid, "Sorry not possible.")
        end
    return true
end
 
Back
Top