DukeeH
Active Member
- Joined
- Dec 6, 2010
- Messages
- 550
- Solutions
- 3
- Reaction score
- 39
First one is like anihilator but a custom quest, it's allowing people to go after the first team and get the room without the respawns.
Second one is a player broadcast talkaction, it doesn't have cooldown, I wanna set 5 minutes between two broadcasts from the same player.
Solved, Thanks @Xikini.
Thanks!
Code:
local summon={
{'Orshabaal', {x=145, y=74, z=14}},
{'Orshabaal', {x=144, y=74, z=14}},
{'Lavahole', {x=140, y=72, z=14}},
{'Lavahole', {x=141, y=72, z=14}},
{'Lavahole', {x=142, y=72, z=14}},
{'Lavahole', {x=143, y=72, z=14}},
{'Lavahole', {x=140, y=76, z=14}},
{'Lavahole', {x=141, y=76, z=14}},
{'Lavahole', {x=142, y=76, z=14}},
{'Lavahole', {x=143, y=76, z=14}}
}
local playerA={
{x=141, y=39, z=14},
{x=140, y=39, z=14},
{x=139, y=39, z=14},
{x=138, y=39, z=14}
}
local playerB={
{x=143, y=74, z=14},
{x=142, y=74, z=14},
{x=141, y=74, z=14},
{x=140, y=74, z=14}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = {}
if item.itemid == 1945 then
for i = 1, #playerA do
t=getTopCreature(playerA).uid
if t == 0 or not isPlayer(t) then
return doPlayerSendCancel(cid, 'You need 4 players for this quest.')
elseif getPlayerLevel(t) < 200 then
return doPlayerSendCancel(cid, 'All players need to have level 200 or higher.')
end
end
for i = 1, #summon do
doCreateMonster(summon[1], summon[2])
end
for i=1, #t do
doTeleportThing(t, playerB)
doSendMagicEffect(playerA, CONST_ME_POFF)
doSendMagicEffect(playerB, CONST_ME_ENERGYAREA)
end
else
for x = 139, 150 do
for y = 71, 77 do
local v = getTopCreature({x=x, y=y, z=14}).uid
if v ~= 0 then
if isPlayer(v) then
return doPlayerSendCancel(cid, 'There is already a team in the quest room.')
elseif isMonster(v) then
table.insert(t, v)
end
end
end
end
for i = 1, #t do
doRemoveCreature(t)
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Second one is a player broadcast talkaction, it doesn't have cooldown, I wanna set 5 minutes between two broadcasts from the same player.
Solved, Thanks @Xikini.
Thanks!
Last edited: