Posted by: Pleistocene Oct 12 2009, 09:56 AM
Okay, so I have this Dragonspeak button activated on my dream's skin. Basically, I want it to tell on-duty staff that <furre> needs help whenever a furre clicks the button -- sort of like when we say "help" and it gets sent to a Beekin.
First I need the "on-duty/off-duty" staff code, and then I need that code applied to the DSBTN.
This is what I have thus far:
CODE
// Staff & Probationary Staff //
(0:9) When a furre arrives in the dream,
(1:70) and the triggering furre's name is {...},
(5:102) share dream control with the triggering furre.
---------------
(0:9) When a furre arrives in the dream,
(1:70) and the triggering furre's name is {...},
(5:102) share dream control with the triggering furre.
---------------
(0:9)(1:70){...}(5:102)
---------------
(0:9)(1:70){...}(5:102)
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
*(0:9),(1:70){...},(5:102).
* As Staff
(0:9) When a furre arrives in the dream,
(1:602) and the PhoenixSpeak info {staff} about the triggering furre is more than 0,
(5:610) remember the PhoenixSpeak info {staff} about the triggering furre, and put it in variable %staff_number.
*Adding Player To Staff Dream
* Now this is simple, really.. you have to type the name USING pipes (ctrl+ = | ) if the name has more then one word in it.
* Doing this is very important.. but you do it right after you type in the silent prefix command. The default for this will
* be !, as the exclamation point is the most simple silent prefix command to use. After the name, you type in the Staff #,
* such as 1 - 5 or whatever
(0:32) When a furre says something with {!addfurre} in it,
(1:10) and the triggering furre is the dream owner,
(5:314) set variable %staff_number to the number the triggering furre just said.
(5:601) memorize that the PhoenixSpeak info {staff} about the furre named {[PARAM1]} will now be %staff_number.
(5:200) emit message {<b>[PARAM1]</b> successfully created with Staff Rank #<b> %staff_number .</b> Type <b>share [PARAM1]</b> to give share to that furre.} to the triggering furre.
*Removing Player From Staff Dream
(0:32) When a furre says something with {!removefurre} in it,
(1:10) and the triggering furre is the dream owner,
(5:631) forget all PhoenixSpeak info about the furre named {[PARAM1]}.
(5:200) emit message {<b>[PARAM1]</b> successfully removed.} to the triggering furre.
** Banning
(0:32) When a furre says something with {!ban} in it,
(1:11) and the triggering furre has got shared control (or is the dream owner),
(5:601) memorize that the PhoenixSpeak info {ban} about the furre named {[PARAM1]} will now be 1.
(5:200) emit message {You have banned [PARAM1] from the dream. You should now eject [PARAM1]} to the triggering furre.
(0:9) When a furre arrives in the dream,
(1:111) and the triggering furre hasn't got shared control (and is not the dream owner),
(1:600) and the PhoenixSpeak info {ban} about the triggering furre is equal to 1,
(5:200) emit message {A staff member has banned you. Please contact [OWNER] if you believe this is a mistake.} to the triggering furre.
(5:78) eject the triggering furre.
** to use, say: !unban "furre name"
(0:32) When a furre says something with {!unban} in it,
(1:611) and the PhoenixSpeak info {ban} about the furre named {[PARAM1]} is not equal to 1,
(1:11) and the triggering furre has got shared control (or is the dream owner),
(5:200) emit message {<b>Error</b>: [PARAM1] is not banned!} to the triggering furre.
(0:32) When a furre says something with {!unban} in it,
(1:610) and the PhoenixSpeak info {ban} about the furre named {[PARAM1]} is equal to 1,
(1:11) and the triggering furre has got shared control (or is the dream owner),
(5:601) memorize that the PhoenixSpeak info {ban} about the furre named {[PARAM1]} will now be 0.
(5:200) emit message {You have unbanned [PARAM1] from the dream.} to the triggering furre.
**Cuff
(0:0) When everything is starting up,
(5:300) set variable %dreamStarted to the value 0
(0:100) When 1 seconds have passed, offset by 0,
(1:200) and variable %dreamStarted is equal to 0,
(5:300) set variable %dreamStarted to the value 1
(5:300) set variable %cuff to the value 0
* When Captor says 'cuff', then enable the trapping mode.
(0:31) When a furre says {!cuff},
(1:11) and the triggering furre has got shared control (or is the dream owner),
(1:200) and variable %cuff is equal to 0,
(5:300) set variable %cuff to the value 1.
* When Captor walks into a furre while trapping mode is active, then 'cuff' the furre.
(0:1) Whenever somebody moves,
(1:11) and the triggering furre has got shared control (or is the dream owner),
(1:4) and they bump into a furre,
(1:200) and variable %cuff is equal to 1,
(5:350) set variable %captorPos to the X,Y position the triggering furre (moved from/is standing at).
(5:351) set variable %captivePos to the X,Y position the triggering furre moved to.
* When the captor says 'uncuff' and we're currently 'cuffing' someone, then release this furre.
(0:31) When a furre says {!uncuff},
(1:11) and the triggering furre has got shared control (or is the dream owner),
(1:200) and variable %cuff is equal to 1,
(5:300) set variable %captorPos to the value 0.
(5:300) set variable %captivePos to the value 0.
(5:300) set variable %cuff to the value 0.
* When the captive tries to move, move him back to where he came from
(0:1) Whenever somebody moves,
(1:19) and they (moved from/are standing at) position (%captivePos),
(1:200) and variable %cuff is equal to 1,
(5:18) move the triggering furre back where they came from.
* When the captor moves succesfully, move the captive into the space he just left.
(0:1) Whenever somebody moves,
(1:5) and they successfully moved,
(1:19) and they (moved from/are standing at) position (%captorPos),
(1:200) and variable %cuff is equal to 1,
(5:351) set variable %captorPos to the X,Y position the triggering furre moved to.
(3:2) at position (%captivePos) on the map,
(5:350) set variable %captivePos to the X,Y position the triggering furre (moved from/is standing at).
(5:16) move any furre present to (%captivePos) if there's nobody already there.
Could someone please help me finish this? I'd appreciate it a lot. Thank you.
Posted by: mimiru1618 Oct 12 2009, 11:12 AM
I actually have something similar to this. It doesn't really require this much, especially if you don't WANT t incooperate a DS button. For mine, I have specific items placed in the dream, though you don't even have to have those. All you pretty much need is
(0:31) When a furre says {Please help me},
(5:202) emit message {[furre] is in need of assistance!} to every furre who can see (#,#).
(5:200) emit message {Your request has been sent to the desk! Someone should get with you shortly!} to the triggering furre.
(5:202) will emit to anyone how is sitting at the staff area. If you want it to be emitted to people who ARE staff, I would suggest assigning staff with a specific PS code,,
(0:9) When a furre arrives in the dream,
(1:11) and the triggering furre has got shared control (or is the dream owner),
(5:600) memorize that the PhoenixSpeak info {staff} about the triggering furre will now be 1.
Sadly I do not know a way to emit a message to people who specifially have that PS coding.
Posted by: Contastrophy Oct 13 2009, 05:22 PM
I made the following codes and tested them, they worked. There are two versions, one using PS that emits to ANY staff on duty, and the other doesn't use PS and emits to a space behind the desk.
PhoenixSpeak Version
CODE
DSPK V04.00 Furcadia
Ds Button Help System (PhoenixSpeak Required)
Created by Contastrophy
//Startup.
(0:0) When everything is starting up,
(5:300) set variable %helpme to the value 0.
//The button itself, when clicked will activate the code.
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme is equal to 0,
(5:200) emit message {Staff have been notified of your request. Please move one space in any direction so staff can teleport to your location. #SA} to the triggering furre.
(5:300) set variable %helpme to the value 1.
(5:350) set variable %helplocation1 to the X position the triggering furre (moved from/is standing at).
(5:350) set variable %helplocation2 to the Y position the triggering furre (moved from/is standing at).
//The request is then sent to staff, only if their PS for help is zero. This prevents spam, by changing the PS 'help' to one afterwords.
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:600) and the PhoenixSpeak info {help} about the triggering furre is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:200) and variable %helpme is equal to 1,
(5:200) emit message {A furre needs help! Say !help to get to them!} to the triggering furre.
(5:600) memorize that the PhoenixSpeak info {help} about the triggering furre will now be 1.
//!help brings the staff to the furre, and will reset the help request system.
(0:31) When a furre says {!help},
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(5:15) move the triggering furre to (%helplocation1,%helplocation2), or to someplace nearby if it's occupied.
(5:300) set variable %helpme to the value 0.
(5:600) memorize that the PhoenixSpeak info {help} about the triggering furre will now be 0.
//This resets staff PS for help recieved.
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:200) and variable %helpme is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:600) and the PhoenixSpeak info {helpreceived} about the triggering furre is equal to 1,
(5:600) memorize that the PhoenixSpeak info {helprecieved} about the triggering furre will now be #0.
*Endtriggers* 8888 *Endtriggers*
No PS:
(0:80) When a furre clicks DragonSpeak Button 1,
(5:202) emit message {[FURRE] Needs help!} to every furre who can see (deskpositionhere).
They should work! If one of them doesn't, let me know! #SA
Posted by: Pleistocene Nov 2 2009, 11:51 AM
QUOTE (Contastrophy @ Oct 13 2009, 05:22 PM)

I made the following codes and tested them, they worked. There are two versions, one using PS that emits to ANY staff on duty, and the other doesn't use PS and emits to a space behind the desk.
PhoenixSpeak Version
CODE
DSPK V04.00 Furcadia
Ds Button Help System (PhoenixSpeak Required)
Created by Contastrophy
//Startup.
(0:0) When everything is starting up,
(5:300) set variable %helpme to the value 0.
//The button itself, when clicked will activate the code.
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme is equal to 0,
(5:200) emit message {Staff have been notified of your request. Please move one space in any direction so staff can teleport to your location. #SA} to the triggering furre.
(5:300) set variable %helpme to the value 1.
(5:350) set variable %helplocation1 to the X position the triggering furre (moved from/is standing at).
(5:350) set variable %helplocation2 to the Y position the triggering furre (moved from/is standing at).
//The request is then sent to staff, only if their PS for help is zero. This prevents spam, by changing the PS 'help' to one afterwords.
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:600) and the PhoenixSpeak info {help} about the triggering furre is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:200) and variable %helpme is equal to 1,
(5:200) emit message {A furre needs help! Say !help to get to them!} to the triggering furre.
(5:600) memorize that the PhoenixSpeak info {help} about the triggering furre will now be 1.
//!help brings the staff to the furre, and will reset the help request system.
(0:31) When a furre says {!help},
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(5:15) move the triggering furre to (%helplocation1,%helplocation2), or to someplace nearby if it's occupied.
(5:300) set variable %helpme to the value 0.
(5:600) memorize that the PhoenixSpeak info {help} about the triggering furre will now be 0.
//This resets staff PS for help recieved.
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:200) and variable %helpme is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:600) and the PhoenixSpeak info {helpreceived} about the triggering furre is equal to 1,
(5:600) memorize that the PhoenixSpeak info {helprecieved} about the triggering furre will now be #0.
*Endtriggers* 8888 *Endtriggers*
No PS:
(0:80) When a furre clicks DragonSpeak Button 1,
(5:202) emit message {[FURRE] Needs help!} to every furre who can see (deskpositionhere).
They should work! If one of them doesn't, let me know! #SA
The PS one didn't work. Let me know when it's fixed so I can use it. And thank you for all of your help. ^^
Posted by: Squizzle Nov 3 2009, 09:22 PM
You should also add a timer after the button is clicked to hide it so that the Furre can't abuse the button by repeatedly pressing it and spamming staff members.
Posted by: Rhea Nov 4 2009, 06:55 AM
I took Contastrophy's design and expanded on it to make a more encompassing script. Great job on the original, credit's all yours!
This one uses PS too, and adds a 3-spot queue so staff aren't spammed with requests constantly.
CODE
//Startup.
(0:0) When everything is starting up,
(5:300) set variable %helpme1 to the value 0.
(5:300) set variable %helpme2 to the value 0.
(5:300) set variable %helpme3 to the value 0.
//The button itself, when clicked will activate the code. **I added a counter so that if two people end up requesting help close in time to each other, they won't conflict. Also, you don't have to move.**
anti-spam--
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation1),
(5:200) emit message {Staff have been notified of your request, please wait for someone to come assist you!Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(0:1) Whenever somebody moves,
(1:200) and variable %helpme1 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation1),
(5:200) emit message {Staff have been notified of your request, please wait for someone to come assist you!Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:18) move the triggering furre back where they came from.
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme2 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation2),
(5:200) emit message {Staff have been notified of your request, please wait for someone to come assist you! Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(0:1) Whenever somebody moves,
(1:200) and variable %helpme2 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation2),
(5:200) emit message {Staff have been notified of your request, please wait for someone to come assist you! Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:18) move the triggering furre back where they came from.
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme3 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation3),
(5:200) emit message {Staff have been notified of your request, please wait for someone to come assist you! Say <i>!cancel</i> to cancel your help request.} to the triggering furre.(0:1) Whenever somebody moves,
(0:1) Whenever somebody moves,
(1:200) and variable %helpme3 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation3),
(5:200) emit message {Staff have been notified of your request, please wait for someone to come assist you! Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:18) move the triggering furre back where they came from.
CANCEL help--
(0:31) When a furre says {!cancel},
(1:200) and variable %helpme1 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation1),
(5:200) emit message {Help request cancelled.} to the triggering furre.
(5:300) set variable %helpme1 to the value 0.
(0:31) When a furre says {!cancel},
(1:200) and variable %helpme2 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation2),
(5:200) emit message {Help request cancelled.} to the triggering furre.
(5:300) set variable %helpme2 to the value 0.
(0:31) When a furre says {!cancel},
(1:200) and variable %helpme3 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation3),
(5:200) emit message {Help request cancelled.} to the triggering furre.
(5:300) set variable %helpme3 to the value 0.
(0:10) When a furre leaves the dream,
(1:200) and variable %helpme1 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation1),
(5:300) set variable %helpme1 to the value 0.
(0:10) When a furre leaves the dream,
(1:200) and variable %helpme2 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation2),
(5:300) set variable %helpme2 to the value 0.
(0:10) When a furre leaves the dream,
(1:200) and variable %helpme3 is equal to 1,
(1:19) and the triggering furre (moved from/is standing at) position (%helplocation3),
(5:300) set variable %helpme3 to the value 0.
first available--
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 0,
(1:200) and variable %helpme2 is equal to 0,
(1:200) and variable %helpme3 is equal to 0,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme1 to the value 1.
(5:350) set variable %helplocation1 to the X,Y position the triggering furre (moved from/is standing at).
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 0,
(1:200) and variable %helpme2 is equal to 1,
(1:200) and variable %helpme3 is equal to 1,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme1 to the value 1.
(5:350) set variable %helplocation1 to the X,Y position the triggering furre (moved from/is standing at).
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 0,
(1:200) and variable %helpme2 is equal to 1,
(1:200) and variable %helpme3 is equal to 0,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme1 to the value 1.
(5:350) set variable %helplocation1 to the X,Y position the triggering furre (moved from/is standing at).
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 0,
(1:200) and variable %helpme2 is equal to 0,
(1:200) and variable %helpme3 is equal to 1,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme1 to the value 1.
(5:350) set variable %helplocation1 to the X,Y position the triggering furre (moved from/is standing at).
second available--
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 1,
(1:200) and variable %helpme2 is equal to 0,
(1:200) and variable %helpme3 is equal to 0,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme2 to the value 1.
(5:350) set variable %helplocation2 to the X,Y position the triggering furre (moved from/is standing at).
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 1,
(1:200) and variable %helpme2 is equal to 0,
(1:200) and variable %helpme3 is equal to 1,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme2 to the value 1.
(5:350) set variable %helplocation2 to the X,Y position the triggering furre (moved from/is standing at).
third available--
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 1,
(1:200) and variable %helpme2 is equal to 1,
(1:200) and variable %helpme3 is equal to 0,
(5:200) emit message {Staff have been notified of your request. #SA Say <i>!cancel</i> to cancel your help request.} to the triggering furre.
(5:300) set variable %helpme3 to the value 1.
(5:350) set variable %helplocation3 to the X,Y position the triggering furre (moved from/is standing at).
no availability--
(0:80) When a furre clicks DragonSpeak Button 1,
(1:200) and variable %helpme1 is equal to 1,
(1:200) and variable %helpme2 is equal to 1,
(1:200) and variable %helpme3 is equal to 1,
(5:200) emit message {All staff help lines are busy, please try again in a few minutes. #SA} to the triggering furre.
//The request is then sent to staff, only if their PS for help is zero. This prevents spam, by changing the PS 'help' to one afterwords. **switched that to once they take the call, their help status is activated**
first location--
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:600) and the PhoenixSpeak info {help} about the triggering furre is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:200) and variable %helpme1 is equal to 1,
(5:200) emit message {A furre needs help! Say !help1 to get to them!} to the triggering furre.
second location--
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:600) and the PhoenixSpeak info {help} about the triggering furre is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:200) and variable %helpme2 is equal to 1,
(5:200) emit message {A furre needs help! Say !help2 to get to them!} to the triggering furre.
third location--
(0:70) When a furre idles (doesn't do ANYTHING) for 1 seconds,
(1:600) and the PhoenixSpeak info {help} about the triggering furre is equal to 0,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:200) and variable %helpme3 is equal to 1,
(5:200) emit message {A furre needs help! Say !help3 to get to them!} to the triggering furre.
//!help brings the staff to the furre. **changed so staff have to turn off their help, so they aren't pinged again while still helping the first person.**
first location--
(0:31) When a furre says {!help1},
(1:200) and variable %helpme1 is equal to 1,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(5:15) move the triggering furre to (%helplocation1), or to someplace nearby if it's occupied.
(5:300) set variable %helpme1 to the value 0.
second location--
(0:31) When a furre says {!help2},
(1:200) and variable %helpme2 is equal to 1,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(5:15) move the triggering furre to (%helplocation2), or to someplace nearby if it's occupied.
(5:300) set variable %helpme2 to the value 0.
third location--
(0:31) When a furre says {!help3},
(1:200) and variable %helpme3 is equal to 1,
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(5:15) move the triggering furre to (%helplocation3), or to someplace nearby if it's occupied.
(5:300) set variable %helpme3 to the value 0.
//Staff helping status reset.
(0:31) When a furre says {!helped},
(1:600) and the PhoenixSpeak info {staff} about the triggering furre is equal to 1,
(1:600) and the PhoenixSpeak info {help} about the triggering furre is equal to 1,
(5:600) memorize that the PhoenixSpeak info {help} about the triggering furre will now be 0.
(5:200) emit message {You're finished helping - status reset.} to the triggering furre.
**not sure what the last bit was for, so I took it out.**
Give it a go, let me know how this one runs.