mIRC Home    About    Download    Register    News    Help

Print Thread
#19376 15/04/03 06:39 PM
Joined: Apr 2003
Posts: 42
E
eendje Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Apr 2003
Posts: 42
Hi, I Mainly use quakenet, And i got a little script to voice
on *:JOIN:#:/mode $chan +v $nick
It works fine:0
But now, I want everytime i Voice some1, say, There you go $nick You are number (number) I voiced, and with everyvoice i give that nuimber has to go 1 up:)
, Probaly u are now gonne say, that I only use this to get easy scripts, but i'm not, I'm willingly to learn it, but can't find any manual;) so i;m learning it by the little scripts you give me here:)
Anyway, thank you, And i hope you have the answer:)


---
signatures own
#19377 15/04/03 06:42 PM
Joined: Mar 2003
Posts: 9
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Mar 2003
Posts: 9
on @*:join:#chan:{
inc %voiced
mode $chan +v $nick
msg $chan you are the %voiced person voiced
}

;-)

#19378 15/04/03 06:44 PM
Joined: Apr 2003
Posts: 42
E
eendje Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Apr 2003
Posts: 42
thanks:) but...
on @*:join:#chan:{
inc %voiced
mode $chan +v $nick
msg $chan you are the %voiced person voiced
}

inc %voiced ? what does it means? (this way i learn sumfin;))


---
signatures own
#19379 15/04/03 06:50 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
It means increase the %voiced variable by 1.

/help /inc

#19380 15/04/03 06:54 PM
Joined: Dec 2002
Posts: 54
L
laz Offline
Babel fish
Offline
Babel fish
L
Joined: Dec 2002
Posts: 54
Inc increases the value of the given variable by 1, unless a number number is entered.

Ex:

/set %test 24
%test now has a value of 24
inc %test
%test now has a value of 25

You can also set how much you want to increase:

/set %test 30
/inc %test 5
%test is now 35


I hope you kinda understand, maybe some one else can explain it better smile

[Edit]

Bah, collective beat me to it smile

Last edited by laz; 15/04/03 06:55 PM.
#19381 16/04/03 01:55 PM
Joined: Jan 2003
Posts: 96
J
Babel fish
Offline
Babel fish
J
Joined: Jan 2003
Posts: 96
here is another, I think this is alot better since I dont like %var's

Code:
on 1:JOIN:#:{
  if ($me isop #) {
    if (%Voice.Count == $null) { inc %Voice.Count 1 | mode # +v $nick }
    if (%Voice.Count < 5) { inc %Voice.Count 1 | mode # +v $nick }
    set -u5 %Voice.Count %Voice.Count
}

This section is just the script that autovoices users on join, the %var is a flood protection so you dont flood off when massive netsplits occurs (when the resynchs)
If you dont use this kind of protection, you will flood off, the script basically on voice 5 users on mass joins, then it stops.

Code:
On *:voice:#:{
  if ($nick == $me) {  
    var %voiced $readini(voice.ini,voices,voiced)
    if (%voiced == $null) { writeini voice.ini voices voiced 1 }
    if (%voiced != $null) { inc %voiced 1 }
    if (%voiced > $readini(voice.ini,voices,voiced)) { writeini voice.ini voices voiced %voiced }
  }
  var %allvoiced $readini(voice.ini,voices,allvoiced)
  if (%allvoiced == $null) { writeini voice.ini voices allvoiced 1 }
  if (%allvoiced != $null) { inc %allvoiced 1 }
  if (%allvoiced > $readini(voice.ini,voices,allvoiced)) { writeini voice.ini voices allvoiced %allvoiced }
}

This part counts all the voices made in channels, and writes them to a file, so incase your mirc is closed inproperly, the latest count is saved (mirc doesnt write %variables on the fly, only on proper exit/quit)
What it does is basically, it sets a temp %var from the data it reads $mircdir\voice.ini, and then adds the new voice tho the %var, then it writes the new count back to the file.
You can ofcuz change it to only watch 1 channel, add -v+o-o+b-b and kicks too. and you can move the file from $mircdir and name it what you want.

Code:
alias voicereset {
  writeini voice.ini voices voicedate $$?="Enter The Date"
  writeini voice.ini voices voiced 0
  writeini voice.ini voices allvoiced 0
  echo -a  $+ $color(own) -x 2,15 Counter Successfully Reset 
}

This is just to initilize the script/reset the counts and date.

Code:
alias voiced {
  if $readini(voice.ini,voices,voicedate) == $null {
    echo -a  $+ $color(own) -x 2,15 Script Halted, You havent set any date. 
    echo -a  $+ $color(own) -x 2,15 Starting voice script setup. 
    echo -a  $+ $color(own) -x 2,15 After setup run the script again. 
    .timer 1 3 voicereset
  }
  else say  I have Voiced: $readini(voice.ini,voices,voiced)  of  $readini(voice.ini,voices,allvoiced) 
}

usage /voiced :tongue:


-Peace


Link Copied to Clipboard