Powwow, saving narrates/tells/etc to a file, and beeping

Here we discussed clients, mappers, tunnels and their settings.
Locked
science
Posts: 70
Joined: Wed Aug 13, 2008 7:00 pm

Powwow, saving narrates/tells/etc to a file, and beeping

Post by science »

I've been doing lots of scripting... I'll try posting a few things here and see if people find them interesting. Then maybe I'll post more :)

I don't think it's pasting the ASCII control characters properly. Grab the diamond/inviisble char from here and put it before any "["s http://nschimme.googlepages.com/ansi.htm

Obviously you'll have to change the path of the file for something that'll work on your machine.
#alias -={}
- this alias lets us make comments by starting with the - character. much prettier.

- it'll beep when someone tells you for the first time in @tellbeep_mins
#var @tell_timer=0
#var @tellbeep_mins=5
#alias tellbeep={#var @tellbeep_mins=$1}

- actions to see when people say/tell/narrate, and log to file. and beep if tells
#action >+alert-say [36m$1[36m says &2[0m={#write ("$1 says $2";"/Users/inspire/Projects/mume/says.txt"); #add $1;#print}
#action >+alert-say2 [36m$1[36m $2 &3[0m={#write ("$1 says $3";"/Users/inspire/Projects/mume/says.txt"); #print}
#action >+alert-narrates [33m$1 narrates &2[0m={#write ("$1 narrates $2";"/Users/inspire/Projects/mume/narrates.txt");#add $1; #if (@show_narrate) #print;}
#action >+alert-tell [32m$1 tells you &2[0m={#print;#write ("$1 tells you $2";"/Users/inspire/Projects/mume/tells.txt"); #add $1; #bind ctrl-r ^R=&insert-string tell $1 ;#if (((timer-@tell_timer)/1000) > ((@tellbeep_mins)*60)) {beep}; #(@tell_timer=timer)}

- add to the log when we says/tell something. says don't work, since we can't match on '
#alias tell={#write ("tell $0";"/Users/inspire/Projects/mume/tells.txt");#send ("tell $0")}
#alias say={#write ("say $0";"/Users/inspire/Projects/mume/says.txt");#send ("say $0")}
#alias narrate={#write ("narrate $0";"/Users/inspire/Projects/mume/narrates.txt");#send ("narrate $0")}
#alias nar=narrate $0
#alias na=narrate $0


- Get a list of the latest 40 says by typing 'says'
#al pline=#print (attr "green"+"-------------------------------------------------------------------------------"+noattr);
#var $nl=40;
#alias tells={ #if ("$0"!="") #var $nl=$0; pline; #print ("Last "+$nl+" tells:"); #exe ("#! tail -n "+$nl+" /Users/inspire/Projects/mume/tells.txt");#var $nl=40}
#alias narrates={ #if ("$0"!="") #var $nl=$0; pline; #print ("Last "+$nl+" narrates:"); #exe ("#! tail -n "+$nl+" /Users/inspire/Projects/mume/narrates.txt");#var $nl=40}
#alias says={ #if ("$0"!="") #var $nl=$0; pline; #print ("Last "+$nl+" says:"); #exe ("#! tail -n "+$nl+" /Users/inspire/Projects/mume/says.txt");#var $nl=40}

Hope someone finds this useful :) If so, let me know, and I'll post more stuff. Or just tell me to post more stuff anyways :)
Chark
Posts: 27
Joined: Wed Feb 27, 2008 8:12 am

Re: Powwow, saving narrates/tells/etc to a file, and beeping

Post by Chark »

You are stopping now? Post more stuff! 8-)
Wobbler
Posts: 393
Joined: Mon Feb 25, 2008 10:02 pm

Re: Powwow, saving narrates/tells/etc to a file, and beeping

Post by Wobbler »

You ought to be able to post \027, which is sometimes better when pasting text anyway.
Politicians are wise and benevolent and will gladly sacrifice themselves for the common good. Anyone who implies that there might exist dishonest politicians is obviously a terrorist who should be locked up indefinitely without a trial.
Locked