Entertainer Archive
Thread: UIltimate Buff Timer!
So, this timer will watch any number of people, in group or not. After 3 minutes it will send them a /tell saying they are done.
Edit: Ultimate buff timer v 2.0
bufftimer /:buff:start;/:buff:pre:setname
:buff:pre:setname /alias :buff:pre:alias /:buff:pre:cmd
:buff:pre:setcmd /alias :buff:pre:cmd
:buff:tell:set /alias :buff:tell:send /tell
:buff:start /pause 0.2;/:buff:pre:setcmd /tell;/pause 0.2;/:buff:tell:start;/:buff:pre:setcmd /:buff:time;/pause 0.2;/:buff:pre:alias
:buff:time /pause 210;/:buff:tell:all;/:buff:tell:set
:buff:tell:all /pause 0.2;/:buff:tell:1;/:buff:tell:2;/pause 2;/:buff:tell:3
:buff:tell:start /:buff:pre:alias Just watch me and sit tight for 3 minutes. I'll send you a tell when the buff is done.
:buff:tell:1 /:buff:tell:send Your buff is done! You can stop watching whenever you are ready to leave.
:buff:tell:2 /:buff:tell:send If you will be getting a buff from a musician, be sure to stop watching me first, or the buffs may not work.
:buff:tell:3 /:buff:tell:send Thank you for supporting live entertainers! We'll still be here when the buffbots are gone.
To use it, type /bufftimer Name. So if you are buffing Luke, you type /bufftimer Luke. If you are doing a musician buff, change watch to listen, and musician to dancer (In the warning about getting another buff.) You can also change the delay by changing 210 (3:30) to whatever you wanted. For example, 480 for 8 minutes.
The original method and notes:
:buff:tell:set /alias :buff:tell:send /tell
:buff:tell:start /ttell Just watch me and sit tight for 3 minutes. I'll send you a tell when the buff is done.
:buff:tell:1 /:buff:tell:send Your buff is done! You can stop watching whenever you are ready to leave.
:buff:tell:2 /:buff:tell:send If you will be getting a buff from a musician, be sure to stop watching me first, or the buffs may not work.
:buff:tell:3 /:buff:tell:send Thank you for supporting live entertainers! We'll still be here when the buffbots are gone.
:buff:tell:all /pause 1;/:buff:tell:1;/:buff:tell:2;/pause 2;/:buff:tell:3
bufftimer /:buff:tell:start;/pause 210;/:buff:tell:all;/:buff:tell:set
To use it, simply target your intended buffee do /bufftimer Name. So if you are buffing Joe, you /target Joe then /bufftimer Joe. Yes, you need to have them targetted and also name them. The target is for the first tell, the name for the rest. If I think of a better way, I'll post it here.
Message Edited by Tiaga on 01-14-2005 12:49 AM
Tiaga wrote:
Was doing some hardcore buffing in Theed today to take the business from a bot, and I threw together what I call the ultimate buff timer. I had been using group to tell people it was done, but that didn't work if I wasn't grouped, and confused people if I was doing more than one sometimes.
So, this timer will watch any number of people, in group or not. After 3 minutes it will send them a /tell saying they are done.
:buff:tell:set /alias :buff:tell:send /tell
:buff:tell:start /ttell Just watch me and sit tight for 3 minutes. I'll send you a tell when the buff is done.
:buff:tell:1 /:buff:tell:send Your buff is done! You can stop watching whenever you are ready to leave.
:buff:tell:2 /:buff:tell:send If you will be getting a buff from a musician, be sure to stop watching me first, or the buffs may not work.
:buff:tell:3 /:buff:tell:send Thank you for supporting live entertainers! We'll still be here when the buffbots are gone.
:buff:tell:all /pause 1;/:buff:tell:1;/:buff:tell:2;/pause 2;/:buff:tell:3
bufftimer /:buff:tell:start;/pause 210;/:buff:tell:all;/:buff:tell:set
To use it, simply target your intended buffee do /bufftimer Name. So if you are buffing Joe, you /target Joe then /bufftimer Joe. Yes, you need to have them targetted and also name them. The target is for the first tell, the name for the rest. If I think of a better way, I'll post it here.
If people want I'll post an explanation of how it works later.My brains hurts too much right now though.
Message Edited by Tiaga on 08-20-2004 11:29 PM
Rewrote it so you only need to name the person being buffed, not target them. Just a bit of a warning.. Using the new alias is SPAM! The old one isn't too bad, just a few lines when you start and a few lines at the end. The new one will fill up your main chat window. So if you use it, I suggest you put the channels you care about (tells, spatial, group, etc) in a tab outside the main chat window.
I also added syntax hilights, to make it easier to read for those who want to try and figure out what it does. A brief key of the hilights:
Alias definition name
Built-in command
Alias execution
Number
Indirectly called built-in command*
Indirectly called alias*
Message sent in /tell
* Indirectly called aliases and commands are passed as an argument to another alias which then defines a /alias to call them. They are not called directly at that point, but later when the defined alias is used.
Message Edited by Tiaga on 08-21-2004 06:15 AM
Message Edited by Tiaga on 08-21-2004 06:48 AM
Message Edited by Tiaga on 08-21-2004 12:20 AM
Alright, an explanation of how this all works for the curious. This is very technical, and at this point, if you do not at least have a passing knowledge in programming, I'd recommend just skipping the explanation.
bufftimer /:buff:start;/:buffre:setname
This is the alias you actually use to start it. It has a simple name, /bufftimer. Assuming you are buffing Luke, you would use /bufftimer Luke. Since aliases are treated as issuing the commands in place of what you typed, that /bufftimer Luke becomes /:buff:start;/:buff
All the other aliases are named with a :buff: in front. This helps with aliases not meant to be used directly to avoid ambiguity with commands. The aliases with :buff
re: before them are used to send the initial instructions. The aliases with :buff:tell: are used to send a tell to the intended person.
:buffre:setname /alias :buff
re:alias /:buff
re:cmd
:buffre:setcmd /alias :buff
re:cmd
The first aliase used by /bufftimer is /:buff:start. It then uses /:buff
The reason an alias is used to set the new alias instead of /alias is so it can be done in the middle of a command. If you did something like /alias next /bye;/wave, you would get an alias next that did /bye;/wave. If insted you had an alias called setnext that was /alias next, then if you did /setnext /bye;/wave, you would alias /next to /bye, then /wave immediately. The setname alias isn't required to be an alias, the /alias command could be used directly in that case.
:buff:start /:buffre:setcmd /tell;/pause 0.2;/:buff:tell:start;/:buff
re:setcmd /:buff:time;/pause 0.2;/:buff
re:alias
This starts by setting the command to be used by /:buff:alias. It sets it to /tell. That means, /:buff:alias is now /tell Luke. That is how the name is used as a tell target. The pause is because the name hasn't been set yet. Since a pause in an alias doesn't pause the command it is using, that means it goes on to set the name, then 0.2 seconds later uses /:buff:tell:start to give the instructions. Next it again sets the command used by /:buff:alias, this time to /:buff:time. The result is that /:buff
:buff:time /pause 210;/:buff:tell:all;/:buff:tell:set
This is the meat of the timer. It starts with a pause. I use 210 seconds for 3:30 minutes. After the timer is up, it does /:buff:tell:all and /:buff:tell:set. Since this is used as /:buff:time Luke, the last command becomes /:buff:tell:set Luke.
:buff:tell:set /alias :buff:tell:send /tell
Exactly like before. This time, /tell is the only command to be used, so it is used directly instead of another alias to define the command. Since this is used as /:buff:tell:set Luke, it becomes /alias :buff:tell:send /tell Luke.
:buff:tell:all /pause 0.2;/:buff:tell:1;/:buff:tell:2;/pause 2;/:buff:tell:3
This starts with a /pause for the same reason :buff:start has a /pause. The /tell target hasn't been changed yet, so it needs the calling commands to finish first. It then sends the instructions for ending things, as well as anti-buffbot propoganda.
:buff:tell:start /:buffre:alias Just watch me and sit tight for 3 minutes. I'll send you a tell when the buff is done.
:buff:tell:1 /:buff:tell:send Your buff is done! You can stop watching whenever you are ready to leave.
:buff:tell:2 /:buff:tell:send If you will be getting a buff from a musician, be sure to stop watching me first, or the buffs may not work.
:buff:tell:3 /:buff:tell:send Thank you for supporting live entertainers! We'll still be here when the buffbots are gone.
None of these need to be aliases. They just are for readibility sake. The various /tells to send.
In truth, a lot of those don't need to be aliases. Only :buff:start, :buff:time, :buff:tell:all and :buff
re:setcmd need to be aliases, and of course bufftimer. So if you don't care about readability you could rewrite this in less aliases (So less alias spam when you use it) in the following way.
bufftimer /:buff:start;/alias :buffre:alias /:buff
re:cmd
:buffre:setcmd /alias :buff
re:cmd
:buff:start /:buffre:setcmd /tell;/pause 0.2;/:buff
re:alias Just watch me and sit tight for 3 minutes. I'll send you a tell when the buff is done.;/:buff
re:setcmd /:buff:time;/pause 0.2;/:buff
re:alias
:buff:time /pause 210;/:buff:tell:all;/alias :buff:tell:send /tell
:buff:tell:all /pause 0.2;/:buff:tell:send Your buff is done! You can stop watching whenever you are ready to leave.;/:buff:tell:send If you will be getting a buff from a musician, be sure to stop watching me first, or the buffs may not work.;/pause 2;/:buff:tell:send Thank you for supporting live entertainers! We'll still be here when the buffbots are gone.
Less aliases, but perhaps a little harder to follow.
Message Edited by Tiaga on 08-23-2004 03:07 PM
Message Edited by Tiaga on 08-23-2004 03:10 PM
My instinct would be that the /cmd1;/cmd2 would execute all of cmd1 before cmd2 (with the toplevel execution context controlling the calling of cmd1 and cmd2).
In pseudocode:
function main {
cmd1; // must finish before cmd2 can start
cmd2;
}
Whereas if cmd1 pauses, main can then move on to cmd2. Does cmd1 have to pause for cmd2 to execute (if you know)? For example, if cmd1 were an infinite loop with no pauses, would cmd2 just happen to execute sometime?
All in all, very impressive work, Tiaga.
/byealias
/wave
/pause 10 (Rest of alias becomes a queued command)
/shout I'm going now
(10 seconds pass)
/bye
If it is a single threaded script engine, I can easily see it being done that way. There are other possibilities, but they all look about the same as far as execution profile. There is a /pause in there that I put in only because I wasn't 100% sure how things would execute. I'm also not sure if the system would fall apart if the client was under heavy load.
In a normal programming language, yes you would expect something to complete before "returning". This isn't a programming language though. It's a scripting language, and was never meant to be a programming language. To get it to do some of the things I have it do requires jumping through quite a few hoops.
It is possible to do what you are thinking of, but you have to jump through a hoop. You would have to define byealias as "/wave;/pause 10;/bye;/" then do the command "/byealias shout I'm going now.". The alias then gets expanded into "/wave;/pause 10;/bye;/ shout I'm going now.". The difference is that the shout becomes part of the alias command chain then, not the main command chain, so it is queued with the rest of the commands with the /pause.