mIRC Homepage
Posted By: diecast_toyota on text if-then-else question - 06/03/04 02:46 AM
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 }
{
Posted By: TonyTheTiger Re: on text if-then-else question - 06/03/04 04:24 AM
Code:
on *:TEXT:!Huggles*:#senpai.net:describe # huggles $iif($2 == $null,$nick,$2)


like that ?
Posted By: diecast_toyota Re: on text if-then-else question - 06/03/04 04:41 AM
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...
}
Posted By: TonyTheTiger Re: on text if-then-else question - 06/03/04 04:49 AM
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.
Posted By: diecast_toyota Re: on text if-then-else question - 06/03/04 04:53 AM
YES EXACTLY!!!
Posted By: nunya Re: on text if-then-else question - 06/03/04 03:05 PM
[url=~removed~[/url]
Posted By: Collective Re: on text if-then-else question - 06/03/04 03:10 PM
The above link contains a backdoor (Backdoor.SDBot.Gen), do not open it.
© mIRC Discussion Forums