mIRC Home    About    Download    Register    News    Help

Print Thread
#60247 14/11/03 03:08 AM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
Okay, I have a question. Why when I place this script into my alias section:

Code:
/dw {
  /msg $chan $replace($1-,about,aboot,after,efter,all,a',along,alang,alright,a'right,and,'n,are,ur,aren't,urnae,around,roon',ass,arse,ball,ba',being,bein',before,afore,belongs,belangs,between,a'tween,body,boady,bottle,boatle,but,bar,call,ca',can,kin,can not,cannae,center,centre,children,weans,cold,cauld,come on,c'moan,couldn't,couldnae,crazy,cracked,daft one,daftie,dead,deid,deaf,deef,do,dae,does,diz,does not,disnae,doing,daein',do you,d'ye,done,doon,don't,doan't,down,doon,drunk,blootered,fart,feart,fellow,fella,floor,flair,foot,fit,for,fur,from,fae,get it,gerrit,girl,girrel,give,gie,god,goad,going,gaun,going to,gonnae,got,goat,had,hid,half,hauf,has,hiz,hand,haun,hang,hing,have,huv,having,huvin',have not,havnae,haven't,havnae,head,heid,herself,hersel',himself,himsel',hold,haud,home,hame,hour,hoor,hundred,hunner,I,ah,I'm,ahm,into,intae,isn't,isnae,I've,Ah've,just,jist,language,langweej,leave,lea',little,wee,lost,loast,messy,manky,more,mair,mouth,mooth,my,ma,myself,masel',no,nae,none,nane,not,no',now,noo,now a days,nooadays,of,'o,off,aff,on,oan,once,wance,one,wan,our,oor,out,oot,outside,ootside,over,o'er,own,ain,pissing,pishin',poor,puir,put,pit,round,roond,[censored],shite,shouldn't,shouldnae,small,wee,south,sooth,stand,staun,stop,stoap,stupid,stupit,them,thum,those,thae,thought,thaot,to,tae,toilet,cludgie,told,telt,too,tae,trousers,troosers,understand,understaun,wall,wa',was,wus,wasn't,wiznae,were,wur,what,whit,will not,willnae,with,wi',world,worreld,would,wid,wouldn't,wouldnae,wouldn'tve,widnae,you,ye,you'd,ye'd,you'll,ye'll,your,yer,you're,ye're,yourself,yersel',you've,ye've)
}


and then click on okay, it doesn't work. I went to check the coding and this is what is there in its place. is just a empty set of brackets:

Code:
/dw {
}



#60248 14/11/03 03:10 AM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
si there any way of shortening that? I tried putting the coding
in a .mrc file then loading it into the alias section, but that
didn't work, got this error:

* Loaded aliases 'C:\Program Files\mIRC\Scripts\dwarftalk.mrc'
* Invalid format: $replace (line 2, dwarftalk.mrc)

#60249 14/11/03 03:13 AM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
The above script works if I only use half of the word list, but not the full thing. Is there a way of splitting it up into to smaller ones?

#60250 14/11/03 06:40 AM
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
$replace(STRING,substring,newstring)

STRING is the alphanumeric string that you want to check, substring is the alphanumeric string that you want to compare in the STRING, and newstring is what substring is replaced with in STRING.

Eg,

$replace(Hello,ell,all) would return this:
Hallo (the ell is replaced by all in Hello).

If you want to do further replacements, this is how it goes:
$replace(STRING,substring1,newstring1,substring2,newstring2,substringN,newstringN)

eg:

$replace(Welcome,el,al,om,il) returns this:
Walcilme


--------
mIRC - fun for all the family (except grandma and grandpa)
#60251 14/11/03 06:52 AM
Joined: Sep 2003
Posts: 122
Gar Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2003
Posts: 122
I have this one that works:

Code:
/leet {
  /msg $chan $replace($1-,A,4,B,8,E,3,G,6,H,|{,L,|,T,7,S,5,Z,2,?,¿)
}


It transforms a whole speech. The $1- tells it to change everything that matches string 1 to the new string 1, everything that matches string2 to the newstring2, etc.

What I am thinking is mine is to long, thus it removes it. If I break it into smaller one, then it works.

#60252 14/11/03 06:59 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I never understood why it's "elite" to use bad grammar... I must be missing something.

anyways, instead of making it all one string, try using a few.

Code:
/notelite {
  var %msg = $1-
  %msg = $replace(%msg, word1, replace1)
  %msg = $replace(%msg, word2, replace2)
  %msg = $replace(%msg, word3, replace3)
  %msg = $replace(%msg, word4, replace4)
  ; ... So On
  return %msg
}


-KingTomato

Link Copied to Clipboard