|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
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%)"
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
What kind of calculation is that supposed to be?
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
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?
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
This not be quite so accurate, but...
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
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
yup, it didn't work No sure what's the problem.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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)
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
That should be isop not ison. It seems to work for me.
-Andy
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Here's the alias that I use for calculating ratios alias ratio {
var %1 = $1,%2 = $2
while ($2) tokenize 32 $2 $calc($1 % $2)
return $+($calc(%1 /$1),:,$calc(%2 /$1))
}
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
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
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%)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I'm still not sure what this calculator is supposed to be doing. But give this a try 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.
|
|
|
|
Joined: Mar 2005
Posts: 74
Babel fish
|
OP
Babel fish
Joined: Mar 2005
Posts: 74 |
RusselB ,yup ur getting 50% of what i'm saying correct. 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
|
|
|
|
|