--configuração--
local enter = {x=938,y=1595,z=15}
local voltar = {x=938,y=1595,z=15}
local pr1 = {
[1] = {"cyclops",{x=157, y=35, z=7}},
[2] = {"Demon",{x=161, y=38, z=7}},
[3] = {"Hydra",{x=155, y=38, z=7}},
[4] = {"Dragon",{x=160, y=39, z=7}}
}
local pr2 = {
[1] = {"cyclops",{x=157, y=35, z=7}},
[2] = {"Demon",{x=161, y=38, z=7}},
[3] = {"Hydra",{x=155, y=38, z=7}},
[4] = {"Dragon",{x=160, y=39, z=7}}
}
local pr3 = {
[1] = {"cyclops",{x=157, y=35, z=7}},
[2] = {"Demon",{x=161, y=38, z=7}},
[3] = {"Hydra",{x=155, y=38, z=7}},
[4] = {"Dragon",{x=160, y=39, z=7}}
}
local pr4 = {
[1] = {"cyclops",{x=157, y=35, z=7}},
[2] = {"Demon",{x=161, y=38, z=7}},
[3] = {"Hydra",{x=155, y=38, z=7}},
[4] = {"Dragon",{x=160, y=39, z=7}}
}
function onUse(cid, item, frompos, item2, topos, uid)
if getPlayerStorageValue(cid,12345) then
if getPlayerStorageValue (cid,54321) then
if getPlayerClanRank(cid) == 1 then
addEvent(function()
if isCreature(cid) then
for i = 1, #pr1 do
doCreateMonster(pr1[i][1], pr1[i][2], pr1[i][3], pr1[i][4])
end
doTeleportThing(cid, enter)
end
end, 1000)
elseif getPlayerClanRank(cid) == 2 then
addEvent(function()
if isCreature(cid) then
for i = 1, #pr1 do
doCreateMonster(pr2[i][1], pr2[i][2], pr2[i][3], pr2[i][4])
end
doTeleportThing(cid, enter)
end
end, 1000)
elseif getPlayerClanRank(cid) == 3 then
addEvent(function()
if isCreature(cid) then
for i = 1, #pr1 do
doCreateMonster(pr3[i][1], pr3[i][2], pr3[i][3], pr3[i][4])
end
doTeleportThing(cid, enter)
end
end, 1000)
elseif getPlayerClanRank(cid) == 4 then
addEvent(function()
if isCreature(cid) then
for i = 1, #pr1 do
doCreateMonster(pr4[i][1], pr4[i][2], pr4[i][3], pr4[i][4])
end
doTeleportThing(cid, enter)
end
end, 1000)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Desculpe mas vc ainda nao tem a missao ...")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Desculpe mas vc ainda nao e do clan ...")
end
return true
end
Veja se tem algo de errado ou se poderia melhorar