Author Topic: Spin the bottle :O  (Read 2637 times)

ZaneSama

  • Guest
Spin the bottle :O
« on: November 15, 2009, 11:10:13 PM »
My first little script for IceChat :D

Usage: .spin

Code: [Select]
Function RandNick(Channel,ServerNumber)
  Randomize
  Total = GetIdentifier("$nick(" & channel & ",0)",ServerNumber)
  num = Int(RND * Total)+1
  RandNick = GetIdentifier("$nick(" & channel & "," & num & ").nick",ServerNumber)
End Function

Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
 if lcase(Message) = ".spin" then
SendCommand "/msg " & channel & chr(32) & nickname & " is spinning the bottle!...",ServerNumber
SendCommand "/msg " & channel & " the bottle is spinning...",ServerNumber
SendCommand "/msg " & channel & " the bottle slows down...",ServerNumber
SendCommand "/msg " & channel & " the bottle landed on...",ServerNumber
SendCommand "/msg " & channel & chr(32) & RandNick(Channel,ServerNumber) & "!",ServerNumber
SendCommand "/msg " & channel & chr(32) & Nickname & " must wave to him/her.",ServerNumber
end if
End Sub

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Spin the bottle :O
« Reply #1 on: November 16, 2009, 02:08:10 AM »
You might wanna add some timer to those messages, and make sure only one game at a time is active on a channel. Otherwise this script would be an easy way to flood kill you off a channel/server.
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

ZaneSama

  • Guest
Re: Spin the bottle :O
« Reply #2 on: November 16, 2009, 09:32:21 AM »
Mm, good point Morio. I made it in thought of my own network, where I couldn't get flooded off as easily >_>