Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Spin the bottle
- when /^(\.spin)/i
- list = XChatRuby::XChatRubyList.new( "users" );
- users = [];
- while list.next
- nick = list.str("nick");
- users.push(nick);
- end
- command( format( "say ![bc03]#{triggerUser}![bc] spins the bottle..." ) );
- timerAddition = 0;
- userDuplicated = true;
- # we assume that the user IS duplicated in order to initialize
- # the loop.
- while userDuplicated == true do
- srand();
- user = users[rand(users.size)]
- userDuplicated = triggerUser.eql?(user) ? true : false;
- if userDuplicated == true
- command( format( "timer #{timerAddition+2+rand(4)+1} say The bottle stopped at ![bc03]#{triggerUser}![bc]! Respinning~..." ) );
- timerAddition = timerAddition.next + 1; # adding an extra second onto the addition
- else
- timerAddition = timerAddition.next #adding an extra second
- command( format( "timer #{timerAddition+2+rand(4)+1} say The bottle stopped at ![bc03]#{user}![bc]! Now kiss up~" ) );
- end
- end
- # note: 2+rand(3)+1 == minimum of 2 seconds + a random number between 0 and 2 + 1 to make the random number between 1 and 3.
- # Dr Pepper Dispenser
- when /^\.drpepper/i
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- if myphrase.length < 1 then myphrase = triggerUser end
- command( "me dispenses a Dr Pepper for #{myphrase}." )
- when /^\.accident/i
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- if myphrase.length < 1 then myphrase = triggerUser end
- command( "say I accidentally all over #{myphrase}" )
- when /^\.dickpunch/i
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- if words[1] =~ /(#{myNick})$/i
- myphrase = triggerUser
- end
- if myphrase.length < 1 then myphrase = triggerUser end
- command( "me punches #{myphrase} in the dick" )
- when /^\.despair/i
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- myphrase.slice!(100..-1)
- if myphrase.length < 1 then myphrase = triggerUser end
- command( "say I AM IN DESPAIR! #{myphrase.upcase} HAS LEFT ME IN DESPAIR!!" )
- when /^\.superarts/i
- if words[1] =~ /(#{myNick})$/i
- command("say NOOOOOOOOOOOOOO");
- return XCHAT_EAT_NONE
- end
- if words[2] !~ /(~|&|@)/ then return XCHAT_EAT_NONE end
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- if myphrase.length < 1 then myphrase = triggerUser end
- command( "cs op #{currentChannel}" )
- command( "timer 2 nick WesleyWillis")
- if currentChannel =~ /^(\#shakesoda)$/i
- command( "timer 3 say .timeban #{myphrase} 4s SUCK A CHEETA'S DICK" )
- else
- command( "timer 3 kick #{myphrase} SUCK A CHEETA'S DICK" )
- end
- command( "timer 5 nick #{myNick}")
- when /^\.monsterkill/i
- if words[2] !~ /(~|&|@)/ then return XCHAT_EAT_NONE end
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- if myphrase.length < 1 then myphrase = triggerUser end
- command( "cs op #{currentChannel}" )
- command( "timer 2 kick #{myphrase} HEADSHOT" )
- # Random number generator X x Y
- when /^\.rand/i
- wordarr = words[1].split(" ")
- wordarr.slice!(0)
- myphrase = wordarr.join(" ")
- if myphrase.match(/^([^ ]+?)$/i) != nil
- command( "say Nothing here." )
- end
- if myphrase.match(/^(-?\d+?) (-?\d+?)$/i) != nil
- x = Integer(myphrase.match(/^(-?\d+?) (-?\d+?)$/i)[1])
- y = Integer(CGI::escape(myphrase.match(/^(-?\d+?) (-?\d+?)$/i)[2]))
- puts "X=#{x} Y=#{y}"
- if y > x
- srand();
- command("say #{triggerUser}, your number is... #{x + rand(y-x)}.")
- elsif y == x+1
- command("say Your second number must be greater than your first number + 1.")
- else
- command("say Your second number must be larger than your first.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement