Text File System

By HeatedHeart on Aug 02, 2009

Well guys i have not been on hawkee in a long time... partly because i forgot my password xD stupid case sensitive -.- took me forever to figure out that i had cap'd the first letter of my password. anyways im gona be more active here and post my snippets and such, feedback is more than welcome.

Now onto this snippet. Made this for a friend who wanted a script like !Fact or !joke and wanted to quickly change between them. It will tell you when you load it how to use it, but for kicks and giggles heres the syntax:
/Trigger : will set you trigger, Example [ /Trigger !Joke ] would set !joke for your trigger.

/Tlist : Shows you all available text files you have

/Tfile : sets the file to read from, Example [ /tfile Jokes.txt ] would set jokes.txt to read from.


pretty simple snippet, i used $findfile incase you have such things as a folder for text files and such, it will search threw it all.
Also people are bound to comment on my wierd varible names, its how i number my varibles A threw B then AA AB AC.... then AAA AAB AAC... and so forth, i have alot of scripts as you can tell... xD

alias trigger { 
  set %bgx $1
  echo -a Trigger Set To %Bgx
}
alias tlist {
  echo -a Listing Avaible Text Files....
  var %x $findfile($mircdir,*.txt,0)
  echo -a ( $+ %x $+ ) Number of Files
  var %temp.1 1
  While (%temp.1 <= %x) {
    var %filePath $findfile($mircdir,*.txt,%temp.1)
    echo -a $gettok(%filepath,$numtok(%filepath,92),92)
    inc %temp.1
  }
}
alias tfile { 
  set %bgy $1
  var %w $findfile($mircdir,%bgy,1)
  var %z $isfile(%w)
  if (%z == $false) {
    echo -a File not found 
    unset %BGY
    halt
  }
  if (%z == $true) {
    echo -a File Set To %BGY
    Set %bgz %W
  }
}
on *:LOAD:{ 
  echo -a Type "/trigger <Trigger>" to set your !trigger to trigger script. EG: /trigger !Jokes
  echo -a Type "/Tfile <file>" to set the text file to read from. EG: /Tfile jokes.txt
  echo -a Type "/Tlist" to see all availbe text file you can choose from.
}
on *:text:*:#: {
  if ($1 == %bgx) { 
    msg $chan $read(%x)
  }
}
on *:INPUT:*: {
  if ($1 == %bgx) { 
    msg $active $Read(%bgz)
  }
}

Comments

Sign in to comment.
PATX   -  Aug 13, 2009

lol. i like this better.

 Respond  
HeatedHeart   -  Aug 13, 2009

you give THIS one a 5/5 and its clearly hindered compared to its big brother?.....
what ever -.-

 Respond  
PATX   -  Aug 13, 2009

lol i like the password storyy lmao.

5/5

http://txtb.in/3U5

i love text based...

 Respond  
HeatedHeart   -  Aug 11, 2009

if you read my new topic, you would see that i clearly said "I didnt update my old one because of the dramatic difference" this one is a simple, "TEXT" based system, that is alias controlled, while my new one supports a dialog and MANY extensions not just TEXT based

 Respond  
Jonesy44   -  Aug 11, 2009

You should update snippets rather than double posting :/

 Respond  
HeatedHeart   -  Aug 11, 2009

have an new, advanced version of this. http://www.hawkee.com/snippet/6550/

 Respond  
Cracker200   -  Aug 08, 2009
 this is a code if it don't work i give up

OMFG IT WORKED LOL

 Respond  
Jonesy44   -  Aug 06, 2009

Touche. ;) lol!

 Respond  
HeatedHeart   -  Aug 06, 2009

/me admits defeat Sad face

 Respond  
Jonesy44   -  Aug 06, 2009

smh @ smh'ing

 Respond  
HeatedHeart   -  Aug 06, 2009

smh @ jonesy44

 Respond  
Jonesy44   -  Aug 06, 2009

smh @ napa

 Respond  
napa182   -  Aug 05, 2009

smh @ code tags

 Respond  
Jonesy44   -  Aug 05, 2009
this is my code! Hello world :)

this is my code! Hello world :)[*/code]

Remove the asterisk..
 Respond  
HeatedHeart   -  Aug 04, 2009

you had it but reverese
(code)
blah blah blah
(/code)

blah blah blah
 Respond  
Cracker200   -  Aug 04, 2009

BLAH!

 Respond  
Cracker200   -  Aug 04, 2009
testing  ok ok ok idk how the fuck to do it lmfao :D and no i aint a n00b i am new to this site so yeh i am a n00b to this site :)

(/code) lol this way ??


 this way ? 
 Respond  
HeatedHeart   -  Aug 04, 2009

(code) ;codehere; (/code) instead of () its []

 Respond  
Cracker200   -  Aug 03, 2009

Yes ok thanks and how i do it so it is in a box like code then the code?

 Respond  
HeatedHeart   -  Aug 03, 2009

on *:text:*:#: {
if ($1 == %bgx) { ;; if $1 is the trigger(%bgx)
msg $chan $read(%x) ;; reads the file
}
}
on *:INPUT:*: {
if ($1 == %bgx) { ;; if you type the trigger
msg $active $Read(%bgz) ;; Reads the file
}
} 
 Respond  
Cracker200   -  Aug 03, 2009

Lol, sorry i don't know how to do the code in the box haha

 Respond  
Cracker200   -  Aug 03, 2009

well it's good and ure a dufus lol 4got thats u have cap'd ure first letter Hahaha But yeh so this snippet is good and handy thanks :) but i don't get this bit of the code how does it work please tell me :D (code) on :text::#: {
if ($1 == %bgx) {
msg $chan $read(%x)
}
}
on :INPUT:: {
if ($1 == %bgx) {
msg $active $Read(%bgz)
}
}

 Respond  
HeatedHeart   -  Aug 03, 2009

No comments at all? Anything? Criticism even ;(

 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.