Random Name Generator

By Litch on Jan 29, 2011

Screenshots

Random Name Generator.

Uses information that's put into the dialog and sends the information via a socket, et voila it gives you a name.

~How to use.

1) Install into a CLEAN .mrc (is important that it's .mrc, .ini will screw it up) file.

2) Right click in a channel/status window, select "Random Name" and fill in information

African=afr 
Albanian=alb
Arabic=ara
Armenian=arm
Basque=bas
Breton=bre
Bulgarian=bul
Catalan=cat
Chinese=chi
Cornish=cor
Croatian=cro
Czech=cze
Danish=dan
Dutch=dut
English=eng
Esperanto=esp
Estonian=est
Finnish=fin
French=fre
Frisian=fri
Galician=gal
Georgian=geo
German=ger
Greek=gre
Hawaiian=haw
Hungarian=hun
Icelandic=ice
Indian=ind
Indonesian=ins
Iranian=ira
Irish=iri
Italian=ita
Japanese=jap
Jewish=jew
Khmer=khm
Korean=kor
Latvian=lat
Limburgish=lim
Lithuanian=lth
Macedonian=mac
Manx=man
Maori=mao
Native American=ame
Norwegian=nor
Polish=pol
Portuguese=por
Provençal=pro
Romanian=rmn
Russian=rus
Scottish=sco
Serbian=ser
Slovak=slk
Slovene=sln
Spanish=spa
Swedish=swe
Thai=tha
Turkish=tur
Ukrainian=ukr
Vietnamese=vie
Welsh=wel
Mythology=myth
Greek Myth=grem
Roman Myth=romm
Celtic Myth=celm
Norse Myth=scam
Hinduism=indm
Ancient=anci
Classical Greek=grea
Classical Roman=roma
Ancient Celtic=cela
Ancient Germanic=teua
Biblical=bibl
History=hist
Literature=lite
Theology=theo
Witch=witch
Fairy=fairy
Goth=goth
Hippy=hippy
Rapper=rap
Wrestler=wrest
Hillbilly=hb
Kreatyve=kk
Transformer=trans

dialog rname {
  title "Random Name Generator"
  size -1 -1 390 265
  option pixels
  box "Settings", 1, 2 2 386 224
  list 2, 4 62 110 123, size
  text "Categories", 3, 4 25 110 17, center
  list 4, 116 62 110 103, size sort
  button "Remove", 5, 116 167 110 17
  button "Clear", 6, 116 186 110 17
  text "Selected", 7, 116 25 110 17, center
  button "Add", 8, 4 186 110 17
  edit "", 9, 228 63 156 20, autohs
  text "Surname", 10, 229 44 100 17
  text "Gender", 11, 228 87 100 17
  combo 12, 228 106 156 22, drop
  text "Names", 13, 228 132 100 17
  combo 14, 228 151 156 22, drop
  button "Find Name", 15, 228 205 156 17
  box "", 16, 2 221 386 42
  text "Your Random Name", 17, 4 236 380 17, center
  button "Reset Settings", 18, 228 186 156 17
  check "", 19, 4 43 15 17
  text "All", 20, 21 44 91 17
}

on *:dialog:rname:*:*: {
  if ($devent == init) {
    did -c $dname 19
    did -b $dname 2
    var %i 1 
    while (%i <= 84) {
      did -a rname 2 $gettok($read($script,%i),1,61)
      inc %i
    }
    did -a rname 12 Male
    did -a rname 12 Female
    did -a rname 12 Both
    did -a rname 14 First name
    did -a rname 14 First name, middle name
    did -a rname 14 First name, 2 middle names
    did -a rname 14 First name, 3 middle names
  }
  if ($devent == dclick) {
    if ($did == 2) {
      if (!$didwm($dname,4,$did($dname,2).seltext)) {
        did -a $dname 4 $did($dname,2).seltext
      }
    }
  }
  if ($devent == sclick) {
    if ($did == 5) {
      if ($did($dname,4).sel) {
        did -d $dname 4 $did($dname,4).sel
      }
    }
    if ($did == 6) {
      did -r $dname 4
    }
    if ($did == 8) {
      if ($did($dname,2).seltext) {
        if (!$didwm($dname,4,$did($dname,2).seltext)) {
          did -a $dname 4 $did($dname,2).seltext
        }
      }
    }
    if ($did == 15) {
      sockopen rnamedialog www.behindthename.com 80
    }
    if ($did == 18) {
      did -r $dname 4,9
      did -u $dname 12,14
    }
    if ($did == 19) {
      if ($did($dname,19).state == 1) {
        did -b $dname 2
        did -r $dname 4
      }
      else {
        did -e $dname 2
      }
    }
  }
  did -t $dname 15
}

alias -l rnamelink {
  if ($right($sockname,-5) == dialog) {
    var %m $+(/random/random.php?,number=,$iif($did(rname,14).sel,$v1,1),&gender=,$iif($did(rname,12).seltext,$iif($v1 == male,m,$iif($did(rname,12).seltext == female,f,Both)),m),&surname=,$replace($did(rname,9).text,$chr(32),-),&all=,$iif($did(rname,19).state == 1,yes,no))
    if ($did(rname,19).state != 1) {
      var %i 1 
      while (%i <= $did(rname,4).lines) { 
        var %m $+(%m,&usage_,$gettok($read($script,r,$+(/^,$did(rname,4,%i).text,/)),2,61),=1)
        inc %i 
      }
    }
  }
  return %m
}

on *:sockopen:rname*: {
  if ($sockerr) {
    sockclose $sockname
  }
  sockwrite -nt $sockname GET $rnamelink
}

on *:sockread:rname*: {
  if ($sockerr) {
    echo -s $sockname $+ : error $1-
    sockclose $sockname
  }
  else {
    var %i
    sockread %i
    if ($regex(%i,/(.+)</font></center><br><br><br>/g)) {
      var %j $regml(1)
      if ($right($sockname,-5) == dialog) {
        did -ra rname 17 $remove($regsubex(%j,/<a href="/name/[\w-]+" class="\w+">/g,$chr(32)),</a>)
        sockclose $sockname
      }
    }
  }
}

menu channel,status {
  Random Name: $iif(!$dialog(rname),dialog -m rname rname)
}

Comments

Sign in to comment.
MoshMage   -  Jan 30, 2011

"hmm whattam i gonna call you, little one? Lemme just check mah mIRC and we will see that right in a minute ok?"

 Respond  
napa182   -  Jan 29, 2011

yeah I did it's somewhere on the forum, but i don't think it was to that site..
ah I used kleimo.com

 Respond  
Jethro   -  Jan 29, 2011

Didn't you make a socket script in conjunction with the gender nickname or something a while back?

 Respond  
napa182   -  Jan 29, 2011

nope don't think I ever made a socket to that site..

 Respond  
Jethro   -  Jan 29, 2011

This looks like a socket script napa182 has done, except for the dialog implementation and a few extras.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.