ID:174370
 
Apparently I can't post in "Code Problems" if I don't have a snippet of code to have a problem with. Information assimilated, won't happen again.
Now then, since I have no idea how to myself, how does one code a "Cancel Reboot" and/or a "Cancel Shutdown" verb, assuming they exist?
They exist if you make them exist. And if you want any specific answer, then you will have to post more specific information. Like have you made any Reboot or Shutdown commands yet, or are you just using an admin demo
In response to Lazyboy
I have fully functional Reboot and Shutdown commands:

Reboot()
set name="Reboot"
set desc="Reboot the world."
set category="Owner"
if(alert("Are you sure?","Reboot","Yes","No") == "Yes")
world<<"<font color=red>Server rebooting in 10 seconds!</font>"
sleep(100)
world.Reboot()

Shutdown_world()
set category = "Owner"
set name = "Shutdown"
set desc = "Shutdown the world."
if(alert("Are you sure?","Shutdown","Yes","No") == "Yes")
world << "<font color=red>Server shutting down in 30 seconds!</font>"
sleep(300)
del(world)

But the thought crossed my mind that it would be convienient to have a cancel reboot/shutdown commands. I've leafed through the DM help file and I couldn't find anything helpful.
In response to Enigmaster2002
One way would be to have global "CancelShutdown" and "CancelReboot" vars. Before the sleep(), set the appropriate var to false. Then, after the sleep()s but before the Reboot()/dels, check to see if the appropriate var is true. If it is, set it to false and <code>return</code>.

You'd obviously have verbs that set those vars.

That system would be slightly dodgy if you cancelled a shutdown/reboot, and then BEFORE the sleep() had finished you decided to initiate it again. The first sleep() would pick up the non-cancelled state of the second one, and so the world would reboot/shutdown 10 seconds/30 seconds after the first reboot/shutdown command. (Hopefully that made sense. =D )
In response to Enigmaster2002
Enigmaster2002 wrote:
I have fully functional Reboot and Shutdown commands:
> Reboot()
> set name="Reboot"
> set desc="Reboot the world."
> set category="Owner"
> if(alert("Are you sure?","Reboot","Yes","No") == "Yes")
> world<<"<font color=red><b>Server rebooting in 10 seconds!</font></b>"
> _reboot=1 // added by me
> sleep(100)
> if(!_reboot) return // added by me
> world.Reboot()
>
>
>var _reboot=0 // added by me


Apply same concept to Shutdown