mIRC Homepage
Posted By: FireDivine Need help with scripting. - 13/02/06 02:17 AM
In the scripts editor on the popups menu I have:

STAB!:/me stabs $$1 with a Divine Blade!/stab
FIRE!:/me Fire blazes upon $$1!!/fire
EAT!$$2 eats $$1, and then digest $$1../eat
DIE!:/me stabs $$1 to death. ^.^/die
Slap!:/me slaps $$1 around a bit with a large trout./slap

But when I type in /slap user it says unknown command...

Why won't it work?
Posted By: genius_at_work Re: Need help with scripting. - 13/02/06 02:22 AM
The popups editor allows you to add items to the right-click menu of various windows. If you want to type /slap, you need to add an alias to the alias editor.

Code:
slap if ($active ischan) describe $active slaps $$1 with a salmon


-genius_at_work
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 02:23 AM
Oh ok. Thanks. Now i'll see if it works. ^.^
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 02:32 AM
If someone typed in fish how can you make something to auto reply to fish? without me typing it in?
Posted By: blk Re: Need help with scripting. - 13/02/06 02:54 AM
Place this in the Remote area of the script editor.
Code:
on *:TEXT:[color:red]fish bowl[/color]:#:{
  /msg $chan [color:green]<reply message here>[/color]
}

You could replace fish bowl with anything you want replyed to

Where <reply message here> just make that what you want fish bowl to be replyed with...
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 03:44 AM
Many thaks.
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 04:20 AM
I am trying out a new code but it is not working for some reason.

I am putting it into Remote:

on *:TEXT:slowdeath $$1:#:{
/msg $active *Slowly kills $$1*
}

Where $active is the person typing the code and $$1 is the target.
Posted By: hixxy Re: Need help with scripting. - 13/02/06 04:21 AM
Code:
on *:TEXT:slowdeath *:#: msg $nick *Slowly kills $$2*
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 04:24 AM
cool. thanks again.
Posted By: FireDivine Re: Need help with scripting. *DELETED* - 13/02/06 04:34 AM
Post deleted by FireDivine
Posted By: hixxy Re: Need help with scripting. - 13/02/06 04:42 AM
What is the exact error message? I haven't heard of anything like that before and it's definitely not coming from the script.
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 04:45 AM
I'm sorry. I got it working now.

on *:TEXT:slowdeath *:#:{
/msg $chan $nick *Slowly kills $$2*
}
Posted By: blk Re: Need help with scripting. - 13/02/06 05:02 AM
If you want it to make it an action -
Code:
on *:TEXT:slowdeath *:#:{
  /describe $chan Slowly kills $2
}
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 05:07 AM
OK thanks for the tip.

One last question I think.

How can I make the name change to something different besides my own?

$chan seems to display my name in front of everything.

What if I wanted to use another name for the intro line?

Like Monster instead of my user name.
Posted By: blk Re: Need help with scripting. - 13/02/06 05:11 AM
Oh yea, you could make it
Code:
on *:TEXT:slowdeath *:#:{
  /describe $chan Slowly kills $2 for $nick
}


lol, other than that there is no other way..
Posted By: blk Re: Need help with scripting. - 13/02/06 05:13 AM
or like
Code:
on *:TEXT:slowdeath *:#:{
  /describe $chan has a monster slowly kill $2
}

smirk just ideas :tongue:
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 05:14 AM
ok I get it. Thanks for all the help.
Posted By: FireDivine Re: Need help with scripting. *DELETED* - 13/02/06 06:36 AM
Post deleted by FireDivine
Posted By: hixxy Re: Need help with scripting. - 13/02/06 06:52 AM
Could you rephrase that? I don't understand..
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 07:03 AM
Sorry. I found out what caused the loop though.

Hiya * waits for the command
the reply hiya (name)

caused it to loop.

Now I got it like this:

on *:TEXT:Hiya *:#:{
/msg $chan <3 HIYA!
}

It got rid of the loop but after the HIYA! I would like it to have the name that originally put Hiya *
Posted By: hixxy Re: Need help with scripting. - 13/02/06 07:10 AM
Do this:

Code:
on *:TEXT:Hiya *:#:{
  if (!%hiya) {
    inc -u5 %hiya
    msg $chan &lt;3 HIYA $nick $+ !
  }
}
Posted By: FireDivine Re: Need help with scripting. - 13/02/06 07:17 AM
Thanks. That's pretty complexed. I would of never guessed that.
Posted By: drc4 Re: Need help with scripting. - 13/02/06 10:48 AM
If you have the following in the popups and use /slap user ... then that explains why it doesn't work. A popup and an alias are different.
Code:
STAB!:/me stabs $$1 with a Divine Blade!/stab 
FIRE!:/me Fire blazes upon $$1!!/fire 
EAT!$$2 eats $$1, and then digest $$1../eat 
DIE!:/me stabs $$1 to death. ^.^/die 
Slap!:/me slaps $$1 around a bit with a large trout./slap

To create an alias, open the Script Editor, and select the Aliases tab. And add
Code:
stab me stabs $$1 with a Divine Blade!
fire me Fire blazes upon $$1 $+ !! 
eat me eats $$1, and then digest $$1 $+ . 
die me stabs $$1 to death. ^.^
Slap me slaps $$1 around a bit with a large trout.
© mIRC Discussion Forums