Results 1 to 8 of 8

Thread: MIRC 58X2 Bot -Help Fix?

  1. #1
    Join Date
    Jan 2012
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default MIRC 58X2 Bot -Help Fix?

    It doesn't work for some reason, I was woundering if someone could help me fix it ?? :/

    on *:TEXT:!58x2:#FCNAME: {
    if ($nick isvoice $chan || $nick isreg $chan) { msg $chan 4only ranks may start a 58x2. | return }
    if ($2 !ison $chan) { msg $chan $2 is not a valid nick. | halt }
    if (!$3) { msg $chan Invalid format. Use: !58x2 user pot | halt }}
    set $2 $3
    var %preroll = $rand(2,100), %p = $gettok($3,3,32), %d2 = $gettok($2,2,32)
    if (%preroll < 58) { msg $chan 4 $nick 9has rolled a 4[ %preroll ]9 sorry 4 %d2 9 you lost the %p pot! }
    else { msg $chan 4 $nick 9has rolled a 4[ %preroll ]9 congrats 4 %d2 9 you won the %p pot!}
    }

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    I'm not sure that's pascal....

    Where did you get it?

  3. #3
    Join Date
    Nov 2009
    Posts
    471
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

  4. #4
    Join Date
    Jan 2012
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I'm not sure that's pascal....

    Where did you get it?
    I made it

  5. #5
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    I have fixed your code up, see if this functions correctly.

    PHP Code:
    on *:TEXT:!58x2:#FCNAME:{
      
    if ($nick isvop #) or ($nick isreg #) {
        
    msg # 4only ranks may start a 58x2.
        
    halt
      
    }
      if ($
    !ison #) { 
        
    msg # $2 is not a valid nick.
        
    halt
      
    }
      if (!$
    3) {
        
    msg # Invalid format. Use: !58x2 user pot
        
    halt 
      
    }
      
    set $$3
      
    var %preroll $rand(2,100), %$gettok($3,3,32), %d2 $gettok($2,2,32)
      if (%
    preroll 58) { 
        
    msg # 4 $nick 9has rolled a 4[ %preroll ]9 sorry 4 %d2 9 you lost the %p pot! 
      
    }
      else { 
        
    msg # 4 $nick 9has rolled a 4[ %preroll ]9 congrats 4 %d2 9 you won the %p pot!}
      
    }


    Forum account issues? Please send me a PM

  6. #6
    Join Date
    Feb 2012
    Location
    DON'T PM ME ASKING FOR STUFF
    Posts
    2,170
    Mentioned
    38 Post(s)
    Quoted
    423 Post(s)

    Default

    Quote Originally Posted by Sandhu255 View Post
    It doesn't work for some reason, I was woundering if someone could help me fix it ?? :/
    Dem standards are terrible.

    Look at Justins post.

    Also:

    http://brian.moonspot.net/php-coding-standards

  7. #7
    Join Date
    Jan 2012
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It still doesnt work, also changing $chan to #ChannelName does not make a diffrence. :/

  8. #8
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by Sandhu255 View Post
    It still doesnt work, also changing $chan to #ChannelName does not make a diffrence. :/
    Can you post what is happing?

    Forum account issues? Please send me a PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •