Its based like WoW. You need all vocs (though wow is not all). It is basic, sorry. If you want a advanced one PM me and REP. Then send me everything you can on specific needs so I can be as specific as possible in the script.
Usage:
Lua:
---------------Pos of dungeon start----------------
local dungeon_one_pos = {x = 1000, y = 1000, z = 7}
---------------Tell server if dungeons are open-------
local dungeon_one_open = 33311
----------Tells server what vocs are in que---------
local knight_in_que = 33313
local sorc_in_que = 33314
local paladin_in_que = 33315
local druid_in_que = 33316
----Tells server players that are in que--------
local in_que_one = 33317
---------------------------
local isSorc = 1, 5, 9
local isDruid = 2, 6, 10
local isPaladin = 3, 6, 11
local isKnight = 4, 7, 12
--------Helps me script----------
local getGlobalStorage = getGlobalStorageValue
local getVocation = getPlayerVocation
local sendTextMessage = doPlayerSendTextMessage
local sendMagicEffect = doSendMagicEffect
local getPlayerStorage = getPlayerStorageValue
function onSay(cid, words, param, channel)
if (getGlobalStorage(dungeon_one_open) == nil) then
setGlobalStorageValue(dungeon_one_open, 0)
end
if (param == "1" or param == "first") then ------------------This part is if player uses talkaction again, after being qued into the dungeon--------------
if (getPlayerStorage(cid, in_que_1) == 1) then
if (getVocation(cid) == isSorc)) then
if (getGlobalStorage(knight_in_que) ~= 1) then
if (getGlobalStorage(druid_in_que) ~= 1) then
if (getGlobalStorage(paladin_in_que) ~= 1) then
sendTextMessage(cid, 22, "Waiting for all vocations.")
return false
else
sendTextMessage(cid, 22, "waiting for a druid and a knight.")
return false
end
else
sendTextMessage(cid, 22, "Waiting for a knight.")
return false
end
end
elseif (getVocation(cid) == isDruid) then
if (getGlobalStorage(knight_in_que) ~= 1) then
if (getGlobalStorage(sorc_in_que) ~= 1) then
if (getGlobalStorage(paladin_in_que) ~= 1) then
sendTextMessage(cid, 22, "Waiting for all vocations.")
return false
else
sendTextMessage(cid, 22, "waiting for a sorcerer and a knight.")
return false
end
else
sendTextMessage(cid, 22, "Waiting for a knight.")
return false
end
end
elseif (getVocation(cid) == isPaladin) then
if (getGlobalStorage(knight_in_que) ~= 1) then
if (getGlobalStorage(sorc_in_que) ~= 1) then
if (getGlobalStorage(druid_in_que) ~= 1) then
sendTextMessage(cid, 22, "Waiting for all vocations.")
return false
else
sendTextMessage(cid, 22, "waiting for a sorcerer and a knight.")
return false
end
else
sendTextMessage(cid, 22, "Waiting for a knight.")
return false
end
end
elseif (getVocation(cid) == isKnight) then
if (getGlobalStorage(druid_in_que) ~= 1) then
if (getGlobalStorage(sorc_in_que) ~= 1) then
if (getGlobalStorage(paladin_in_que) ~= 1) then
sendTextMessage(cid, 22, "Waiting for all vocations.")
return false
else
sendTextMessage(cid, 22, "waiting for a sorcerer and a druid.")
return false
end
else
sendTextMessage(cid, 22, "Waiting for a druid.")
return false
end
end
else
if (getVocation(cid) == isSorc) then ----------------------This is main script--------------------------
if (getGlobalStorage(dungeon_one_open) == 0) then
if (getGlobalStorage(knight_in_que) == 1) then
if (getGlobalStorage(paladin_in_que) == 1) then
if (getGlobalStorage(druid_in_que) == 1) then
if (getGlobalStorage(sorc_in_que) == 0) then
setPlayerStorageValue(cid, in_que_1, 1)
for i, pid in ipairs(getPlayersOnline()) do
------------------Auto dungeon starter-----------------
if (getPlayerStorage(pid, in_que_one) == 1) then
doTeleportThing(pid, dungeon_one_pos)
sendTextMessage(pid, 22, "Welcome to dungeon one. This is your team.")
sendMagicEffect(pid, math.random(1, 20))
setGlobalStorageValue(dungeon_one_open, 1)
setPlayerStorageValue(pid, in_que_1, 0)
end
end
else
doPlayerSendCancel(cid, "There is already a Sorcerer qued in this dungeon.")
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendCancel(cid, "The dungeon is already in use.")
return false
end
elseif (getVocation(cid) == isDruid) then ------------------Reapeat script for each voc.------------
if (getGlobalStorage(dungeon_one_open) == 0) then
if (getGlobalStorage(sorc_in_que) == 1) then
if (getGlobalStorage(paladin_in_que) == 1) then
if (getGlobalStorage(knight_in_que) == 1) then
if (getGlobalStorage(druid_in_que) == 0) then
setPlayerStorageValue(cid, in_que_one, 1)
for i, pid in ipairs(getPlayersOnline()) do
if (getPlayerStorage(pid, in_que_one) == 1) then
doTeleportThing(pid, dungeon_one_pos)
sendTextMessage(pid, 22, "Welcome to dungeon one. This is your team.")
sendMagicEffect(pid, math.random(1, 20))
setGlobalStorageValue(dungeon_one_open, 1)
end
end
else
doPlayerSendCancel(cid, "There is already a Druid qued in this dungeon.")
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendCancel(cid, "The dungeon is already in use.")
return false
end
elseif (getVocation(cid) == isPaladin) then
if (getGlobalStorage(dungeon_one_open) == 0) then
if (getGlobalStorage(knight_in_que) == 1) then
if (getGlobalStorage(sorc_in_que) == 1) then
if (getGlobalStorage(druid_in_que) == 1) then
if (getGlobalStorage(paladin_in_que) == 0) then
setPlayerStorageValue(cid, in_que_one, 1)
for i, pid in ipairs(getPlayersOnline()) do
if (getPlayerStorage(pid, in_que_one) == 1) then
doTeleportThing(pid, dungeon_one_pos)
sendTextMessage(pid, 22, "Welcome to dungeon one. This is your team.")
sendMagicEffect(pid, math.random(1, 20))
setGlobalStorageValue(dungeon_one_open, 1)
end
end
else
doPlayerSendCancel(cid, "There is already a Paladin qued in this dungeon.")
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendCancel(cid, "The dungeon is already in use.")
return false
end
elseif (getVocation(cid) == isKnight) then
if (getGlobalStorage(dungeon_one_open) == 0) then
if (getGlobalStorage(paladin_in_que) == 1) then
if (getGlobalStorage(sorc_in_que) == 1) then
if (getGlobalStorage(druid_in_que) == 1) then
if (getGlobalStorage(knight_in_que) == 0) then
setPlayerStorageValue(cid, in_que_one, 1)
for i, pid in ipairs(getPlayersOnline()) do
if (getPlayerStorage(pid, in_que_one) == 1) then
doTeleportThing(pid, dungeon_one_pos)
sendTextMessage(pid, 22, "Welcome to dungeon one. This is your team.")
sendMagicEffect(pid, math.random(1, 20))
setGlobalStorageValue(dungeon_one_open, 1)
end
end
else
doPlayerSendCancel(cid, "There is already a Paladin qued in this dungeon.")
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendTextMessage(cid, 22, "You have been qued, you will be teleported when there is a full team.")
setPlayerStorageValue(cid, in_que_1, 1)
return false
end
else
doPlayerSendCancel(cid, "The dungeon is already in use.")
return false
end
end
end
end
return true
end
Usage:
Code:
!dungeon 1