Author Topic: Prompt Events  (Read 13290 times)

Prompt Events
An events script that utilizes the new clientCmds in V11.

Description
Yay, Badspot finally made MessageBoxYesNo and MessageBoxOKCancel communications default.

Input:
- onPromptAccept
 + Called when the user accepts a prompt.
- onPromptDecline
 + Called when the user declines a prompt.

Output:
- Client -> Prompt (Type, Quesiton)
 + Pops a box up on the client's screen with your question.

Allows the event-maker to select either an OK/Cancel box or a Yes/No box.

Example:
onActivate -> Client -> Prompt (Yes/No, You want some candy?)
onPromptAccept -> Client -> ChatMessage (Here you go!)
onPromptAccept -> Client -> IncScore (1)
onPromptDecline -> Client -> ChatMessage (WHAT?)

Download
Event_PromptEvents.zip (Last Updated: Tue Mar 17, 2009 4:29 pm)

Installation
Put Event_PromptEvents.zip into the Add-Ons folder in your Blockland folder.

Click Here to view this file on the RTB Download Manager


DAMN YOU!

y/n

on another note, good job truce, i could really use this


on another note, good job truce, i could really use this

Don't congratulate me yet, I probably messed up somewhere.
I've been a tad slow with scripting lately :/

What the forget?

He's joking.


neato, now what does it do :d

it's a window that comes up, and asks you to select yes or no

for instance.



WOULD YOU LIKE TO SEND A RELAY?
yes
no

I was going to suggest this for variables like if yes it would be variable true

Oh this could be useful :o

Someone answered my request!

I can't thank you enough. :D


Someone answered my request!

I can't thank you enough. :D

Thank Badspot, I just put it in event form.

Quote from: V11 Changelog (A.K.A. Badspot)
Added clientCmds for messageboxYesNo and messageBoxOKCancel

clientCmdMessageBoxOKCancel(%title, %message, %okServerCmd)

%okServerCmd is a tagged string that will be sent as a commandtoserver of the user clicks "ok". If they click "Cancel" commandToServer('MessageBoxCancel'); will be sent.

clientCmdMessageBoxYesNo(%title, %message, %yesServerCmd)

%yesServerCmd is a tagged string that will be sent as a commandtoserver of the user clicks "yes". If they click "no" commandToServer('MessageBoxNo'); will be sent.

Well, still, thanks. :D

Here's an example of events.

Code: [Select]
onActivate > Client > MessageBoxYesNo > If you click yes, you agree that KoopaScooper has all rights to delete your build.
onPromptAccept > Self > Disappear > 2
onPromptDecline > Client > CenterPrint > Then go away please.