Jump to content

Photo

Need someone good with mIRC scripts...


  • Please log in to reply
6 replies to this topic

#1 The Satellite

The Satellite

    May the way of the Hero lead to the Triforce.

  • Members
  • Real Name:Michael
  • Pronouns:He / Him

Posted 04 October 2007 - 03:59 PM

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? icon_confused.gif

#2 Koopa

Koopa

    The child behind the turtle

  • Members
  • Location:Switzerland

Posted 06 October 2007 - 09:53 AM

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).

#3 The Satellite

The Satellite

    May the way of the Hero lead to the Triforce.

  • Members
  • Real Name:Michael
  • Pronouns:He / Him

Posted 06 October 2007 - 03:22 PM

I tried it out, Koopa, and it didn't work. icon_unsettled.gif Thanks for trying, anyways. icon_kawaii.gif

I got the script, now though. Sephiroth gave one to me.

#4 Sephiroth

Sephiroth

    The Legendary Sephiroth

  • Members
  • Location:Somewhere... Lemme know if you find me :)

Posted 06 October 2007 - 03:24 PM

QUOTE(Koopa @ Oct 6 2007, 09:53 AM) View Post

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!
}


#5 Koopa

Koopa

    The child behind the turtle

  • Members
  • Location:Switzerland

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.

#6 Radien

Radien

    Courage

  • Members
  • Real Name:Steve
  • Location:Oregon

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 Ben

Ben

    a very grumpy

  • Members

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.

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