mIRC Home    About    Download    Register    News    Help

Print Thread
#146495 05/04/06 01:15 PM
Joined: Apr 2006
Posts: 12
E
Elva Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2006
Posts: 12
I want to write a script to remember information that can be accessed and updated remotely. Example: someone types !write Ben 200 year old green dragon, someone else comes along and types: !whatis Ben, I reply: Ben is a 200 year old green dragon.

The problem is, you can probably tell already, I dont have a clue what I'm doing. Before today I could join a channel and thats about it, I have no programming experience and what I know about IRC and computers in general is pretty limited. So, where would I go to learn how to do this? Where would I find a script that does what I want, or something similar, that I can pull appart and study? Is this a really complicated thing to do? Any advice appreciated. smile


Warning: noob on the loose
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Such scripts already exist. Search around for one unless you really want to write one... In which case, I recommend using hash tables

/hmake hFacts 100

;; In an event (:TEXT: sounds like what you want)
;; This will save, using $2 as the "search word"
if ($1 == !write) { hadd hFacts $2- }
;; This will return results
if ($1 == !whatis) { .msg $nick $2 is a $hget(hFacts, $2) }

Don't forget to save you hash table on exit, or better yet on a timer, encase mIRC crashes and the exit events don't occur. Also Load the hash table on :start: event.


NaquadaBomb
www.mirc-dll.com
Joined: Apr 2006
Posts: 12
E
Elva Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2006
Posts: 12
hehe smile
thanks. I dont understand it but I will work on that.
much appreciated.


Warning: noob on the loose

Link Copied to Clipboard