Ir para conteúdo

Featured Replies

Postado

Tipo assim galera no meu ot war ta dando 1 erro esquissitissimo tipo o cara mata o cara da otra team aew se so tiver os 2 no evento o cara que ganho fica presso no evento e no ctf event comessa assim 10 há 10 aew o normal e comessar do 0 e acaba no 10 mas comessa no 10 e nao termina no 20 demora muito tempo pra acabar o ctf eu queria 1 script tipo na war a team que mata ganha na hora e no ctf event a team que fizer 10 pontos ganha da 1 olhada !

Aque !

  Citar

local configWar = {

MessageType = MESSAGE_INFO_DESCR,

wallPos = {x=512,y=846,z=5,stackpos=1},

wallPos1 = {x=513,y=846,z=5,stackpos=1},

wallPos2 = {x=513,y=847,z=5,stackpos=1},

wallPos3 = {x=513,y=848,z=5,stackpos=1},

wallPos4 = {x=513,y=849,z=5,stackpos=1},

wallPos5 = {x=512,y=849,z=5,stackpos=1},

AccessMessage = "Only Gods and Gamemasters can execute an event!",

FirstMessage = "Event Notice!",

SecondMessage = "War Arena has been opened to join go through the portal on the top floor of depot.",

ThirdMessage = "War Arena will begin in 5 minutes!",

FourthMessage = "War Arena will begin in 3 minutes!",

ClosingMessage = "War Arena will close and begin in 1 minute!",

CloseMessage = "War Arena portal has closed and the event has begun!"

}

local configCTF = {

MessageType = MESSAGE_INFO_DESCR,

wallPos = {x=512,y=840,z=5,stackpos=1},

wallPos1 = {x=513,y=840,z=5,stackpos=1},

wallPos2 = {x=513,y=841,z=5,stackpos=1},

wallPos3 = {x=513,y=842,z=5,stackpos=1},

wallPos4 = {x=513,y=843,z=5,stackpos=1},

wallPos5 = {x=512,y=843,z=5,stackpos=1},

AccessMessage = "Only Gods and Gamemasters can execute an event!",

FirstMessage = "Event Notice!",

SecondMessage = "Capture The Flag has been opened to join go through the portal on the top floor of depot.",

ThirdMessage = "Capture The Flag will begin in 5 minutes!",

FourthMessage = "Capture The Flag will begin in 3 minutes!",

ClosingMessage = "Capture The Flag will close and begin in 1 minute!",

CloseMessage = "Capture The Flag portal has closed and the event has begun!\n Gametime: 25 minutes",

timeLimitMessage = "25 minutes has elapsed and ",

timeLimitTieMessage = ""

}

local waitingRoomFrompos = {x=617, y=625, z=7, stackpos=253}

local waitingRoomTopos = {x=652, y=654, z=7, stackpos=253}

local CTF = {

fromPos = {x=660, y=495, z=7, stackpos=253},

toPos = {x=765, y=550, z=7, stackpos=253},

deTile = {x=720,y=626,z=7,stackpos=1}}

function TeleportWinners()

for _, pid in ipairs(getPlayersOnline()) do

if isInArea(getPlayerPosition(pid), CTF.fromPos, CTF.toPos) then

doTeleportThing(pid, CTF.deTile, false)

end

end

end

function endCtf(cid)

if getGlobalStorageValue(2010) ~= 4 then

redStorage = getGlobalStorageValue(2001)

blueStorage = getGlobalStorageValue(2002)

if redStorage < blueStorage then

doBroadcastMessage("25 minutes has elapsed, red team wins!",configCTF.MessageType)

setGlobalStorageValue(2010, 1)

TeleportWinners()

elseif blueStorage < redStorage then

doBroadcastMessage("25 minutes has elapsed, blue team wins!",configCTF.MessageType)

setGlobalStorageValue(2010, 2)

TeleportWinners()

elseif redStorage == blueStorage then

doBroadcastMessage("25 minutes has elapsed and the scores are tied, next score wins!",configCTF.MessageType)

setGlobalStorageValue(2010, 3)

end

end

end

--Functions for war.

function EventNotice11(cid)

addEvent(EventNotice21,5000,cid)

doBroadcastMessage(configWar.FirstMessage,configWar.MessageType)

end

function EventNotice21(cid)

addEvent(EventNotice31,10*1000,cid)

doBroadcastMessage(configWar.SecondMessage,configWar.MessageType)

end

function EventNotice31(cid)

addEvent(EventNotice41,120*1000,cid)

doBroadcastMessage(configWar.ThirdMessage,configWar.MessageType)

end

function EventNotice41(cid)

addEvent(EventNotice51,120*1000,cid)

doBroadcastMessage(configWar.FourthMessage,configWar.MessageType)

end

function EventNotice51(cid)

addEvent(EventNotice61,60*1000,cid)

doBroadcastMessage(configWar.ClosingMessage,configWar.MessageType)

end

function EventNotice61(cid)

doCreateItem(1600,1,configWar.wallPos)

doCreateItem(1595,1,configWar.wallPos1)

doCreateItem(1596,1,configWar.wallPos2)

doCreateItem(1596,1,configWar.wallPos3)

doCreateItem(1601,1,configWar.wallPos4)

doCreateItem(1600,1,configWar.wallPos5)

doBroadcastMessage(configWar.CloseMessage,configWar.MessageType)

addEvent(BeginWAR,5*1000,cid)

end

--Functions for CTF.

function EventNotice1(cid)

addEvent(EventNotice2,5000,cid)

doBroadcastMessage(configCTF.FirstMessage,configCTF.MessageType)

end

function EventNotice2(cid)

addEvent(EventNotice3,10*1000,cid)

doBroadcastMessage(configCTF.SecondMessage,configCTF.MessageType)

end

function EventNotice3(cid)

addEvent(EventNotice4,120*1000,cid)

doBroadcastMessage(configCTF.ThirdMessage,configCTF.MessageType)

end

function EventNotice4(cid)

addEvent(EventNotice5,120*1000,cid)

doBroadcastMessage(configCTF.FourthMessage,configCTF.MessageType)

end

function EventNotice5(cid)

addEvent(EventNotice6,60*1000,cid)

doBroadcastMessage(configCTF.ClosingMessage,configCTF.MessageType)

end

function EventNotice6(cid)

doCreateItem(1600,1,configCTF.wallPos)

doCreateItem(1595,1,configCTF.wallPos1)

doCreateItem(1596,1,configCTF.wallPos2)

doCreateItem(1596,1,configCTF.wallPos3)

doCreateItem(1601,1,configCTF.wallPos4)

doCreateItem(1600,1,configCTF.wallPos5)

doBroadcastMessage(configCTF.CloseMessage,configCTF.MessageType)

addEvent(BeginCTF,5*1000,cid)

end

--Start for War Event

function BeginWAR(cid)

for _, pid in ipairs(getPlayersOnline()) do

if isInArea(getPlayerPosition(pid), waitingRoomFrompos, waitingRoomTopos) then

doTeleportThing(pid, {x=635,y=614,z=7,stackpos=1}, false)

end

end

end

--Start for CTF Event

function BeginCTF(cid)

for _, pid in ipairs(getPlayersOnline()) do

if isInArea(getPlayerPosition(pid), waitingRoomFrompos, waitingRoomTopos) then

doTeleportThing(pid, {x=720,y=629,z=7,stackpos=1}, false)

end

end

end

function SetEventWAR(cid)

setGlobalStorageValue(1005, 0)--WAR

end

function SetEventCTF(cid)

doRemoveItem(getThingFromPos(configCTF.wallPos).uid,1)

doRemoveItem(getThingFromPos(configCTF.wallPos1).uid,1)

doRemoveItem(getThingFromPos(configCTF.wallPos2).uid,1)

doRemoveItem(getThingFromPos(configCTF.wallPos3).uid,1)

doRemoveItem(getThingFromPos(configCTF.wallPos4).uid,1)

doRemoveItem(getThingFromPos(configCTF.wallPos5).uid,1)

setGlobalStorageValue(1005, 0)

setGlobalStorageValue(2001, 10)

setGlobalStorageValue(2002, 10)

setGlobalStorageValue(2010, 0)

blueFlagPos = {x=676, y=503, z=7}

redFlagPos = {x=744, y=523, z=7}

blueFlagPlate = getThingFromPos(blueFlagPos)

redFlagPlate = getThingFromPos(redFlagPos)

doSetItemActionId(blueFlagPlate.uid,100)

doSetItemActionId(redFlagPlate.uid,100)

addEvent(EventNotice1,2000,cid)

addEvent(endCtf,1800000,cid) --30 minutes, 5 in lobby 25 in CTF

setGlobalStorageValue(28001, os.time(t))

end

local WAR = 0

local CTF = 1

local eventType = getGlobalStorageValue(1005)

function onThink(cid, item, fromPosition, toPosition)

if getGlobalStorageValue(1005) <= WAR then

doRemoveItem(getThingFromPos(configWar.wallPos).uid,1)

doRemoveItem(getThingFromPos(configWar.wallPos1).uid,1)

doRemoveItem(getThingFromPos(configWar.wallPos2).uid,1)

doRemoveItem(getThingFromPos(configWar.wallPos3).uid,1)

doRemoveItem(getThingFromPos(configWar.wallPos4).uid,1)

doRemoveItem(getThingFromPos(configWar.wallPos5).uid,1)

setGlobalStorageValue(1005, 1)

setGlobalStorageValue(2001, 0)

setGlobalStorageValue(2002, 0)

addEvent(EventNotice11,2000,cid)

addEvent(SetEventCTF,7200*1000,cid)

setGlobalStorageValue(28000, os.time(t))

else

doBroadcastMessage('Event System:\nEvent System Error, Please notify staff.')

end

return 1

end

War_Event !

  Citar

local configWar = {

MessageType = MESSAGE_INFO_DESCR,

wallPos = {x=522,y=845,z=5,stackpos=1},

AccessMessage = "Only Gods and Gamemasters can execute an event!",

FirstMessage = "Event Notice!",

SecondMessage = "War Arena has been opened to join go through the portal on the top floor of depot.",

ThirdMessage = "War Arena will begin in 5 minutes!",

FourthMessage = "War Arena will begin in 3 minutes!",

ClosingMessage = "War Arena will close and begin in 1 minute!",

CloseMessage = "War Arena portal has closed and the event has begun!"

}

local configCTF = {

MessageType = MESSAGE_INFO_DESCR,

wallPos = {x=522,y=842,z=5,stackpos=1},

AccessMessage = "Only Gods and Gamemasters can execute an event!",

FirstMessage = "Event Notice!",

SecondMessage = "Capture The Flag has been opened to join go through the portal on the top floor of depot.",

ThirdMessage = "Capture The Flag will begin in 5 minutes!",

FourthMessage = "Capture The Flag will begin in 3 minutes!",

ClosingMessage = "Capture The Flag will close and begin in 1 minute!",

CloseMessage = "Capture The Flag portal has closed and the event has begun!"

}

--Functions for war.

function EventNotice11(cid)

addEvent(EventNotice21,5000,cid)

doBroadcastMessage(configWar.FirstMessage,configWar.MessageType)

end

function EventNotice21(cid)

addEvent(EventNotice31,10*1000,cid)

doBroadcastMessage(configWar.SecondMessage,configWar.MessageType)

end

function EventNotice31(cid)

addEvent(EventNotice41,120*1000,cid)

doBroadcastMessage(configWar.ThirdMessage,configWar.MessageType)

end

function EventNotice41(cid)

addEvent(EventNotice51,120*1000,cid)

doBroadcastMessage(configWar.FourthMessage,configWar.MessageType)

end

function EventNotice51(cid)

addEvent(EventNotice61,60*1000,cid)

doBroadcastMessage(configWar.ClosingMessage,configWar.MessageType)

end

function EventNotice61(cid)

doCreateItem(10190,1,configWar.wallPos)

doBroadcastMessage(configWar.CloseMessage,configWar.MessageType)

addEvent(BeginEvent,5*1000,cid)

end

function BeginEvent(cid)

starting={x=628, y=632, z=7, stackpos=253}

checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}

ending={x=640, y=644, z=7, stackpos=253}

players=0

totalmonsters=0

monster={}

repeat

creature=getThingfromPos(checking)

if creature.itemid > 0 then

if isPlayer(creature.uid) == TRUE then

players=players+1

end

if isCreature(creature.uid) == TRUE then

totalmonsters=totalmonsters+1

monster[totalmonsters]=creature.uid

end

end

checking.x=checking.x+1

if checking.x>ending.x then

checking.x=starting.x

checking.y=checking.y+1

end

until checking.y>ending.y

current=0

repeat

current=current+1

doTeleportThing(monster[current], {x=634,y=620,z=7,stackpos=1}, false)

until current>=totalmonsters

end

--Functions for CTF.

function EventNotice1(cid)

addEvent(EventNotice2,5000,cid)

doBroadcastMessage(configCTF.FirstMessage,configCTF.MessageType)

end

function EventNotice2(cid)

addEvent(EventNotice3,10*1000,cid)

doBroadcastMessage(configCTF.SecondMessage,configCTF.MessageType)

end

function EventNotice3(cid)

addEvent(EventNotice4,120*1000,cid)

doBroadcastMessage(configCTF.ThirdMessage,configCTF.MessageType)

end

function EventNotice4(cid)

addEvent(EventNotice5,120*1000,cid)

doBroadcastMessage(configCTF.FourthMessage,configCTF.MessageType)

end

function EventNotice5(cid)

addEvent(EventNotice6,60*1000,cid)

doBroadcastMessage(configCTF.ClosingMessage,configCTF.MessageType)

end

function EventNotice6(cid)

doCreateItem(10190,1,configCTF.wallPos)

doBroadcastMessage(configCTF.CloseMessage,configCTF.MessageType)

addEvent(BeginCTF,5*1000,cid)

end

function BeginCTF(cid)

starting={x=628, y=632, z=7, stackpos=253}

checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}

ending={x=640, y=644, z=7, stackpos=253}

players=0

totalmonsters=0

monster={}

repeat

creature=getThingfromPos(checking)

if creature.itemid > 0 then

if isPlayer(creature.uid) == TRUE then

players=players+1

end

if isCreature(creature.uid) == TRUE then

totalmonsters=totalmonsters+1

monster[totalmonsters]=creature.uid

end

end

checking.x=checking.x+1

if checking.x>ending.x then

checking.x=starting.x

checking.y=checking.y+1

end

until checking.y>ending.y

current=0

repeat

current=current+1

doTeleportThing(monster[current], {x=720,y=629,z=7,stackpos=1}, false)

until current>=totalmonsters

end

local eventType = WAR

function onThink(cid, item, fromPosition, toPosition)

if eventType == WAR then

if getThingFromPos(configWAR.wallPos).itemid == 10190 then

doRemoveItem(getThingFromPos(configWAR.wallPos).uid,1)

setGlobalStorageValue(2001, 0)

setGlobalStorageValue(2002, 0)

addEvent(EventNotice11,2000,cid)

eventType = CTF

end

end

if eventType == CTF then

if item.uid == 2103 and getThingFromPos(configCTF.wallPos).itemid == 10190 then

doRemoveItem(getThingFromPos(configCTF.wallPos).uid,1)

setGlobalStorageValue(2001, 10)

setGlobalStorageValue(2002, 10)

addEvent(EventNotice1,2000,cid)

eventType = WAR

end

end

return 1

end

ATT !

13978461.png

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo