The scripts section is used for those script that require many files, such as Dani_l11's chess. It needs images. Or one like mine, which includes a readme and a logo file. This is a single file that serves a simple purpose and it should be, by hawkee standards, in the snippet section.
This would be a great place to explore the wonders of token identifiers. Use of $addtok, $remtok, and $istok would allow for multiple nicks to be monitored at the same time. Also, and this is just an anal thing for me, don't put your first if statement in the same line as an event. Space it out. space is your friend.
I have two questions, and one goes off _Dean_'s comment. First, why are you setting %help.network to $network and then checking if they are the same within the same scope? It's redundant and just makes another global variable.
also, why would you only do the -g2 if the person was an op? Doesn't that defeat the purpose? If someone is op'd in help, it's likely they don't need help, but rather give it.
This would be better done, in my opinion, but changing it to !isop and calling it with .timer 1 1 checkhelpnick $nick
then using $1 to reference the nick in the alias, as _Dean_ said.
Happy scripting :)
-Savage_CL
Savage_CLcommented on mIRC Snippet: Info
-
Oct 03, 2011
I would expand on this a bit...
Code
This way if you click on any of them, it adds it to your editbox for you.
the difference between if and elseif is simple.
elseif only checks if the last check was false.
this means that when the first (else)if statement rings true
the rest won't, until it hits an if again.
Also note that mSL is not a programming language, but a scripting language. The more events you put in a script, the more mIRC looks for with each line in each channel on each network you are connected to. This can, when you load it up too much, cause some problems with mIRC stalling or even crashing. Using one event would likely be the better option not just in terms of cleanliness but performance. Every little bit counts when you are working with a language so "slow"!
no need to be hostile. I learned the same lesson with the last snippet I posted. This is a community of scripters that help eachother and learn from eachother. We are simply giving other (some may say better) ways to do it. There are downfalls to each of them. Jethro_'s being that it requires an external file and mine being.... well I don't really know to be honest. Yours would be that it puts more stress on mIRC and it's extremely redundant. I'm not saying it's wrong, and I'm not saying I wouldn't have done the same thing in the past, but I've learned from my past code through this community and several irc channels and now I know easier/better ways to do things. I attempted to show you one of those. If you don't want feedback, don't post your code on Hawkee, because that's what this site is for.
Also, the best way in my opinion to do this would be if statements... like this:
Code
I'm not typing the whole thing out. you get my point. This allows you to more easily change the channel and reduces the load on mIRC.
Finally, with nickserv etc, you can use "/msg nickserv update" to update your modes. (even though you don't need to because channels can't turn off "automode" unless they just give you access lower than that level."
Unless you have mIRC specifically set up to ignore initializaiton events, it WILL initiate a dialog that asks if you wish to perform them without loading them. I appologise for my outburst, anyway, I was not a happy person because of real life circumstances.
Aha2y, most people that know how to do that have mIRC and they can just decode it on their end. Unless you do an array of encodings, and even then the only protection is people not knowing the array, it makes no difference. if you do want to go that route, I've got a couple ideas. Talk to me in #savage_CL.
Just letting you know that I was, in fact, right. With echo, the color comes before the switches.