this script i have been working on for about a week its sorta a giveaway script i ran it on my mirc and it worked so i thought i would post it see what you all thought could also be used as a santa's bag
on *:text:!Garbagebag:#:{
set %GB $rand(1,3)
if (%GB == 1) { describe # pulls a Small gift out of his Garbagebag and Tosses it at $nick }
if (%GB == 2) { describe # pulls a few packages out of his Garbagebag it hit's $nick in the chest }
if (%GB == 3) { describe # pulls out a huge Gift and tosses it to $nick }
unset %gb
}
Oh lol i didnt expect a reply, tisk tisk AJ.
[6:37:PM:Fri] * Nemesis changes topic to '[17:40] <@Jonesy44> suck my dick <-- fag'
Getting your lil wee wee touched by men seems to be a recurring theme recently with you AJ. I may have to roll over and wake up your mum and have a lil chat ^_^.
LOL nah its all in good fun boys, if you take any offense to what ''I'' say, you're slow, I just know most of you so I razz a bit. But yeah picken ''CODES'' apart when ppl are ''new'' to any coding language or putting them down Is a bit lame, unless your a fucckin prodigy and was born with the know;edge, the 99% of us have to LEARN what we are doing. So that's why instead of ripping newer coders a new one or say, ''you're doing it wrong'' is crap, you went through the same thing, so help these ppl out, It'll feel good to pass some knowledge on and know they don't have to go through the shiit you did, amirite?. So as Cheiron said, the good scriptors should be the only ones RESALLY listened to. lol there are exceptions of course, ppl like weasel for example;p. Im here for moral support, those who DO know who I'am know I'll help if need be, but most you got this under control. So im here for moral support.
As for the code:
i agree with ''mkbln7'' AND Napa about the .txt use, the simple $read at random from a file is better then making thes separate lines of code, add some flood protection (which you should do here as well) simple doesn't have to be to complicated
on *:TEXT:*!Trigger:#: {
if (%gvar) { halt }
set -u5 %gvar on
.msg $chan $read($shortfn($mircdir) $+ gb.txt)
}
)
or throw in Napa's flood pro:
if (!$($(%,bagflood,.,$nick),2) { set -u3 $+(%,bagflood,.,$nick) on
Up to you. Then you dont have to worry about fools spaming ya, after that if you feel froggy you can add text event triggers so the ppl in your channel can ADD more responses. Or just you or who you trust not to be a douche. Lots of things you can expand on here really. But some simple stuff.
P.s: ...I won't really wake her up AJ.
Really Kirbeh_fails?, you're gunna mock someone for having a life?, other then learning a useless coding language?, lol you have balls. Ima be lite today, so as for the rest of you that think this code sucks LOL guess what?!?!, this is where you ALL started (myself included;p), just cause you're no longer a ''noob'' doesn't mean you should think you're bad ass. Think of how much time you waste?, honestly grow up, it's supposed to be FUN, most of you take it too serious. >D.
@Weasel: ''it's knock knock time Rico!'', moron you can't even post snippets correctly you fú©k, go play and stop trolling and tryin to make friends on the internet.
For those that try to help, well done.
P.s: AJ stfu;p
no point in useing a txt file for 3 lines. just go with the tokens for this. unless you are going to add a ton more lines then yeah a txt would work better.
also add some flood pros to it maybe sothing like this as an example:
on $*:text:/^@bag$/iS:#:{
if (!$($+(%,bagflood,.,$nick),2)) {
set -u3 $+(%,bagflood,.,$nick) on
describe # pulls $gettok(a Small gift.a few packages.a huge Gift,$r(1,3),46) out of his Bag and Tosses it at $nick
}
}
i used an alias just for make the code more readable u can make the goto into the event
i used goto to get easer street without too much calculate conditions to find the true
but i also say the $read identifier is better for this case
To be honest, you would only use $read for reading typically larger amounts of information. Otherwise, I think tokens would be better than making a separate alias for it. It's just what I think.
Also, instead of $strip($1) that you used, you could just change the text event a bit:
on $*:text:/^[.!@]garbagebag/Si:#: {
All the characters [.!@] is unnecessary, but I put it there as an extra precaution; not everybody likes to use the same trigger.
Why would you make a separate alias just for that? Thus, it's using an unnecessary goto loop...
i used an alias just for make the code more readable u can make the goto into the event
i used goto to get easer street without too much calculate conditions to find the true
but i also say the $read identifier is better for this case