Mynick!

By DangerOfFate on Sep 02, 2008

First (actual) mirc script....alt+r

on *:load:{
 if (!%n) { set %n $$?="Nick"
 if (!%p) { set %p $$?*="Password"
    }
  }
}
on *:connect:{
 if ($nick == %n) {
 .timer 1 2 msg nickserv identify %p
  }
}
on *:nick:{
 if (guest isin $1-) && ($newnick == $me) {
 .timer 1 3 msg nickserv sidentify %n %p
  }
}

Comments

Sign in to comment.
EL   -  Oct 01, 2008

Ok i forgot my comment ....then again i mostly don't remember many of my comments;p.Well knowing C++ before mirc will do that i think the more you code mirc you will find it easyer then C++ .Imo anyways.`-.-´

 Respond  
DangerOfFate   -  Oct 01, 2008

o.0 I said I was going to use C++ to make a compiler that understands another language of my creation..

Still working on it. And yes EL, I understand C++ and not mIRC because I find it easier o.0

 Respond  
Zmodem   -  Sep 06, 2008

LoL, no, he said he was going to create a C++ compiler, which is outstanding considering the fact that you can learn so much about a language by doing just that. More power to ya', DangerOfFate!

 Respond  
EL   -  Sep 05, 2008

you can code in C++ but not in mirc?

 Respond  
DangerOfFate   -  Sep 04, 2008

Yea, when I script I just think of random or simple ideas for a script/snippet and create it, even if mIRC or other programs can perform the action easier. Right now I am trying to learn how to create a compiler in C++ to understand a different coding language. Thanks all, for the help though.

 Respond  
Zmodem   -  Sep 04, 2008

LoL and for the record, I would just like to point out that I agree with napa on the perform function in mIRC. But, still, it's fun to see people do stuff, script-wise, as long as they are learning ;-)

 Respond  
DangerOfFate   -  Sep 03, 2008

First (actual) mirc script FFS

zmodem, I'm sure I understand raw events, I know performs can do this.

/me makes a.....I dunno

Off to study the Algebra 1 I started yesterday.

 Respond  
EL   -  Sep 03, 2008

Rofl dragonflare your example has mismatched and excess brackets like Steve pointed out please try to TEST you codes before you offer them.`-.-´

 Respond  
napa182   -  Sep 03, 2008

like i said in my first comment just use Perform for the connect ffs thats what it's there for..

 Respond  
DragonFlare   -  Sep 03, 2008

on and you could do this

 (Guest* Isin $1-) && (%n == $me) { 

instead of

 if (Guest* Isin $1-) && ($newnick == $me) { 
 Respond  
DragonFlare   -  Sep 03, 2008

<.<

.>
/me goes to test it brb

 Respond  
napa182   -  Sep 03, 2008

DragonFlare ffs dont offer help if you dont know if it works

 Respond  
DragonFlare   -  Sep 03, 2008

Hmm Zmodem Had alot to throw out but i aggree with him
/me doesnt know what his rating is yet
Zmodem pm me that link that you said my charectar looked like
would ya
Thanks

Anyways.....
First off you wouldnt need

 on *:nick:{

Because if you connected your nick would be the same as before and ill the script would have to do is Identify you

So This Would Work

on *:load:{
 if (!%p) { set %p $$?*="Password"
    }
  }
}
on *:connect:{
 if ($nick == %n) {
 .timer 1 2 msg nickserv identify %p
  }
if (Guest* isin $1-) && ($newnick == $me) {
.timer 1 3 ns sidentify %p
}

Correct Zmodem

 Respond  
Zmodem   -  Sep 03, 2008

First, let me tell you that this is a mess of a code structure, with numerous bracket errors that destroy the code from executing right from the start. You've also used $nick in the ON CONNECT event in order to figure out if your own nickname is %n. The correct identifier, and the most proper, is $me; however, since the connect event triggers the $nick identifier, for one reason or another, to default to $me in this case, I will overlook that small logic-error.

Second, this timer, for the ON CONNECT event, is hardly necessary. For one, if a user doesn't have the IdentD either port-forwarded or enabled, it will take more than some 2 seconds to rectify a connection establishment. Your best bet, in this case, would be to get rid of the ON CONNECT event altogether and go with a less reprehensible event, such as the RAW numeric pertaining to the MOTD. It is more reliable than a timer, but bear in mind, also, that not all servers have the MOTD, either. In any case, you can replace your ON CONNECT event with this:

raw 322:*:if ($nick == %n) { msg nickserv identify %p }

Voila, you are done! By the way, the raw numeric 322 pertains to the end of the /MOTD display, usually sent by most servers once a full connection has been established. This will allow you to forgo your timer.

Next up, I've no idea what to say about your ON LOAD event, nor your ON NICK event. Both are a bit sloppy and both have serious issues. Let's address all of this by cleaning up the code:

ON *:LOAD:{
  if (!%n) { set %n $$?="Nick" }
  if (!%p) { set %p $$?*="Password" }
}
raw 322:*:if ($nick == %n) { msg nickserv identify %p }
on *:nick:if (($newnick == $me) && ($me == %n)) { msg nickserv identify %n p }

Later on, you might consider adding the ON LOAD event as an alias, so the user can change the auto-id on the fly when they want. For instance, here is another variant of code:

ON *:LOAD:if (!%n) { new.autoid }
alias new.autoid {
  set %n $$?="Nick"
  set %p $$?*="Password"
}
raw 322:*:if ($nick == %n) { msg nickserv identify %p }
on *:nick:if (($newnick == $me) && ($me == %n)) { msg nickserv identify %n p }

You wouldn't need to check the (!%p) event, because if there is no %n then %p is useless. On top of all of this, there are more suggestions:

  1. Try asking if a user is sure they want to overwrite their old user/pass entries.

  2. Check and make sure valid data is entered when the new.autoid command is done.

  3. Let people know that they can use /new.autoid whenever they want, to establish a new auto-id user/pass.

Well, sorry to go ballistic on it all, but I hope this helps point you in a better direction. Good luck!

 Respond  
napalm`   -  Sep 03, 2008

Leet mIRC GUI hacking:

Tools > Options > Connect > Options > Perform
 Respond  
napa182   -  Sep 02, 2008

well not all text events are lame ;x
one thing on ur on nick event you have

.timer 1 3 msg nickserv sidentify %n %p

it should be

.timer 1 3 msg nickserv identify %n %p

and if the server you are on supports short cuts you can do

.timer 1 3 ns identify %n %p
 Respond  
DangerOfFate   -  Sep 02, 2008

Yeh...I needed basic though, and no lame on *:text:text:#:{ msg # text

...

 Respond  
napa182   -  Sep 02, 2008

it's an ok basic lil snippet,
but you can also use mIRC's built in options for this in perform

 Respond  
DangerOfFate   -  Sep 02, 2008

Umm...Comments/Rating?

 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.