RubixCube commented on a Page, Chocolate Pie's mIRC Cafe Snippet!  -  Sep 29, 2007

I have no idea what you are trying to accomplish in the !trix part of the snippet. If you are trying to kick the user, remove the msg command. If you are trying to msg the user remove the .kick command and parameters.

I give you credit for this being your first script, but I have to be the critic that I am when saying this: the script is not that efficient. I wouldn\'t take that a bad way, just a way to improve the snippet and your future scripts. Here are my suggestions:

  • As a simple coding tip, if you have an if event w/ one line, remove the brackets.
  • Perhaps make this an ini/txt file and have the ability to add or remove menu items. Here is a sample of what I am talking about if you are a bit misunderstood:

on :TEXT:!serve:#:{
if ($1) {
; checks if the item is specified
if ($2) {
; checks if the recipient is specified
if ($read(menu.txt,$v1)) msg $chan $nick serves $2 $v1
; reads the text file for the item
}
}
}

on :TEXT:!additem:#:{
if ($1) {
; checks if the item is specified
if (!$read(menu.txt,$v1)) {
; checks if the item isn\'t in the menu already
if ($2) {
; checks if the price is specified
write menu.txt $1 $2
; writes the item and price into the text file
}
}
}
}

( the same applies for the !delitem event if included )

  • Add accounts while we are on the topic of prices. This can be stored in an ini file. /help /writeini and $readini.

I hope my mini-tutorial has helped. And if anyone can tell me a command that doesn\'t ruin the format of the events, that would really be great.

 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.