Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


mIRC script help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
xV
I post too much
Reputation: 1

Joined: 03 Jan 2008
Posts: 3783
Location: Seattle

PostPosted: Sat Nov 07, 2009 3:47 pm    Post subject: mIRC script help Reply with quote

I don't know how to script in mIRC at all, but can anyone tell me how to add a check if a user is +R before they can use the command .qadd and .qdel? Here's part of the script:


Code:
  if ($1 == .qadd) {
    if ($nick isin %qo) {
      write quotes.txt $2-
      msg $chan 2Your quote was succesfully added as quote $chr(35) $+ $lines(Quotes.txt) $+ .
      t Quote $chr(35) $+ $lines(Quotes.txt) - $2-
    }
    else msg $chan 2Only %qo can add a quote.
  }

  if ($1 = .qdel) {
    if ($nick isin %qo) {
      write -dl $2 quotes.txt
      msg $chan 2Quote $chr(35) $+ $2 has been deleted.
    }
    else msg $chan 2Only %qo can delete a quote.
  }


Now that I think about it, can someone move it to General Programming? Thanks.

_________________
Back to top
View user's profile Send private message MSN Messenger
SFP+
Comp. talk moderator
Reputation: 26

Joined: 02 May 2007
Posts: 1228
Location: Sweden

PostPosted: Sat Nov 07, 2009 4:08 pm    Post subject: Reply with quote

Now to check +r you could do one of these two things:
1. Whois nick
2. /msg nickserv status nick
You would also need to use raw 307 for nr 1.

In the first way, something along these lines would suffice.
Code:

if ($1 == .qadd) {
  if ($nick isin %qo) { whois $nick | set %qadder on }
  else { msg $chan 20nly %qo can add a quote }
}
elseif ($1 == .qdel) {
  if ($nick isin %qo) { whois $nick }
  else { msg $chan 20nly %qo can delete a quote }
}

raw 307:*: {
  if (%qadder) {
    write quotes.txt $2-
    msg $chan 2Your quote was succesfully added as quote $chr(35) $+ $lines(Quotes.txt) $+ .t Quote $chr(35) $+ $lines(Quotes.txt) - $2-
  }
  elseif (%qdeler) {
    write -dl $2 quotes.txt
    msg $chan 2Quote $chr(35) $+ $2 has been deleted.
  }
}


Code:

if ($1 == .qadd) {
  if ($nick isin %qo) { ns status $nick | set %qadder on }
  else { msg $chan 20nly %qo can add a quote }
}
elseif ($1 == .qdel) {
  if ($nick isin %qo) { ns status $nick | set %qdeler on }
  else { msg $chan 20nly %qo can delete a quote }
}

on *:NOTICE:STATUS*:?: {
  if (($nick == nickserv) && ($3 == 3)) {
    if (%qadder) {
      write quotes.txt $2-
      msg $chan 2Your quote was succesfully added as quote $chr(35) $+ $lines(Quotes.txt) $+ .t Quote $chr(35) $+ $lines(Quotes.txt) -
    }
    elseif (%qdeler) {
      write -dl $2 quotes.txt
      msg $chan 2Quote $chr(35) $+ $2 has been deleted.
    }
  }
}
Back to top
View user's profile Send private message
xV
I post too much
Reputation: 1

Joined: 03 Jan 2008
Posts: 3783
Location: Seattle

PostPosted: Sat Nov 07, 2009 4:24 pm    Post subject: Reply with quote

I'm really lost. This is the entire script. There are multiple commands, how can I integrate what you put up there into just two of those commands?

Code:
  if ($1 = .qdel) {
    if ($nick isin %qo) {
      write -dl $2 quotes.txt
      msg $chan 2Quote $chr(35) $+ $2 has been deleted.
    }
    else msg $chan 2Only %qo can delete a quote.
  }


Also, what is raw 307?

_________________
Back to top
View user's profile Send private message MSN Messenger
SFP+
Comp. talk moderator
Reputation: 26

Joined: 02 May 2007
Posts: 1228
Location: Sweden

PostPosted: Sat Nov 07, 2009 4:30 pm    Post subject: Reply with quote

xV wrote:
I'm really lost. This is the entire script. There are multiple commands, how can I integrate what you put up there into just two of those commands?

Code:
  if ($1 = .qdel) {
    if ($nick isin %qo) {
      write -dl $2 quotes.txt
      msg $chan 2Quote $chr(35) $+ $2 has been deleted.
    }
    else msg $chan 2Only %qo can delete a quote.
  }


Also, what is raw 307?

which one would you like to integrate, ns status or whois
http://pastebin.com/m44b0868a
that's ns status
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites