ID:161503
 
how would i make a verb to allow a user to turn off the Yes/No
alert?
mob/verb/say(msg as text)
set desc = "say somthing"
switch(alert(usr,"Do you want to say \"[msg]\"?","*Message Confermation*","Yes","No"))
if("Yes")
world<<"[usr] sais: [msg]"
if("No")
usr<<"OK, you diddn't say a thing"

Thanks
Why would anybody WANT to be pestered every time they try to say something?
In response to Garthor
im thinking you misunderstood what the question was lol, how would i make a verb to turn that off so they diddnt have to be pestered, lol

i see what your saying though, and thats why i want the verb, but also its to try and keep people from flooding the world
In response to RanEsu
If you want to keep people from spamming then you need to put something that prevents spamming, not an obnoxious alert box that you yourself are looking to help people circumvent.
In response to Garthor
:( but i like my obnoxious box, lol j/p, ok
Anyways... since no one' decided to answer the simple question...
A mob/var would be easiest, with a verb to toggle it.

 mob/var/SayConfirm
mob/verb/ToggleMessage()
set desc = "Turn off and on the confirmation message on the say verb"
SayConfirm = !SayConfirm

mob/verb/say(msg as text)
set desc = "say somthing"
if(!SayConfirm && alert(usr,"Do you want to say \"[msg]\"?","*Message Confermation*","Yes","No")=="No")
usr<<"OK, you diddn't say a thing"
return
else
world << "[usr] says [msg]"

I reorganized a little. It only prompts the alert if the SayConfirm is true.

(BTW, spelling to fix, *Confirmation, says, didn't*)