mIRC Home    About    Download    Register    News    Help

Print Thread
[Help]Integrate a Leave Of Absence trigger #248826 27/10/14 11:25 PM
Joined: Sep 2014
Posts: 24
S
SophisDecay Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 24
Ok so this is a snippet of the working code.

****************Working****************

on *:text:!stats*:#: {
if (%account [ $+ [ $nick ] ] == on) && ($2 == $null) {
/msg $chan 8,17Your Stats8 7Name:15 %name [ $+ [ $nick ] ] 87Health:15 %health [ $+ [ $nick ] ] 87Thirst:15 %thirst [ $+ [ $nick ] ] 87Age:15 %age [ $+ [ $nick ] ] 87Rank:15 %rank [ $+ [ $nick ] ]
}
elseif (%account [ $+ [ $nick ] ] == on) && ($2 != $null) {
/msg $chan 8,17 $2 $+ 's Stats8,1 7Name:15 %name [ $+ [ $2 ] ] 87Health:15 %health [ $+ [ $2 ] ] 87Thirst:15 %thirst [ $+ [ $2 ] ] 87Age:15 %age [ $+ [ $2 ] ] 87Rank:15 %rank [ $+ [ $2 ] ]
}

************endworking**********

Now this is the snippet of what i'm trying to integrate into the above snippet.

*******************WIP***********************
else (%member [ $+ [ $nick ] ] == on) && ($2 == (%account [ $+ [ $nick ] ] == off) {
/msg $chan Sorry $nick $2 is on LOA, they set themself to LOA on %LOATIME [ $+ [ $nick ] ]
}
}
ON *:text:!LOA:#: {
if (%account [ $+ [ $nick ] ] == on) {
set %account [ $+ [ $nick ] ] off
set %LOA [ $+ [ $nick ] ] ON
set %LOATIME [ $+ [ $nick ] ] $asctime
/msg $chan $nick is now set to LOA.
}
}

ON *:text:!LOAreturn:#: {
if (%account [ $+ [ $nick ] ] == off) {
set %account [ $+ [ $nick ] ] on
set %LOA [ $+ [ $nick ] ] OFF
del %LOATIME [ $+ [ $nick ] ]
/msg $chan $nick has returned from LOA.
}
}
****************endWIP******************

Any help would be nice, when I test the bot and set myself to !LOA it tells me myself and everyone is LOA... but everyone else can see my stats and still see each others

Thank you!


-Chan: #WolvenSpirit -Server: Irc.Sorcery.Net
Re: [Help]Integrate a Leave Of Absence trigger [Re: SophisDecay] #248827 28/10/14 12:43 AM
Joined: Jul 2006
Posts: 3,576
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,576
Code:
on *:text:*:#:{
  if ($1 == !stats) {
    if (%account [ $+ [ $nick ] ] == on) {
      if ($2 == $null) {
        /msg $chan 8,17Your Stats8 7Name:15 %name [ $+ [ $nick ] ] 87Health:15 %health [ $+ [ $nick ] ] 87Thirst:15 %thirst [ $+ [ $nick ] ] 87Age:15 %age [ $+ [ $nick ] ] 87Rank:15 %rank [ $+ [ $nick ] ]
      }
      else {
        /msg $chan 8,17 $2 $+ 's Stats8,1 7Name:15 %name [ $+ [ $2 ] ] 87Health:15 %health [ $+ [ $2 ] ] 87Thirst:15 %thirst [ $+ [ $2 ] ] 87Age:15 %age [ $+ [ $2 ] ] 87Rank:15 %rank [ $+ [ $2 ] ]
      }
    }
    elseif ($v1 == off) /msg $chan Sorry $nick $2 is on LOA, they set themself to LOA on %LOATIME [ $+ [ $nick ] ]
  }
  elseif ($1 == !LOA) {
    if (%account [ $+ [ $nick ] ] == on) {
      set %account [ $+ [ $nick ] ] off
      set %LOA [ $+ [ $nick ] ] ON
      set %LOATIME [ $+ [ $nick ] ] $asctime
      msg $chan $nick is now set to LOA.
    }
  }
  elseif ($1 == !LOAreturn) {
    if (%account [ $+ [ $nick ] ] == off) {
      set %account [ $+ [ $nick ] ] on
      set %LOA [ $+ [ $nick ] ] OFF
      unset %LOATIME [ $+ [ $nick ] ]
      msg $chan $nick has returned from LOA.
    }
  }
}
Try this


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: [Help]Integrate a Leave Of Absence trigger [Re: Wims] #248829 28/10/14 12:52 AM
Joined: Sep 2014
Posts: 24
S
SophisDecay Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 24
Its causing some kind of conflict
I'm chisu

19:51] Chisu !LOA
[19:51] NeverMore` Chisu is now set to LOA.
[19:51] Chisu !stats
[19:51] NeverMore` Sorry Chisu is on LOA, they set themself to LOA on Mon Oct 27 19:51:24 2014
[19:51] Chisu !stats Barra
[19:51] NeverMore` Sorry Chisu Barra is on LOA, they set themself to LOA on Mon Oct 27 19:51:24 2014


-Chan: #WolvenSpirit -Server: Irc.Sorcery.Net
Re: [Help]Integrate a Leave Of Absence trigger [Re: SophisDecay] #248830 28/10/14 01:55 AM
Joined: Jul 2006
Posts: 3,576
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,576
Code:
on *:text:*:#:{
var %nick $eval($+(%,account,$nick),2), %2 $eval($+(%,account,$2),2)
  if ($1 == !stats) {
    if (%nick == on) {
      if ($2 == $null) {
        msg $chan 8,17Your Stats8 7Name:15 %name [ $+ [ $nick ] ] 87Health:15 %health [ $+ [ $nick ] ] 87Thirst:15 %thirst [ $+ [ $nick ] ] 87Age:15 %age [ $+ [ $nick ] ] 87Rank:15 %rank [ $+ [ $nick ] ]
      }
      elseif (%2 == off) /msg $chan Sorry $nick $2 is on LOA, they set themself to LOA on %LOATIME [ $+ [ $2 ] ]
      elseif (%2 == on) /msg $chan 8,17 $2 $+ 's Stats8,1 7Name:15 %name [ $+ [ $2 ] ] 87Health:15 %health [ $+ [ $2 ] ] 87Thirst:15 %thirst [ $+ [ $2 ] ] 87Age:15 %age [ $+ [ $2 ] ] 87Rank:15 %rank [ $+ [ $2 ] ]
      }
    }
  }
  elseif ($1 == !LOA) {
    if (%account [ $+ [ $nick ] ] == on) {
      set %account [ $+ [ $nick ] ] off
      set %LOA [ $+ [ $nick ] ] ON
      set %LOATIME [ $+ [ $nick ] ] $asctime
      msg $chan $nick is now set to LOA.
    }
  }
  elseif ($1 == !LOAreturn) {
    if (%account [ $+ [ $nick ] ] == off) {
      set %account [ $+ [ $nick ] ] on
      set %LOA [ $+ [ $nick ] ] OFF
      unset %LOATIME [ $+ [ $nick ] ]
      msg $chan $nick has returned from LOA.
    }
  }
}


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: [Help]Integrate a Leave Of Absence trigger [Re: Wims] #248840 29/10/14 02:18 AM
Joined: Sep 2014
Posts: 24
S
SophisDecay Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2014
Posts: 24
OH Thank you! I just changed
This..
if (%nick == on) {
To this
if (%Member [ $+ [ $nick ] ] == on) {

It works perfectly, Thank you so very much!!


-Chan: #WolvenSpirit -Server: Irc.Sorcery.Net