mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2014
Posts: 24
S
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,1¤7Your Stats8¤ 7Name:15 %name [ $+ [ $nick ] ] 8¤7Health:15 %health [ $+ [ $nick ] ] 8¤7Thirst:15 %thirst [ $+ [ $nick ] ] 8¤7Age:15 %age [ $+ [ $nick ] ] 8¤7Rank:15 %rank [ $+ [ $nick ] ]
}
elseif (%account [ $+ [ $nick ] ] == on) && ($2 != $null) {
/msg $chan 8,1¤7 $2 $+ 's Stats8,1¤ 7Name:15 %name [ $+ [ $2 ] ] 8¤7Health:15 %health [ $+ [ $2 ] ] 8¤7Thirst:15 %thirst [ $+ [ $2 ] ] 8¤7Age:15 %age [ $+ [ $2 ] ] 8¤7Rank: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
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Code:
on *:text:*:#:{
  if ($1 == !stats) {
    if (%account [ $+ [ $nick ] ] == on) {
      if ($2 == $null) {
        /msg $chan 8,1¤7Your Stats8¤ 7Name:15 %name [ $+ [ $nick ] ] 8¤7Health:15 %health [ $+ [ $nick ] ] 8¤7Thirst:15 %thirst [ $+ [ $nick ] ] 8¤7Age:15 %age [ $+ [ $nick ] ] 8¤7Rank:15 %rank [ $+ [ $nick ] ]
      }
      else {
        /msg $chan 8,1¤7 $2 $+ 's Stats8,1¤ 7Name:15 %name [ $+ [ $2 ] ] 8¤7Health:15 %health [ $+ [ $2 ] ] 8¤7Thirst:15 %thirst [ $+ [ $2 ] ] 8¤7Age:15 %age [ $+ [ $2 ] ] 8¤7Rank: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


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Sep 2014
Posts: 24
S
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
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
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,1¤7Your Stats8¤ 7Name:15 %name [ $+ [ $nick ] ] 8¤7Health:15 %health [ $+ [ $nick ] ] 8¤7Thirst:15 %thirst [ $+ [ $nick ] ] 8¤7Age:15 %age [ $+ [ $nick ] ] 8¤7Rank: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,1¤7 $2 $+ 's Stats8,1¤ 7Name:15 %name [ $+ [ $2 ] ] 8¤7Health:15 %health [ $+ [ $2 ] ] 8¤7Thirst:15 %thirst [ $+ [ $2 ] ] 8¤7Age:15 %age [ $+ [ $2 ] ] 8¤7Rank: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.
    }
  }
}


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Sep 2014
Posts: 24
S
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

Link Copied to Clipboard