Welcome to Pure Warfare - The #1 Community for Pures
- Start new topics and reply to others
- Subscribe to topics and forums to get email updates
- Get your own profile page and make new friends
- Send personal messages to other members.
-
Posts
1749 -
Joined
-
Last visited
Posts posted by Jay
-
-
Enjoy your two day suspension, I hope your attempts to exploit the bot were worth it.
-
For the most part, if you can't find a script you're looking for one our forums, try checking SwiftIRC's mSL section.
http://forum.swiftirc.net/search.php?keywo...p;submit=Search
http://forum.swiftirc.net/search.php?keywo...p;submit=Search
-
Try not to triple post:)
On topic, Taylor Swift is very attractive.
Also, who pinned this?
-
Jay, you should read all of the posts on a topic before you reply. I already fixed most of the scripts for him ._.
I did. I figured he'd prefer an detailed explanation of the changes made rather then just throwing a script at him.
-
I can help with signatures?
If you wish to make a Pure Warfare signature, feel free, post them in our Graphic Showcase sub-forum.
-
I had them as one script and it was messing up to where it would send it to the person twice so i just made it seperate and it stopped lol
Try using what I posted, does it work?
-
on $*:TEXT:/^[!.]count?$/Si:#: { $iif($left($1,1) == @,notice $nick) $nick There are currently $nick($chan,0) in $chan || Ops: $nick($chan,0,o) || HalfOps: $nick($chan,0,h) || Voiced: $nick($chan,0,v) || Regular: $nick($chan,0,r) }on $*:TEXT:/^[@]count?$/Si:#: { $iif($left($1,1) == @,msg $chan) $nick There are currently $nick($chan,0) in $chan || Ops: $nick($chan,0,o) || HalfOps: $nick($chan,0,h) || Voiced: $nick($chan,0,v) || Regular: $nick($chan,0,r) }
I'm a little confused by this... they should really be put as one script, ON $*:TEXT:/^[!@.]count$/Si:#: {
Not sure why you have ? in your trigger ([!@.]count?$), I doubt anyone's going to do !coun
The reason your [!.] glitches is because you have $iif($left($1,1) == @,notice $nick). Your trigger only activates on [!.], so $left($1,1) will never be @. Therefor the $iif won't evaluate and you will perform "$nick <info>", which creates your glitch.
To combine them:
on $*:TEXT:/^[@!.]count$/Si:#: { $iif($left($1,1) == @,msg #,notice $nick) There are currently $nick($chan,0) in $chan || Ops: $nick($chan,0,o) || HalfOps: $nick($chan,0,h) || Voiced: $nick($chan,0,v) || Regular: $nick($chan,0,r)}
Also, one last think. Do /help $nick. You'll see that there's another parameter you can use in $nick. For example, if I'm an op in a channel, and I also have +h set on me, I will be counted in $nick(#,0,o) and $nick(#,0,h), making your numbers inaccurate. To fix this, use $nick(#,0,h,o) and $nick(#,0,v,oh) for halfops and voices, respectively.
I hope I explained everything clearly and you actually get what I'm saying (not saying you're not smart, I'm saying I'm not very good at explaining myself). Hope it helped.
- Jay
-
Reminds me of Vividvv, when he risked white phat, while using AGS, etc.
I miss him:(
Nice risk though.
-
We're alright. Just released our Ladder system, take a peak. (It's the button up top, says "Ladder").
-
Ass a content developer i must ergue more people to start writing guides and Help PW to get there database up and running come on guys :D
When did we start giving people Content Developer :huh:
-
Sorry I couldn't make it, had a family reunion!
Seems like you guys did well enough without me:)
-
wat, zell
-
Voted for Robert, I really like the effects. I also liked Coz's and Phillip's.
-
I knew the day would come where people would tell us how to form opinions.
-
Was that a hint a future senior member rank??
Take a look at http://www.pure-warfare.com/index.php?act=Members, open the drop box titled "All Members", that's a list of ranks. Senior Member exists, but nobody has it:)
-
Good contribution, pinned.
-
Delete a total of five posts which were spam, or contained inappropriate content.
Sorry Sirswat, though we're all fans of Taylor Swift, a secret forum in dedication to her isn't what we need.
Maybe you should go to our entertainment forum and make a topic in her honor?
-
Your First Script
This tutorial is to help users who are brand new to mSL learn the basic process of writing a script. I will be assuming that you have already ready my An Introduction to mSL guide. A popular script amongst new coders is a "Perform" script. This is where the owner of the bot is able to make their bot perform commands remotely, such as ".do msg #PureWarfare Hey!" or ".do join #PureWarfare", etc. I will be walking you through the steps of how to make one of these scripts.Step One - The trigger.
All remote scripts require a trigger to activate them. For this particular one, we will be using a TEXT trigger. A text trigger looks like this:on <level>:TEXT:<matchtext>:<*><?><#[,#]>:<commands>
When we add in our parameters, ours will be:ON *:TEXT:.do*:#: {}
This means that the script will trigger when any users says a line that begins with ".do" in any channel. Don't worry, we'll add security later!
Notice how I added an opening and closing bracket. These brackets will contain the entire script - all of your work for this script should go inside of these brackets.Step Two - Just Checking
Now, because our trigger is ".do*" (note the wildcard), it will trigger on any line which begins with ".do". This means it will trigger on: ".do", ".do-hicky", ".dododododod", ".doyouunderstand?", etc. For this reason, we're just going to add an "if" statement to remember that the script and the user are on the same page.if ($1 == .do) {
By using this statement, we make sure that the trigger the user is using is ".do", and nothing else. Now let's add it to our script. Don't forget to close that bracket!ON *:TEXT:.do*:#: { if ($1 == .do) { }}
Now if we put our script within the brackets of that "if" statement, we'll be fine.Step Three - Who goes there?
We don't want just anybody controlling your bot. For this script, we'll make it usable for you only. As it is not safe to do a check for a nickname (anybody could switch to your nickname and control your bot), we'll compare the address of the bot to the address to the nick. If they're the same (meaning on the same computer), then we'll continue.if ($address($nick,2) == $address($me,2)) {
Now let's add that in, and once again don't forget to close that bracket!ON *:TEXT:.do*:#: { if ($1 == .do) { if ($address($nick,2) == $address($me,2)) { } }}
Now we've made sure only you can use this script. But just for giggles, let's let users know when they've been thwarted by adding an "else" line after that "if" line. That means if the user is NOT you, it will perform the "ELSE" action, in this case, informing them that you won't be abused that easily!else {
Let's add it in there after your if statement, with a little message within the brackets.ON *:TEXT:.do*:#: { if ($1 == .do) { if ($address($nick,2) == $address($me,2)) { } else { notice $nick Access denied! } }}
Step Four - Get to work!
Now that we've made sure your thoughts and the bot's are on the same page, and that the person using this is actually you, let's make the bot do what we tell it to.$($2-,2)
$() is an evaluation identifier. We will use this so that you can use things such as "#" (to return the channel name), $nick, and variables within the command, and the bot will evaluate them.ON *:TEXT:.do*:#: { if ($1 == .do) { if ($address($nick,2) == $address($me,2)) { $($2-,2) } else { notice $nick Access denied! } }}
Step Five - Enjoy.
That's it! You're all done! Now you can remotely control your bot, and feel safe doing it. Go ahead, give it a shot, ".do msg # Hey there!". You're the boss now!
Congratulations, you've made your first script.
- Jay -
Could you please explain the use of $<text> to me? Out of everything there, it would really be the thing I understand least.
I can understand $nick being a users nick and $me being 'my' nick but I don't have any idea where $1, $1 and $+ come from.
At first I thought they would be the values assigned to variables (after realising %Var is the variable itself) but that really just confuses me as I would presume the value is %var itself.
On another note, what about scripts for setting modes etc. I know that forward slash (/) is rarely needed in them for /mode. Why is this?
Edit: a friend tried to explain it to me, all they did was manage to confused me. "tokenized identifier" :P
I've added a section called "Tokens", I hope that helps you. If you still don't understand, tell me what's confusing you and I'll go more in-depth.
-
-
An Introduction to mSL.
Index
• Introduction
• Bracketing
• Tokens
• If-Then-Else
• Variables
• Remotes
• Aliases
• ConclusionIntroduction
mSL (mIRC Scripting Language) is definded as "a powerful scripting language that can be used both to automate mIRC and to create applications that perform a wide range of functions from network communications to playing games."Bracketing
The mSL, like other languages, uses brackets to organize scripts. An opening bracket is "{" and a closing bracket is "}". The key to the bracket system is that your brackets must balance. If you open a bracket, you must close it by the end of the script. The best way to think about bracketing is as a roadway. Take a look at the script below:alias checkme { if ($me == Jay) { echo I am Jay! } elseif ($me == Karl) { echo I am Karl:( } else { echo Who am I?! }}
The first bracket is opened on the first line, "alias checkme {". This bracket opens the entire script, all components of the script must fit inside of this bracket and the final bracket, which will be at the very end.
Next is another bracket opened on the "if ($me == Jay) {" line. If the condition in this "if" statement is true, all commands within this opening bracket and the next closing bracket which will close the statement are executed. If not, the script will skip ahead to the beyond the closing bracket which would have closed this opening bracket. So if $me does equal "Jay", all commands until the closing bracket which will end this statement are executed, which would be "echo I am Jay!". If $me does not equal "Jay", it will skip to the closing bracket which ends the statement, which would be the "elseif" line.
Below is a script which does not have balanced brackets. I've colored the opening and closing brackets of the same statement so you can see how they match up.
alias example {
if ($1 == 1) {
echo It's one.
}
else {
echo It's not one.
}
As you can see, the original opening bracket (the red one) is never closed, which will cause problems with this script as well as any scripts after it in the file.Tokens
Tokens are what mSL uses to identify certain text within a line.You can use the $1 $2 ... $N identifiers to refer to individual parameters in a line. You can also use $N- to refer to parameters N and onwards, and $N-M to refer to parameters $N through to $M. So to refer to a whole line, you would use $1-.
Here are some examples to help you understand how tokens work.
"Hello there my name is Jay!"- $1 equals Hello
- $4 equals name
- $1-2 equals Hello there
- $3- equals my name is Jay
- $0 equals 6 (the number of tokens in the line)
- $1- equals the entire line, Hello there my name is Jay!
Let's apply this to a simple script.ON *:TEXT:!calc*:#: { notice $nick $2- equals $calc($2-)}
The above script would trigger when a user enters a line which begins with "!calc". That would mean $1 is always !calc, or anything that begins with calc. Therefor $2 is where the calculation to be performed begins. In order to get the entire calculation, we use $2-.If-Then-Else
All scripting is based on an "If-Then-Else" format. The principal idea of this is if a condition is true, then an action is carried out, else it is not. It looks like this:if { then}else { then}
Using this format, you can create a script to perform a certain action if a condition is true, and do something else if it is not. For example:if (1) { then}else { then}
Notice that there is only a condition for the "if" statement. This is because the "if" statement is used to execute a command if a certain condition is true, and carry on if not. If you would like to check for multiple conditions, you would use elseif.if (1) { then}elseif (2) { then}else { then}
An "elseif" statement can only be used after an "if" statement, and will only be checked if the "if" statement before it is false. Here, let's try putting it to use.alias checkme { if ($me == Jay) { echo I am Jay! } elseif ($me == Karl) { echo I am Karl:( } else { echo Who am I?! }}
Above is an alias called "checkme". When you enter "/checkme", your script will first check if "$me" (an identifier which returns the nickname on which the script was activated) is equal to "Jay". If so, it will echo "I am Jay!". If not, it will go to the next "elseif" statement, and check if "$me" is equal to "Karl." If so, it will echo "I am Karl:(", if not it will carry on to the next "else" statement, which will then echo "Who am I?!".Variables
Variables are temporary storage areas to which you can assign values which you can use later in your scripts.
There are two types of variables: global(dynamic) and local. The difference between them is that a global variable is saved until it is unset, and a local variable is only saved for the duration of the script.
To set a global variable:/set %var value
To set a local variable:/var %var value
Once you save a value to a variable, you can call back that variable by using the %var name you assigned to it.alias myage { set %age $1}alias sayage { echo I am %age years old!}
You can also use evaluation brackets ([ ]) when setting a variable. This can be used to assign static variables. For example:ON *:TEXT:!setage*:#: { set %age. [ $+ [ $nick ] ] $2}ON *:TEXT:!myage:#: { msg $nick You are %age. [ $+ [ $nick ] ] years old.}
For more help with variables, type "/help variables" in mIRC.Remotes
A remote is something that is triggered by an action in IRC. Some examples are "ON TEXT", "ON NICK", and "ON INVITE", all of which I will be showing examples of in this section.
The format for an ON TEXT remote is as follows.ON <level>:TEXT:<matchtext>:<*><?><#[,#]>:<commands>- ON - Signals to mIRC that this line is a trigger. Tip: If you would like to disable a trigger, an easy way to do so is by changing this to "OFF".
- <level> - This refers to the userlevel (/help /auser) of the person triggering the script. 99% of the time this will be a wildcard, *, indicating any user level.
- :TEXT: - This tells mIRC what type of trigger it is.
- <matchtext> - This is where you put the actual trigger of the script (such as !stats* or !commands). A wildcard may be used here. Wildcards (*) can be used to match any amount of characters.
- :<*><?><#>: - This is where you indicate the location of the trigger. ? refers to in a private message, # means in a channel (you can specify with #Channel, or #Chan1,#Chan2 etc), and * means either.
- <commands> - this is where you use an opening bracket and then continue on with your script.
An example trigger, which will will trigger on the text "!help" only, and only in a channel.ON *:TEXT:!help:#: {
Another example, which will trigger on any text which begins with "!stats", and is said in #PureWarfare.ON *:TEXT:!stats*:#PureWarfare: {
The format for an ON NICK trigger is as follows.on <level>:NICK:<commands>
Nothing new is introduced with this trigger, though you should notice there is no location (#?*) parameter, and there is no <textmatch> parameter. This is because a nickname change does not occur in any one specific location, and because there is no text to match.
A typical ON NICK trigger looks like this:ON *:NICK: {
The format for an ON INVITE trigger looks like this:on <level>:INVITE:<#[,#]>:<commands>
Notice that this trigger also does not have a textmatch parameter, though it does have a channel paramater. For all channels, use "#", for a specific channel use "#Chan", and for multiple channels use "#Chan1,#Chan2,etc".
An ON INVITE script may look like this:ON *:INVITE:#PureWarfare: { join $chan }
Aliases
mIRC allows you to create aliases and scripts to speed up your IRC session or to perform repetitive functions more easily. Aliases can be called from the command line, from other aliases, and from popup and remote scripts. An alias cannot call itself recursively mainly because this seems to cause more problems for users than it solves.
There are two types of aliases - identifiers and commands. You can determine how the alias is being used with the identifier "$isid", which will return $true if the alias is being used as an identifier, and false if it is being used as a command.Identifiers
Identifiers, for the most part, are used to evaluate information and return it. Aliases used as an identifier look like: $alias
An example of an identifier looks like:alias whatsmyname { return $me }
Note that "return" is used to return the value of your $alias. Once "return" is used, the alias stops. The above alias could be used in a way such as, "msg $chan Hello my name is $whatsmyname $+ !"Commands
A command alias is simply used to perform multiple commands at ease with a simple /command.
An exampe of a command alias looks like:alias whatismyname {echo $me}
The above alias could be used as "/whatismyname".
You could combine both of those like this:alias whatsmyname { if ($isid) { return $me } else { echo I am $me $+ . }}
Note how the $isid identifier is used to determine the output, and how the brackets are balanced.Conclusion
I hope everything you have read in this guide has helped you understand the basics of beginning to use the mSL language. Please be aware that this guide covers only a few topics, and vaguely. If you have any questions, post them here and they will be answered. You can use the /help command in mIRC to view the mIRC Help files. Please take a look at my other tutorials for more advanced scripting help!
-Jay -
Due to the fact that a big part of Pure Warfare's community is set on IRC, I believe that a forum dedicated to mSL would be a good addition to our forum. Below you will find some rules and guidelines concerning the mSL Forum. Be sure to read this entire topic before posting.
Posting Topics
As I do not expect too much activity dedicated to mSL in our forums, I see no need to make multiple sub-forums within this one, such as Script Requests, Script Showcase, Script Help, etc. For that reason, I would like all users to use the following suffixes to their titles when posting new topics.
- [script] - When posting a script you've written.
- [Help] - When you are requesting help on a script or with a certain topic.
- [Request] - When you are requesting a script.
- [Tutorial] - When posting a guide to a certain subject.
Rules
- No Spamming - Do not post on a script unless you have an intelligent comment/suggestion/question/etc. Useless posts will be deleted.
- No Flaming - The idea of this sub-forum is for our users to learn. For that reason, do not mock a user for asking a question, making mistakes, or posting scripts you don't like.
- No Plagiarism - If you're going to post a script which you did not write, give credit to the person who did write it. If you received help or used snippets from another script, give credit.
- [script] - When posting a script you've written.
-
I like this idea, I'll personally work on adding the sub-forum(s) and possibly appointing a mod or two to be assigned to the mSL subforum.
Thank you for your suggestion!
-
Since Pure Warfare's release not too long ago, there has been a lot of discussion about Pure Warfare's slogan (more specifically, the lack of one.) The staff have put a lot of thought into it - we've all read over the suggestions topic numerous times, and made suggestions of our own, to see what the users would think.
Ultimately, we have decided that the best way to determine the favorite slogan would be to post a poll, which would include all of the suggested slogans which the staff has deemed appropriate.
The poll will be open until Saturday, at which time the staff will look over the top choices, and continue on from there.
Note: "Venimus, Vidimus, Vicimus." means "We came, We saw, We conquered".
Funny IRC Quotes
in Music, Movies and TV
Posted
(09:52:55 PM) (@[Foe]Sick) ******* ****
(09:53:00 PM) (@[Foe]Sick) im eating and this movie is scary
(09:53:02 PM) (@[Foe]Sick) with jessica albfa
(09:53:04 PM) (@[Foe]Sick) ****
(09:53:10 PM) (@[Foe]Sick) l0L I JUST bounched off my chair
(09:53:12 PM) (@[Foe]Sick) L0L