Scripting

Need help with something? Anything? Post here.

Moderators: Tier 3 Mods, Tier 1 Mods, Tier 2 Mods

Forum rules
Need help with something? Anything? Post here.
User avatar
{Andrew}
New User
New User
Posts: 24
Joined: March 25th, 2008, 3:57 pm
Location: Michigan

Scripting

Post by {Andrew} »

Hey,

I would like to starting learning more on how to script and how to like secure my scripts and make it so people can not have any way to abuse them, like flooding them etc... If there is someone with some time on there hands that would be willing to teach me somethings about scripting c++ that would be awesome!! thanks

~Andrew~
ImageImageImageImageImageImage
User avatar
Drkpwn3r
Member
Member
Posts: 343
Joined: January 28th, 2004, 3:06 pm
Location: Cincinnati, OH

Re: Scripting

Post by Drkpwn3r »

2 things before you can get a good response:
1: C++ isn't scripting, it's programming (difference is readable source code vs obfuscated/packed source code).
2: Which kind of scripting are we speaking of, if at all? (I'm assuming IRC based on your post) :?
cnb6
Casual User
Casual User
Posts: 69
Joined: March 22nd, 2008, 1:03 pm

Re: Scripting

Post by cnb6 »

if its about mIRC scripting, I could teach you some ;)
just join the IRC server (IRC.tsugaming.com) and talk to me in #hangout

Cya,
Thomas
Join #DM Too play the best DM ever made!
Add me on msn: Thomasprikkel@hotmail.com and Xfire: cnb6
Image
User avatar
{Andrew}
New User
New User
Posts: 24
Joined: March 25th, 2008, 3:57 pm
Location: Michigan

Re: Scripting

Post by {Andrew} »

Yea Mirc scripting, and cnb im banned remember so I really can't.
ImageImageImageImageImageImage
mmmcrak
Active Member
Active Member
Posts: 553
Joined: April 4th, 2007, 4:56 pm

Re: Scripting

Post by mmmcrak »

cool i didnt no that u are from MI go wolverines UM all the way (football that is)
cnb6
Casual User
Casual User
Posts: 69
Joined: March 22nd, 2008, 1:03 pm

Re: Scripting

Post by cnb6 »

Well, then we should have contact by another IRC server, Your suggest one?
Or Ill need to make a tutorial here.. but that takes alot of time :P
well Cya,
Thomas
Join #DM Too play the best DM ever made!
Add me on msn: Thomasprikkel@hotmail.com and Xfire: cnb6
Image
User avatar
{Andrew}
New User
New User
Posts: 24
Joined: March 25th, 2008, 3:57 pm
Location: Michigan

Re: Scripting

Post by {Andrew} »

Yea Michigan Woo hooooooo lol, Well cnb im on swiftirc all the time too. =)
ImageImageImageImageImageImage
cnb6
Casual User
Casual User
Posts: 69
Joined: March 22nd, 2008, 1:03 pm

Re: Scripting

Post by cnb6 »

oke, pm me a channel where you are ;)
Join #DM Too play the best DM ever made!
Add me on msn: Thomasprikkel@hotmail.com and Xfire: cnb6
Image
User avatar
Drkpanoz
Member
Member
Posts: 250
Joined: December 6th, 2005, 8:34 pm
Location: Massachusetts, USA

Re: Scripting

Post by Drkpanoz »

Ok, here goes.

Say your script is:

Code: Select all

on *:TEXT:*:#: {
  if ($chan == #mychan) {
    tokenize $strip($1-) 32
    var %cmdchar = $left($1,1)
    if (%cmdchar == $chr(33)) {
      var %cmd = $right($1,-1)
      if (%cmd == floodme) {
        msg $chan Someone triggered my message!
      }
    }
  }
}
And you want to protect it, so add a temp var to the floodme command. Like so:

Code: Select all

on *:TEXT:*:#: {
  if ($chan == #mychan) {
    tokenize $strip($1-) 32
    var %cmdchar = $left($1,1)
    if (%cmdchar == $chr(33)) {
      var %cmd = $right($1,-1)
      if (%cmd == floodme) {
        if (!%tmp) {
          .set -u10 %tmp 1
          msg $chan Someone triggered my message!
        }
        else { msg $chan Can't trigger it yet! }
      }
    }
  }
}
Image

Image
User avatar
{Andrew}
New User
New User
Posts: 24
Joined: March 25th, 2008, 3:57 pm
Location: Michigan

Re: Scripting

Post by {Andrew} »

I don't even understand what that does, I'm not that advanced even though im sure that is pretty easy stuff. Cnb6 I sent you memo on Swiftirc. Thanks btw Drkpanoz
ImageImageImageImageImageImage
Post Reply

Return to “TGN Help Desk”