mIRC Home    About    Download    Register    News    Help

Print Thread
#120194 15/05/05 05:31 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
is there anything like that?

Like i use @spal 1000 10

It'll show me : u have " 100 spal normal/ 125 for tyr(25%)"

#120195 15/05/05 06:01 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
What kind of calculation is that supposed to be?

#120196 15/05/05 09:11 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
like a ratio calculator

#120197 15/05/05 10:21 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
oh, btw
wad script should i use if i want my bot to unban ppl from the channel
like

/msg bot unban #channel nick

what is the command?

#120198 15/05/05 11:45 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
This not be quite so accurate, but...

Code:
On *:Text:*:?: {
  if ($1 == unban) && ($me ison $2) && ($3) {
    var %x = $ibl($2,0)
    while (%x) {
      if ($ibl($2,%x) == $3) { msg $target Match found.. $+($chr(40),$ifmatch,$chr(41)) | mode $2 -b $ifmatch }
      dec %x
    }
  }
}


/msg bot unban #Channel [Nick/Address]

-Andy

#120199 15/05/05 03:14 PM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
yup, it didn't work
No sure what's the problem.

#120200 15/05/05 04:26 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I'm not sure what you are asking, is this what you want to do?
//var %numbers = $$?="Enter N1/N2" | var %raw_data = $calc( %numbers ) | var %percent = $round($calc(( %numbers ) * 100),0) $+ $chr(37) | say %numbers = %percent $calc($gettok(%numbers,2,47) / $gettok(%numbers,1,47)) $+ :1

(Copy/Paste all that to the command line and fill in the numbers liike 10/1000)

#120201 15/05/05 05:35 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
That should be isop not ison. It seems to work for me.

-Andy

#120202 15/05/05 09:03 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Here's the alias that I use for calculating ratios
Code:
 alias ratio { 
  var %1 = $1,%2 = $2 
  while ($2) tokenize 32 $2 $calc($1 % $2) 
  return $+($calc(%1 /$1),:,$calc(%2 /$1)) 
} 
 

#120203 16/05/05 12:10 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
hmm I tried yours, but it just doesn't look right to me
/say $ratio(1000 10)
1000:0
/say $ratio(10 1000)
10:0
so I messed with it some more
Code:
alias ratio {
  var %1 = $1, %2 = $2
  if (%1 <= %2) { var %ratio = $calc(%2 / %1) $+ :1 }
  if (%1 > %2) { var %ratio = $calc(%1 / %2) $+ :1 }
  msg $active %ratio $+($chr(40),$round($calc((%1 / %2) * 100),0),$chr(37),$chr(41))
}


/ratio 1000 10
100:1 (10000%)
/ratio 10 1000
100:1 (1%)

#120204 16/05/05 01:28 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
oops...sorry, accidentally posted an old code...I don't use the ratio alias on a regular basis at this point, so I have a few variants of it...glad you were able to get it working, though.

#120205 16/05/05 04:24 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
on *:text:!calc *:#: { var %x = $remove($2-,$chr(44)) var %y = $calc(%x * 0.00025) var %z = $calc(%y * 288) msg $chan Your interest is %y msg $chan Your daily interest is %z}

i found this script in the forum

Is it possible that i modify it?

like my friend would like to use my bot, he'll say !spal 1000 10 100%
and if he wants to add special ratio like additional like *115%
which is = 143.75 spal

Which the bot will say back

"Your have 100 spal raw"
"if your tyr, you have 125 spal raw

#120206 16/05/05 05:28 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'm still not sure what this calculator is supposed to be doing.
But give this a try
Code:
 on *:text:!spal*:*:{
if !$2 || !$3 { halt }
else {
.msg $nick You have $calc($2 / $3) spal raw
if $4 {
.msg $nick You have $calc($calc(1+ $calc($4 / 100)) * ($2 / $3)) raw @ $4
}
}
}


I don't know if that's what you're looking for, but without a better explanation as to what it's supposed to be doing, that's the best I can come up with at this point.

#120207 17/05/05 08:47 AM
Joined: Mar 2005
Posts: 74
K
KidSol Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Mar 2005
Posts: 74
RusselB ,yup ur getting 50% of what i'm saying correct. smile

Need to add some more.
like add in 1 more option which is calculater by adding 25% more


< me > !spal 200 10
< bot > you have 20 spal raw
< bo t> If ur are tyr, u have 25 spal raw <-- 25%

Thx smile


Link Copied to Clipboard