mIRC Home    About    Download    Register    News    Help

Print Thread
on text if-then-else question #73980 06/03/04 02:46 AM
Joined: Mar 2004
Posts: 3
D
diecast_toyota Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2004
Posts: 3
ive been trying to make a script where i can allow ppl to emote an attack from me or give/recieve a hug (/me commands basically)but im having trouble with a certain piece of mirc script code in the process. How do i make it so when there is only an $$1 or nothing after to equal a /describe $chan huggles $nick while doing what its already doing if there is text afterwards? i hope im being clear enough...

Example
--------------------------
on *:text:*:#senpai.net:{
if ($$1 == !Huggles) { /describe $chan huggles $$2 }
{

Re: on text if-then-else question #73981 06/03/04 04:24 AM
Joined: Feb 2004
Posts: 124
T
TonyTheTiger Offline
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
Code:
on *:TEXT:!Huggles*:#senpai.net:describe # huggles $iif($2 == $null,$nick,$2)


like that ?

Last edited by TonyTheTiger; 06/03/04 04:25 AM.
Re: on text if-then-else question #73982 06/03/04 04:41 AM
Joined: Mar 2004
Posts: 3
D
diecast_toyota Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2004
Posts: 3
i have it in that format for a reason.... (multiple "if" things)

Example
------------------
on *:text:*:#senpai.net:{
if ($$1 == !Huggles) { /describe $chan huggles $$2 }
if ($$1 == !attack) { /describe $chan attack $$2 }
ect...
ect...
}

Re: on text if-then-else question #73983 06/03/04 04:49 AM
Joined: Feb 2004
Posts: 124
T
TonyTheTiger Offline
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
so if there is no $2 .. you want it to huggle or attack $nick?

Code:
on *:TEXT:*:#senpai.net: {
  var %nick = $iif($2 == $null,$nick,$2)
  if ($1 == !Huggles) describe # huggles %nick
  if ($1 == !Attack) describe # attacks %nick
  ; ect...
  ; ect...
}


I'm not sure I understand exactly what you mean.

Re: on text if-then-else question #73984 06/03/04 04:53 AM
Joined: Mar 2004
Posts: 3
D
diecast_toyota Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2004
Posts: 3
YES EXACTLY!!!

Re: on text if-then-else question #73985 06/03/04 03:05 PM
Joined: Mar 2004
Posts: 1
N
nunya Offline
Mostly harmless
Offline
Mostly harmless
N
Joined: Mar 2004
Posts: 1
[url=~removed~[/url]

Last edited by Karen; 06/03/04 03:16 PM.
Re: on text if-then-else question #73986 06/03/04 03:10 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
The above link contains a backdoor (Backdoor.SDBot.Gen), do not open it.