I was wondering if anybody out there that's good with mIRC scripts could help me out...
I wanted a script to use with the nick Culex. Say, if somebody typed @Culex, it would say
* Culex uses Dark Star on [nick].
<Culex> [nick] takes # damage!
But... I also wanted it to be random, like, a random number for the damage, and a random attack, between Dark Star, Flame Stone, Meteor Swarm, and Generic Attack. And, if possible, I want the script to activate only when my nick is Culex.
Can somebody help me with this?
Need someone good with mIRC scripts...
Started by
The Satellite
, Oct 04 2007 03:59 PM
6 replies to this topic
#1
Posted 04 October 2007 - 03:59 PM
#2
Posted 06 October 2007 - 09:53 AM
You'll need to put this under "remotes" :
(Any line starting with ; is a comment)
; watch for text "@Culex" from everybody
On *:TEXT:@Culex:#: {
; pick a number between 1 and 3 randomly
var %i = $rand(1,3)
var %attack = 0
if(%i ==1) { %attack = Dark Star }
elseif(%i == 2) { %attack = Flame Stone}
else { %attack = Meteor Swarm }
; cast the attack. $nick is the nick that triggered the action
me uses %attack on [$nick].
say $nick takes # damage!
}
(Haven't tested it out, I wrote it based on the tutorial I linked you to in chat ... hope it works.)
It should give you the idea of how to do one of several things randomly (copied from the tutorial too).
(Any line starting with ; is a comment)
CODE
; watch for text "@Culex" from everybody
On *:TEXT:@Culex:#: {
; pick a number between 1 and 3 randomly
var %i = $rand(1,3)
var %attack = 0
if(%i ==1) { %attack = Dark Star }
elseif(%i == 2) { %attack = Flame Stone}
else { %attack = Meteor Swarm }
; cast the attack. $nick is the nick that triggered the action
me uses %attack on [$nick].
say $nick takes # damage!
}
(Haven't tested it out, I wrote it based on the tutorial I linked you to in chat ... hope it works.)
It should give you the idea of how to do one of several things randomly (copied from the tutorial too).
#3
Posted 06 October 2007 - 03:22 PM
I tried it out, Koopa, and it didn't work. Thanks for trying, anyways.
I got the script, now though. Sephiroth gave one to me.
I got the script, now though. Sephiroth gave one to me.
#4
Posted 06 October 2007 - 03:24 PM
You'll need to put this under "remotes" :
(Any line starting with ; is a comment)
CODE
; watch for text "@Culex" from everybody
On *:TEXT:@Culex:#: {
; pick a number between 1 and 3 randomly
var %i = $rand(1,3)
var %attack = 0
if(%i ==1) { %attack = Dark Star }
elseif(%i == 2) { %attack = Flame Stone}
else { %attack = Meteor Swarm }
; cast the attack. $nick is the nick that triggered the action
me uses %attack on [$nick].
say $nick takes # damage!
}
(Haven't tested it out, I wrote it based on the tutorial I linked you to in chat ... hope it works.)
It should give you the idea of how to do one of several things randomly (copied from the tutorial too).
I fixed your script, Koopa.
CODE
; watch for text "@Culex" from everybody
On *:TEXT:@Culex:#: {
; pick a number between 1 and 3 randomly
var %i = $rand(1,3)
; Determine attack value
var %dmg = $rand(1,200)
var %attack = 0
if (%i == 1) { %attack = Dark Star }
elseif (%i == 2) { %attack = Flame Stone }
else { %attack = Meteor Swarm }
; cast the attack. $nick is the nick that triggered the action
describe $chan uses %attack on $nick $+ .
msg $chan $nick takes %dmg damage!
}
On *:TEXT:@Culex:#: {
; pick a number between 1 and 3 randomly
var %i = $rand(1,3)
; Determine attack value
var %dmg = $rand(1,200)
var %attack = 0
if (%i == 1) { %attack = Dark Star }
elseif (%i == 2) { %attack = Flame Stone }
else { %attack = Meteor Swarm }
; cast the attack. $nick is the nick that triggered the action
describe $chan uses %attack on $nick $+ .
msg $chan $nick takes %dmg damage!
}
#5
Posted 07 October 2007 - 07:28 AM
Thanks, Sephiroth. It appears my first try at mirc scripting wasn't totally useless after all then.
For the benefit of readers, I'll post a link to the tutorial I grabbed for the purpose.
For the benefit of readers, I'll post a link to the tutorial I grabbed for the purpose.
#6
Posted 10 October 2007 - 07:48 AM
I've had a fair amount of experience writing in IRCscript. I've even written a fairly detailed quote archiving program. If anyone would like any help with that sort of thing, feel free to PM me (or MSG me on IRC if by chance I happen to be online there).
#7
Posted 10 October 2007 - 10:01 AM
I'd not want to make another topic for something petty like this, but is anyone else having problems getting $read to work? Even if I tell mIRC to just //echo $read(test.txt) it returns $null.
on 1:text:&test:#:{
msg $chan $read(text.txt)
}
Since the $read function is returning $null, I get an "insufficient parameters" error. I don't understand why it's not working, it used to work fine wit UBPBot ...
CODE
on 1:text:&test:#:{
msg $chan $read(text.txt)
}
Since the $read function is returning $null, I get an "insufficient parameters" error. I don't understand why it's not working, it used to work fine wit UBPBot ...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users