This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Bot that keeps track of a database

Old posts that have not been replied to for several years.
Locked
M
Mark
Voice
Posts: 11
Joined: Fri Oct 08, 2004 9:47 am
Contact:

Bot that keeps track of a database

Post by Mark »

basically, what i want to do is have a bot that can store data where if someone types, -count 72 4536, it stores that in a database, and if someone types -event 72, it reads back whatever is in the database?, i'm not very good at scripting, and i just started to learn tcl, and if the current count stored under 72 is higher then something someone types, it doesnt do anything, like if 72 is @ 4536, someone cant move it down to 72 @ 4535, here is an mirc example script if it will help anyone

Code: Select all

on *:text:-*:#:{
  if ($1 == -count) && ($2 isnum) && ($3 isnum $+(1-,$calc($hget(count,$2) + 20))) { hadd -m count $2- }
  elseif ($1 == -walk) && ($2 isnum) && ($3 isnum $+(1-,$calc($hget(count,$2) + 20))) { hadd -m walk $2- }
  elseif ($1 == -event) && ($hget(count,$2)) && ($hget(walk,$2)) { msg $nick Current Count on $2 is $hget(count,$2) | msg $nick Last Walk on $2 is $hget(walk,$2) | msg $nick SLW: $+(,$calc($hget(count,$2) - ($hget(walk,$2)))))) }
}
any help would be great....i would read up and try to figure it out by myself, but there arnt enough hours in the day for me right now.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Explain what id dose a bit cos not all are experienced with mirc language. :o
Once the game is over, the king and the pawn go back in the same box.
M
Mark
Voice
Posts: 11
Joined: Fri Oct 08, 2004 9:47 am
Contact:

Post by Mark »

ok, when somebody does a -count 72 4587(for example), it adds the number 4587 to a database under the variable 72, then when someone does -walk 72 4587, it adds 4587 under, lets say walk72(for example). then when somebody does -event 72, it messages them whatever is stored under variable 72, walk72, and then 72-walk72. and also whenever someone does -count 72 4587, it checks it, and halts before it adds it if the 2nd number is below the current number in variable 72, or if it is higher then 20 numbers above the current number in variable 72.
Locked