mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
ok this is my script below,how do i make the !location script can only works after the !hack * script is triggered?
(i know my script is lame and suck so plz dont tell me it is lame :tongue:)


Code:
  #hack-system on
on 1:text:!deactivate*:#:{
  if ($nick iswm $read(useraccess.txt)) {
    .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 4 msg $chan 4ACCESS GRANTED: SYSTEM DEACTIVATED
    .disable #hack-system
  }
  else {  .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING. 
  }
}
on 1:text:!hack *:#:{
  if ($nick iswm $read(useraccess.txt)) {
    .timer 1 2 msg $chan 4TARGET: $2
    .timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
    .timer 1 10 msg $chan 12Hacking System Configuration Codes...
    .timer 1 18 msg $chan 2 20%...Completed
    .timer 1 20 msg $chan 2 60%...Completed
    .timer 1 24 msg $chan 2 100%...Completed
    .timer 1 30 msg $chan 4Transfering Self-extract file...
    .timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
    .timer 1 49 msg $chan 4type !location for where the file has received on your system.
  }
  else {  .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING.
  }
}
[color:red] on *:TEXT:!location:#:{ msg $chan $read(random.txt) $+ . }  [/color] 
on 1:text:!command:#:{
  /notice $chan !hack (username)
  /notice $chan !deactive
  /notice $chan !active
  /notice !register access
}
on 1:text:!register access*:#:{
  /notice $nick 4 PLEASE ASK THE OPERATER TO REGISTER YOUR ACCESS DATA.
  /notice $nick 12 ONCE THE CHOSEN NICKNAME IS REGISTERED ON THE LIST,
  /notice $nick 12 YOU MUST USE THE USE THE REGISTERED ACCESS-NAME IS ACCESS THIS SYSTEM.
}
#hack-system end
on 1:text:!activate*:#:{
  .timer 1 1 msg $chan 4SYSTEM NOW OPERATING.
  .enable #hack-system
}


or do i put it like this??? confused:
Code:
 on 1:text:!hack *:#:{
  if ($nick iswm $read(useraccess.txt)) {
    .timer 1 2 msg $chan 4TARGET: $2
    .timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
    .timer 1 10 msg $chan 12Hacking System Configuration Codes...
    .timer 1 18 msg $chan 2 20%...Completed
    .timer 1 20 msg $chan 2 60%...Completed
    .timer 1 24 msg $chan 2 100%...Completed
    .timer 1 30 msg $chan 4Transfering Self-extract file...
    .timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
    .timer 1 49 msg $chan 4type !location for where the file has received on your system.
  }
  else {  .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING.
  }
[color:red]on *:TEXT:!location:#:{ msg $chan $read(random.txt) $+ . }  [/color]
}

Last edited by CyborAccess; 20/11/05 03:47 AM.

practice makes perfect... smile
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
You can't have one event directly dependent on another. Instead, you need to set some sort of flag (variable) to let the second event know that the first event has occurred.

And example using your code would be like this:

Code:
 

on 1:text:!hack *:#:{
  if ($nick iswm $read(useraccess.txt)) {
    .timer 1 2 msg $chan 4TARGET: $2
    .timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
    .timer 1 10 msg $chan 12Hacking System Configuration Codes...
    .timer 1 18 msg $chan 2 20%...Completed
    .timer 1 20 msg $chan 2 60%...Completed
    .timer 1 24 msg $chan 2 100%...Completed
    .timer 1 30 msg $chan 4Transfering Self-extract file...
    .timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
    .timer 1 49 msg $chan 4type !location for where the file has received on your system.
    [color:blue]set -u10 %hackflag $nick[/color]
  }
  else {  .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING.
  }
}

[color:green]on *:TEXT:!location:#:{ 
  if (%hackflag == $nick) {
    msg $chan $read(random.txt) $+ . 
    unset %hackflag
  }[/color]
}


The blue and green parts are what is different. The blue line sets a variable to contain the nick of the person who used the !hack command. The variable will automatically expire after 10 seconds (the -u10 part) if no one uses the !location command.

The green part checks to see if the person who just typed the !location command was the same person who used the !hack command. If it is a match, then a message is sent, and the variable is unset so that they can't use the !location command again until they use the !hack command again.

-genius_at_work

Last edited by genius_at_work; 20/11/05 04:08 AM.
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
whao thanks,im still new to mirc scripts even though i use mirc script alot.. shocked :tongue:

Last edited by CyborAccess; 20/11/05 04:45 AM.

practice makes perfect... smile
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
this part:

on 1:text:!hack *:#:{
if ($nick iswm $read(useraccess.txt)) {
.timer 1 2 msg $chan 4TARGET: $2
.timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
.timer 1 10 msg $chan 12Hacking System Configuration Codes...
.timer 1 18 msg $chan 2 20%...Completed
.timer 1 20 msg $chan 2 60%...Completed
.timer 1 24 msg $chan 2 100%...Completed
.timer 1 30 msg $chan 4Transfering Self-extract file...
.timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
.timer 1 49 msg $chan 4type !location for where the file has received on your system.
set -u10 %hackflag $2
}
else { .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS...
.timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING.
}
}

on *:TEXT:!location:#:{
if (%hackflag == $2 ) {
msg $chan $read(random.txt) $+ .
unset %hackflag
}
}

the red part dont unset the flag after 10 second and it does'nt matched nicknames either...!!
and anyone help??


practice makes perfect... smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
use:

Code:
On *:Text:!hack *:#: {
  if ($read(useraccess.txt,w,$nick)) {
    .timer 1 2 msg $chan 4TARGET: $2
    .timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
    .timer 1 10 msg $chan 12Hacking System Configuration Codes...
    .timer 1 18 msg $chan 2 20%...Completed
    .timer 1 20 msg $chan 2 60%...Completed
    .timer 1 24 msg $chan 2 100%...Completed
    .timer 1 30 msg $chan 4Transfering Self-extract file...
    .timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
    .timer 1 49 msg $chan 4type !location for where the file has received on your system.
    .timer 1 50 set -u10 %hackflag $2 
  }
  else {
    .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING.
  }
}

on *:TEXT:!location *:#:{ 
  if (%hackflag == $2) {
    msg $chan $+($read(random.txt),.) 
    unset %hackflag
  }
}


Note that the variable is set as soon as they type !hack <address> so I'd put it on a timer as soon as the last timer is activated. Also, in your !location script currently $2 can't be used.

It needs to be:

on *:TEXT:!location *:#:{

Instead of:

on *:TEXT:!location:#:{

-Andy

Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
but that makes the !location needs a variable at the end but i just wanted to make !location matchtext...


practice makes perfect... smile
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
What I am saying is your IF statement is obsolete because in your On Text event for !location you have $2 in your comparison. And $2 can't be used.

-Andy

Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
then what should i use?
and how do i make !location can be only used after !hack is triggered and will expire 10 second later??
i tested it it kinda having errors or issues


practice makes perfect... smile
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 On *:Text:!hack *:#: {
  if ($read(useraccess.txt,w,$nick)) {
    .timer 1 2 msg $chan 4TARGET: $2
    .timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
    .timer 1 10 msg $chan 12Hacking System Configuration Codes...
    .timer 1 18 msg $chan 2 20%...Completed
    .timer 1 20 msg $chan 2 60%...Completed
    .timer 1 24 msg $chan 2 100%...Completed
    .timer 1 30 msg $chan 4Transfering Self-extract file...
    .timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
    .timer 1 49 msg $chan 4type !location for where the file has received on your system.
.timer 1 50 .enable #location
    .timer 1 60 .disable #location
  }
  else {
    .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DEINED: ACCESS DATA MISSING.
  }
}

#location off
on *:TEXT:!location *:#:{ 
  if (%hackflag == $2) {
    msg $chan $+($read(random.txt),.) 
    unset %hackflag
  }
}
#location end

 


Just a suggestion

Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
THANKYOU,ill try that and see if it have errors,never thought of that idea laugh laugh laugh laugh


practice makes perfect... smile
Joined: Dec 2004
Posts: 80
C
Babel fish
OP Offline
Babel fish
C
Joined: Dec 2004
Posts: 80
is there any other ways...sorry but i tested it and it dont work... frown


practice makes perfect... smile
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This is a slight alteration to my post, and it worked for me. If it doesn't work for you, for some reason, please provide more information than "It doesn't work"
Code:
 On *:Text:!hack*:#: {
  if $read(useraccess.txt,w,$nick) {
    .timer 1 2 msg $chan 4TARGET: $2
    .timer 1 2 msg $chan 12Cracking $2 $+ 's Internet IP address...
    .timer 1 10 msg $chan 12Hacking System Configuration Codes...
    .timer 1 18 msg $chan 2 20%...Completed
    .timer 1 20 msg $chan 2 60%...Completed
    .timer 1 24 msg $chan 2 100%...Completed
    .timer 1 30 msg $chan 4Transfering Self-extract file...
    .timer 1 47 describe $chan successfully transfered WINDOWS-INSTALLER.EXE to $2 $+ 's computer
    .timer 1 49 msg $chan 4type !location for where the file has received on your system.
    .timer 1 50 .enable #location
  }
  else {
    .timer 1 1 msg $chan 4SCANNING ACCESS DATABASE FOR REGISTERED DATAS... 
    .timer 1 6 msg $chan 4ACCESS DENIED: ACCESS DATA MISSING.
  }
}

#location off
on *:TEXT:!location:#:{ 
  msg $chan $read(random.txt) 
    .timer 1 60 .disable #location
}
#location end
 


Link Copied to Clipboard