Handy little scripts

Started by Zoan, February 10, 2012, 12:31:06 AM

Hey guys,

I didn't see a place to put this neat little thing I made today, so figured I'd make a new topic for it. Feel free to add your own (preferably in the format I present, for ease of use):

This script was written because I am an idiot and keep using talk when not at tables. So frustrated, I made this.

Client: Mudlet
Language: Lua

Alias: ^talk (.*)$
Output:
sys.talkstring = matches[2]
send( matches[1] )


Trigger: (type: exact match) You're not sitting at a table!
Output:
send( "say " .. sys.talkstring )

In short, it catches what you try to 'talk' and if the 'not at a table!' line shows, it fires the sys.talkstring string as a say.
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

Client: Mushclient
Language: Lua

I have a basic script for spell effects, that assuming you know how long the effect lasts it can be set to remind you at intervals of your choosing when the effect will fade. Could be adapted to spice effects and other things as well. PM if interested and I can give you the basic format. Please refrain from divulging info on the magick code or asking questions about it. Just giving up the shell of the script with timers excluded.

Requires a new script for each spell/spice so it takes awhile to setup. But it's cool none the less. Always fun being able to emote the failure of a spell effect a second or two before it happens.

Basically it takes into account the spell cast, the power level and fires a timer.

cast 'mon un destructogun'
The script reads destructogun and mon, based off the timer you set for that and fires it once.

x min later, colored font comes up with the countdown. Set your desired interval. Always fires a warning at 1min before 0.


< 139/139 | 136/136 |127| 147/157 |before dawn(4min)|chillin>

86 min left on your destructogun

< 139/139 | 136/136 |132| 147/157 |before dawn(5min)|chillin>

You can follow up with 'timecheck' and it'll list the time remaining on all of your stuff.



< 139/139 | 136/136 |127| 147/157 |before dawn(4min)|chillin>
timecheck

86 min left on your destructogun
14 min left on finger of doom
16 min left on boob reduction
52 min left on explodo-cannon


< 139/139 | 136/136 |132| 147/157 |before dawn(5min)|chillin>
A staff member sends you:
"Normally we don't see a <redacted> walk into a room full of <redacted> and start indiscriminately killing."

You send to staff:
"Welcome to Armageddon."

February 22, 2012, 01:54:12 PM #2 Last Edit: February 22, 2012, 01:55:53 PM by KankWhisperer
Something I made for tintin++.
Basically it keeps track of all the exits around you and you can then type one command and look in the right directions.
Extremely more complicated by deciding to add 'look out' which tried to grab the wrong exits, oh well :P.


#nop // ;
#nop // Change ll to whatever command you want to look all around you. ;
#nop // Adjust the lag_factor number up if when you look out during the look ;
#nop // around process, the next time you look around you have the outside room's ;
#nop // exits. Adjust it down if your connection is speedy enough that you can ;
#nop // move one room and receive the looking around data faster then $lag_factor seconds. ;
#nop // Looking out by itself breaks it, look in the room again to reset correct rooms. ;
#nop //;

#var {do_check_exits} {1};
#var {lag_factor}{1.35}
#var {look_command}{ll}

#nop // The space here is to differentiate from [Near],[Far], etc.;
#act { [%1]}
{
       #if {$do_check_exits > 0} {
               #var {exits} {%1};
               #replace exits {, }{;};
               #replace exits {Leave;}{out};
               #replace exits {Leave}{out};
               #replace exits {Quit;}{};
               #replace exits {Quit}{};
               #replace exits {Save}{};
       };
}

#alias {$look_command} {
       #var {do_check_exits}{0};
       #foreach {$exits} {exit} {l $exit};
       #nop // ;
       #nop // Unfortunately without the lag factor, the look in the out ;
       #nop // direction will trigger the action again before it is done looking. ;
       #nop // This results in it thinking it has the room it just looked out to's exits. ;
       #nop // On slower connections anyway. ;
       #nop // ;
       #delay {$lag_factor}{#var {do_check_exits}{1};};
}