mIRC Home    About    Download    Register    News    Help

Print Thread
#110107 04/02/05 04:34 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
I found this trout reply a webpage somewhere, i like the idea of it but felt it flooded a bit when people slapped other people, so was thinking how to edit this coding so that when people slap me with a trout it will reply back if not me then don't respond

on *:ACTION:*:#:{
if ($1 == slaps) && ($3-9 == around a bit with a large trout) && (!$10) {
;here it checks so it's the original slap that's in mirc.
if (%trout.temp) { inc %trout }
;checks if the %trout.temp variable exists, if it does, it increases %trout. This is added, so you can't be flooded off, but you still save the trout, except you dont tell the channel about it. smile
else {
set -u10 %trout.temp 1
;sets the flood-protection-varaible, and it will be automaticly unset after 10 seconds.
inc %trout
;saves the trout
describe $chan takes the trout from $nick and puts it back in the river. Now I've saved %trout trout.
;tells the channel that you saved another trout smile
}
}
}

#110108 04/02/05 05:24 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Change line 2 to:
if ($1- != slaps $me around a bit with a large trout) return
; if you're not being slapped, do nothing (return)

and remove one } at the end

#110109 04/02/05 05:36 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Don't work still get the replies throught, plus an error of my nickname and unknown command in status

on *:ACTION:*:#:{
if ($1- != slaps $me around a bit with a large trout)
;here it checks so it's the original slap that's in mirc.
if (%trout.temp) { inc %trout }
;checks if the %trout.temp variable exists, if it does, it increases %trout. This is added, so you can't be flooded off, but you still save the trout, except you dont tell the channel about it. smile
else {
set -u10 %trout.temp 1
;sets the flood-protection-varaible, and it will be automaticly unset after 10 seconds.
inc %trout
;saves the trout
describe $chan takes the trout from $nick and puts it back in the river. Now I've saved %trout trout.
;tells the channel that you saved another trout smile
}
}

#110110 04/02/05 05:46 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
I put a return at the end of the line.
If you really don't like returns, put the } back and use
if ($1- == slaps $me around a bit with a large trout) {


on *:ACTION:*:#:{
if ($1- != slaps $me around a bit with a large trout) return
;here it checks so it's the original slap that's in mirc.
if (%trout.temp) { inc %trout }
;checks if the %trout.temp variable exists, if it does, it increases %trout. This is added, so you can't be flooded off, but you still save the trout, except you dont tell the channel about it.
else {
set -u10 %trout.temp 1
;sets the flood-protection-varaible, and it will be automaticly unset after 10 seconds.
inc %trout
;saves the trout
describe $chan takes the trout from $nick and puts it back in the river. Now I've saved %trout trout.
;tells the channel that you saved another trout
}
}

#110111 04/02/05 05:53 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Just tried it again and not getting any replies back

#110112 04/02/05 06:09 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
try this one:
Code:
on *:ACTION:*:#:{ 
  if ($1- != slaps $me around a bit with a large trout) { return }
  else {
    if (%trout.temp) { inc %trout }
    else { 
      set -u10 %trout.temp 1
      inc %trout 
      describe $chan takes the trout from $nick and puts it back in the river. Now I've saved %trout
    }
  }
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#110113 04/02/05 11:31 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
grrr im not having much luck with this one either, is it possible cos i'm using another mirc client to test me and the clone nickname thinks it's $me

#110114 05/02/05 02:18 AM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
dont think so, and the code i pasted works just fin here.. so the problem must be at ur place, make shure the slap look as it does in the code..

slaps your_nick around a bit with a large trout

if it doesnt match exactly, then it wont trigger, try add a "echo -a something" in the code, then u see where it stop run the code..
Code:
on *:ACTION:*:#:{ 
if ($1- != slaps $me around a bit with a large trout) { return }
else {
[color:red]echo -a Yes working so far[/color]
if (%trout.temp) { inc %trout }
else { 
set -u10 %trout.temp 1
inc %trout 
describe $chan takes the trout from $nick and puts it back in the river. Now I've saved %trout
}
}
}

and put that echo below every line in the code, then u see where it fails and maybe we can help u more then..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard