ID:264243
 
mob
var
Power_Captured_By = 0
Ki_Captured_By = 0
Def_Captured_By = 0
Str_Captured_By = 0
world
New()
..()
spawn(5)
Player_Wars()
spawn(5)
Boost()
proc
Player_Wars()
while(src)
sleep(100)
world<<"<font color=red><B>Event Info:</font><B> Player Wars has started please sign up!"
for(var/mob/M in world)
M.verbs += new/mob/cw/verb/Player_Wars
sleep(200)
world << "<font color=red><B>Event Info:</font><B> Player Wars sign up has ended!"
for(var/mob/M in world)
M.verbs -= new/mob/cw/verb/Player_Wars
sleep(200)
world << "<font color=red><B>Event Info:</font><B> Player Wars has ended!"
for(var/mob/M in world)
if(M.in_clanwars == 1)
M.loc=M.oldloc
sleep(200)
Player_Wars()
..()
proc
Boost()
while(src)
sleep(1000)
for(var/mob/M in world)
if(M.client)
if(M.Power_Captured_By == 1)
M.maxpowerlevel += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Powerlevel for controlling the Palace of Power!"
if(M.Def_Captured_By == 1)
M.def += 1000
M.maxdef += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Defense for controlling the Dungeon of Defense!"
if(M.Str_Captured_By == 1)
M.str += 1000
M.maxstr += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Strength for controlling the Stronghold of Strength!"
if(M.Ki_Captured_By == 1)
M.maxki += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Ki for controlling the Kingdom of Ki!"
Boost()


Problem description:
How do I run the Boost proc after Player wars is over?
And stop when player wars has started?
Why not just run the Boost proc without the loop every time a player dies?
In response to Speedro
Well let me explain what I ment, I wanted the Player Wars to run every hour but the sleep thing is just a test so I set it at 200 and I wanted the Player wars to go on ever hour then when that goes on the Boost proc stops, then when it's over the boost proc runs.
mob
var
Power_Captured_By = 0
Ki_Captured_By = 0
Def_Captured_By = 0
Str_Captured_By = 0


var
war = 0
world
New()
..()
spawn(5)
Player_Wars()
//dont needs 2 spawns >,>
Boost()

proc
Player_Wars()
while(src)
if(war) return
world<<"<font color=red><B>Event Info:</font><B> Player Wars has started please sign up!"
for(var/client/M in world)//this may be better
M.verbs += new/mob/cw/verb/Player_Wars
sleep(200)//after 20 ticks
world << "<font color=red><B>Event Info:</font><B> Player Wars sign up has ended!"
for(var/client/M in world)
M.verbs -= new/mob/cw/verb/Player_Wars
sleep(200)//after 20 ticks
world << "<font color=red><B>Event Info:</font><B> Player Wars has ended!"
for(var/mob/M in world)
if(M.in_clanwars)// not needed == 1 to check if a value is true
M.loc=M.oldloc//be sure you are defining M's oldloc variable
//not need a second proc >,>
Boost()
while(!war)

for(var/client/M in world)//may be better
//not needed
if(M.mob.Power_Captured_By)
M.mob.maxpowerlevel += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Powerlevel for controlling the Palace of Power!"
if(M.mob.Def_Captured_By)
M.mob.def += 1000
M.mob.maxdef += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Defense for controlling the Dungeon of Defense!"
if(M.mob.Str_Captured_By)
M.mob.str += 1000
M.mob.maxstr += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Strength for controlling the Stronghold of Strength!"
if(M.mob.Ki_Captured_By)
M.mob.maxki += 1000
world << "<font color=red><B>Event Info:</font><B> [M] has gained 1,000 Ki for controlling the Kingdom of Ki!"
sleep(1) //we need to break the while() infinite loop ni99a


Test that.

EDIT: Never forget to use mob. when you are using client and want to edit mob variables.
In response to Danny Kenobi
mob
var
Power_Captured_By = 0
Ki_Captured_By = 0
Def_Captured_By = 0
Str_Captured_By = 0
Zeni_Captured_By = 0
world
New()
..()
spawn(5) Player_Wars()
proc
Player_Wars()
while(src)
sleep(6000) // I need to know how long this is?
world<<"<font color=red><B>Event Info:</font><B> Player Wars has started please sign up!"
for(var/mob/Player/M in world)
M.Power_Captured_By = 0
M.Ki_Captured_By = 0
M.Def_Captured_By = 0
M.Str_Captured_By = 0
M.verbs += new/mob/cw/verb/Player_Wars
sleep(1000) // I need to know how long this is?
world << "<font color=red><B>Event Info:</font><B> Player Wars sign up has ended!"
world << "<font color=red><B>Event Info:</font><B> Player Wars has started!"
for(var/mob/Player/M in world)
M.verbs -= new/mob/cw/verb/Player_Wars
if(M.in_clanwars == 1)
M.loc=locate(71,88,4)
sleep(5500) // I need to know how long this is?
world << "<font color=red><B>Event Info:</font><B> Player Wars has ended!"
for(var/mob/Player/M in world)
if(M.in_clanwars == 1)
M.loc=M.oldloc
M.in_clanwars = 0
sleep(100)
Player_Wars()
..()
mob
proc
Boost()
while(src)
sleep(100)
for(var/mob/Player/M in world)
M = usr
if(M.Power_Captured_By == 1)
M.maxpowerlevel += 1000
world << "<B><font color=gray>[M] has gained 1,000 Powerlevel for controlling the Palace of Power!"
sleep(2000) // I need to know how long this is?
usr.Boost()
if(M.Def_Captured_By == 1)
M.def += 1000
M.maxdef += 1000
world << "<B><font color=gray>[M] has gained 1,000 Defense for controlling the Dungeon of Defense!"
sleep(2000) // I need to know how long this is?
usr.Boost()
if(M.Str_Captured_By == 1)
M.str += 1000
M.maxstr += 1000
world << "<B><font color=gray>[M] has gained 1,000 Strength for controlling the Stronghold of Strength!"
sleep(2000) // I need to know how long this is?
usr.Boost()
if(M.Ki_Captured_By == 1)
M.maxki += 1000
world << "<B><font color=gray>[M] has gained 1,000 Ki for controlling the Kingdom of Ki!"
sleep(2000) // I need to know how long this is?
usr.Boost()
if(M.Zeni_Captured_By == 1)
M.zeni += 1000
world << "<B><font color=gray>[M] has gained 1,000 Zeni for controlling Fort Zeni!"
sleep(2000) // I need to know how long this is?
usr.Boost()



This is what I got so far so when Player Wars Start the Flags go back to nobody having them which stops it from saying someone has them in world.
Now I just need to get the time correct.
Everywhere it says "// I need to know how long this is?"
Can you tell me in real seconds and or minutes how long that is I just need to know that nothing else, everything else works Great!
In response to Gizhy Games
Assuming you have tick_lag set to default:

sleep(6000) -> 600 seconds (equals 10 minutes)
sleep(1000) -> 100 seconds (equals 1 minute 40 seconds)
sleep(5500) -> 550 seconds (equals 9 minutes 10 seconds)
sleep(2000) -> 200 seconds (equals 3 minutes 20 seconds)
In response to Schnitzelnagler
Thanks alot that's all I needed to know from the beginning.