gift command

Platform:  mIRC
Published  Dec 01, 2010
Updated  Dec 01, 2010
<macs> !gift DG
<christmas|bot> DG heres a gift from macs , Enjoy :)
on 1:TEXT:*!gift*:#:{
msg $chan $2 heres a gift from $nick $+ , Enjoy :)
}

also for a control channel

on 1:TEXT:*!gift*:#:{
msg $chan $2 heres a gift from $nick $+ , Enjoy :)
msg #your-control-channel-name !gift command used by $nick on $chan gift was to $2
}

Comments

Sign in to comment.
macs-rock   -  Dec 28, 2010
apple person you ok?
 Respond  
ZirixZero   -  Dec 20, 2010
:(
 Respond  
Jethro   -  Dec 19, 2010
ZirixZero, you code has a few things to be aware of:

1. Your !gift trigger will process if no $2 is specified as to whom the sender is.

2. The command /say cannnot be used in an event remotely. Use /msg $chan instead, or else you'll get an error saying "you're not on a channel."

3. You didn't use $+ . to separate $nick and the period. You'll get an error saying there is no such "$nick." identifier.

Finally, this will make the best of your example:

Code

 


Though a trigger protection is also suggested so you can be best protected if one attempts to flood you.

When you offer a suggestion, make sure it's well thought out before submitting it.
 Respond  
ZirixZero   -  Dec 19, 2010
For a simpler script,

Code

 
 Respond  
macs-rock   -  Dec 11, 2010
yeh darkgamer it was you =D
 Respond  
macs-rock   -  Dec 11, 2010
ty guys
 Respond  
Jethro   -  Dec 09, 2010

Code

 
it's even smaller than having the if checks.
 Respond  
GuitarMasterx7   -  Dec 09, 2010
oh yea ur right =[ lolz
 Respond  
Jethro   -  Dec 09, 2010
Alias is good, but your example didn't require one...:P In fact, having an alias like that is as going the extra mile for nothing. In addition, the halt in each if condition was not necessary, unless you used the goto command.
 Respond  
GuitarMasterx7   -  Dec 09, 2010
i like my alias D:!
 Respond  
Jethro   -  Dec 09, 2010
You might want to exclude the client that runs the code from being randomized:

Code

 
 Respond  
SunnyD   -  Dec 08, 2010

Quote

ppl really think this is jus a pastebin >_>


Just because it's not the code we're used to, and/or expect from users doesn't mean they're using it as a pastebin. It's also rather bugging to see people use aliases for code that is better off with the main event but decide to complicate it by adding aliases.

Code

 

Perfectly acceptable alternative to a 7 line alias.
 Respond  
DarkGamer120   -  Dec 04, 2010
:P its me that he give me the gift, i am DG :P
 Respond  
Jethro   -  Dec 03, 2010
Bielie, looks like your have been font of using regex quit a bit as a mass production, so to speak. You should perhaps add a \b after the word gift. Your $2- willl not have control codes stripped. So if someone uses control codes in $2-, and your mirc does not have incoming message stripped, your example will have the control code shown in $2-. And that will look rather odd. :P
 Respond  
GuitarMasterx7   -  Dec 03, 2010
lolz whoops D:
i have two comp classes
Digital Design, and Web Design
they get kinda boring after you finish your work so i jus check Hawkee forums lolz
 Respond  
Bielie   -  Dec 03, 2010

Code

 


This is my shorter version of this script.
Type:

/write gifts.txt Balloon

or anything else to add things to santa's gift list. Add atleast one though.
 Respond  
Bielie   -  Dec 03, 2010
unset the var aswell o_O
 Respond  
Jethro   -  Dec 02, 2010
Guitar, I think you should concentrate on your schoolwork...:P You were being absentminded. You have two regexes, in case you didn't notice. This is my take on your example:

Code

 
 Respond  
GuitarMasterx7   -  Dec 02, 2010

Quote

what is the point of this anyways?


ppl really think this is jus a pastebin >_>


lets try out my failed attempt
at making this any less lammme...
[cant test it im in school =[ ]

Code

 
 Respond  
SkIdDy_KiLlEr   -  Dec 01, 2010
what is the point of this anyways?
 Respond  
Dark|   -  Dec 01, 2010
You could make this isnt a real gift. snippet
like have gift.txt and they can put stuff in the file and itll pick a random one
 Respond  
napa182   -  Dec 01, 2010
well the crappy thing about wildcard is it can trigger in mid sentence ie: hey the trigger is !gift name here ok
also it would be a good thing to check if $2 is said and if $2 is a nick in the channel.
 Respond  
blackvenomm666   -  Dec 01, 2010
he's using the wildcard to strip it which he shouldnt
 Respond  
napa182   -  Dec 01, 2010
o.0 lolwut

maybe add color striping an flood protections to it
 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.