PDA

View Full Version : [Filled] Calculate nuke size


wooolF[RM]
11-23-2004, 09:25 PM
Nuke size : size * ratio + size * (multiplier - 1)

What is needed :

[user] : !trigger 3 100
[bot] : 100Mb release nuked 3x will result in 500Mb punishment


No ftp connections needed, no mysql etc, simple script, nothing advanced. If anyone could do this, would be apreciatted :) Thanks.


PS: If you're gonna reply with something like "learn tcl, it's not that hard, specially for this kind of script", then please don't reply at all... Go to the toilet or something and put all this bs out there, thank you :rolleyes: This forum's purpose is to ask for help and to get it... If nobody will do this script, it's ok... But befree me and rest of the forum of that bs, thnx

EwarWoo
11-23-2004, 10:13 PM
Originally posted by wooolF[RM]
Nuke size : size * ratio + size * (multiplier - 1)

That should be:
Nuke size : size * ratio + (size * (multiplier - 1))

wooolF[RM]
11-23-2004, 11:26 PM
which gives same result as mine as by math rules u first take * and/or / and only then + and/or -

jeza
11-24-2004, 05:32 AM
removed

wooolF[RM]
11-24-2004, 06:14 PM
Doesn't really work here... hmmm... just get no output at all :|
thanks for trying tho' :)

Regards

jeza
11-25-2004, 03:01 AM
this works for me


set trigger "!trigger"

proc pub:calc { nick uhost hand chan text } {

#!trigger 3 100
#size * ratio + (size * (multiplier - 1))

set math [expr [expr [lindex $text 1]*3]+[expr [lindex $text 1]*[expr [lindex $text 0]-1]] ]

putquick "PRIVMSG $chan :[lindex $text 1]Mb release nuked [lindex $text 0]x will result in $math Mb punishment "

return
}

bind pub -|- $trigger pub:calc




1125[08:58] <__jeza> !trigger 3 100
1125[08:58] <ef~|iojTQ|> 100Mb release nuked 3x will result in 500 Mb punishment
1125[08:58] <__jeza> !trigger 3 11235
1125[08:58] <ef~|iojTQ|> 11235Mb release nuked 3x will result in 56175 Mb punishment

wooolF[RM]
11-25-2004, 07:58 PM
Thanks a lot, this worked flawessly :) Nice nifty addition ;)

Best Regards :)

ioUSER
05-11-2006, 11:06 PM
is it possible to integrate that into dzsbot? on nuke announce: blabla got nuked 1x reason: blabla lost: 10MB

would be a nice function :)