AuthorMessage
ATAG
n00b
Posts: 12

Hi it's my favorite game on dc++... Enjoy
Code:
-- Original script by Ro
-- Converted to PtokaX by Hungarista
-- 2005.12.27
-- ported to HeXHub by ATAG @ 27.01.2007
-- V1.01
hubadresse = "forma1.no-ip.org:1415"
Reason = "Szellöztesd ki a fejed! ... Hja megvolt :D"
sBot = Hub.BotName()
tCommand = {
["?fire"] = 1,
["kérdőjelfájör"] = 1,
}
Yackpot = math.random(1,6)
Shooting = 0
for i,v in pairs(tCommand) do
   SendToAll(sBot, "Orosz rulett játék indult,  -> "..i.." (Hatlövetü benne egy töltény)")
   break
end
function ChatArrival(_user,data)
   if tCommand[data] then
      local Chance = 6 - Shooting
      Shooting = Shooting + 1
      if Shooting == Yackpot then
         SendToAll(sBot, "Bumm! ".._user.sName.." asszem fejbe lőtted magad, nyugodj békében ;) (kick)")
         SendToAll(sBot, "is kicking ".._user.sName.." because: "..Reason) 
            if _user.iIdent < 1 then
               SendPMTo(_user.iUserID,sBot, Reason)
               SendDataTo(_user.iUserID,"$ForceMove "..hubadresse)
            end
         Yackpot = math.random(1,6)
         Shooting = 0
      else
         SendToAll(sBot, "Klakk... ".._user.sName.." mákod van ("..Chance..":1)")
      end
   end
end

I updated the code for the current version og lua plugin...
Dardanicum
n00b
Posts: 16

nice little game maybe a bit too simple. if converted to work with hexhub
i think this one's a bit better:
Code:

-- Russian Roulette 1.0
--
-- by Mutor The Ugly 1/2/04
--
-- Care to try your luck?
--
--User Settings-------------------------------------------------------------------------------------
Prefix = "+"         -- Command Prefix
Cmd1 = "play"         -- Play Command
Cmd2 = "quit"         -- Quit Command
Bot = "Russian Roulette"
-- Add/Edit triggers as you like
Alive = {
"You are one lucky SOB.",
"Uh, you can breath now, you made it.",
"The Gods smile upon you, this day.",
"Nice job, and your mother said you were good for nothing.",
"You have survived. ....for now.",
"You should be dead right now, this game is rigged.",
"Damn! I thought at last we were through with you.",
"You lived, but your still a schmuck."
}
-- Add/Edit triggers as you like
Dead = {
"Your dead, now whose gonna clean up this mess?.",
"Your stone cold, Hell is ready to recieve you.",
"Wow, your brains look great on this ivory wall.",
"What a loser, at least you died quickly.",
"Your blue and cold, and let me guess, uninsured?",
"No man they aint blanks, R.I.P.  ....stupid.",
"It just goes to prove, stupid people shouldn't breed.",
"Thanks for nothing ya stinking corpse, I just lost $20."
}
--End User Settings----------------------------------------------------------------------------------
Bang = {
"live",
"die",
"die",
"die",
"die",
"die",
}
function Main()
players = {}
end
function DataArrival(user, data)
   if strsub(data, 1, 1) == "<" then
      s,e,cmd = strfind(data, "%b<>%s+(%S+)(%S+)")
      s,e,rounds = strfind(data, "%b<>%s+(%d)")
      rounds = tonumber(rounds)
         if (cmd==Prefix..Cmd1) then
            user:SendData(Bot,"\r\n\r\n\tAre you feeling lucky, punk?\r\n\tHow many bullets? [1-5]")
            players[user.sName]=1
            return 1
         elseif (cmd==Prefix..Cmd2) then
            if players[user.sName]==1 then players[user.sName]=nil
               user:SendData(Bot,"\r\n\r\n\tSure go on and leave, there will be other victims.\r\n")
            else
               user:SendData(Bot,"\r\n\r\n\tYou cant quit if you weren't playing.\r\n")            
            return 1
            end
         end         
         if rounds ~= nil and players[user.sName]==1 then
            if rounds < 1 or rounds > 5 then
               user:SendData("\r\n\t***"..user.sName.." You must select between 1 and 5 bullets***")
            else
               local fire = Bang[random(1, rounds)]
                  if fire == "die" then
                     outcome = Dead[random(1, getn(Dead))]
                     user:SendData("\r\n\t[Bang!!! - Your Dead!]\r\n\t"..outcome.."\r\n")
                  else
                     outcome = Alive[random(1, getn(Alive))]
                     user:SendData("\r\n\t[Click... - Your Alive!]\r\n\t"..outcome.."\r\n")
                  end
            rounds=""
            outcome=""
            return 1
            end
         
         end
   
   end
end

Dark
n00b
Posts: 45

Quoted from ATAG
Hi it's my favorite game on dc++... Enjoy
Code:
-- Original script by Ro
-- Converted to PtokaX by Hungarista
-- 2005.12.27
-- ported to HeXHub by ATAG @ 27.01.2007
-- V1.01
hubadresse = "forma1.no-ip.org:1415"
Reason = "Szellöztesd ki a fejed! ... Hja megvolt :D"
sBot = Hub.BotName()
tCommand = {
["?fire"] = 1,
["kérdőjelfájör"] = 1,
}
Yackpot = math.random(1,6)
Shooting = 0
for i,v in pairs(tCommand) do
   SendToAll(sBot, "Orosz rulett játék indult,  -> "..i.." (Hatlövetü benne egy töltény)")
   break
end
function ChatArrival(_user,data)
   if tCommand[data] then
      local Chance = 6 - Shooting
      Shooting = Shooting + 1
      if Shooting == Yackpot then
         SendToAll(sBot, "Bumm! ".._user.sName.." asszem fejbe lőtted magad, nyugodj békében ;) (kick)")
         SendToAll(sBot, "is kicking ".._user.sName.." because: "..Reason) 
            if _user.iIdent < 1 then
               SendPMTo(_user.iUserID,sBot, Reason)
               SendDataTo(_user.iUserID,"$ForceMove "..hubadresse)
            end
         Yackpot = math.random(1,6)
         Shooting = 0
      else
         SendToAll(sBot, "Klakk... ".._user.sName.." mákod van ("..Chance..":1)")
      end
   end
end

I updated the code for the current version og lua plugin...

can u make it in english ?
ATAG
n00b
Posts: 12

not a perfect translation, but you can understand, what text you need
Code:
-- Original script by Ro
-- Converted to PtokaX by Hungarista
-- 2005.12.27
-- ported to HeXHub by ATAG @ 27.01.2007
-- V1.01_en
hubadresse = "forma1.no-ip.org:1415"
Reason = "Take a rest! ... See ya later :D"
sBot = Hub.BotName()
tCommand = {
["?fire"] = 1,
["questionmarkfire"] = 1, -- :D
}
Yackpot = math.random(1,6)
Shooting = 0
for i,v in pairs(tCommand) do
   SendToAll(sBot, "Russian roulette game started,  -> "..i.." (six shot, 1 bullet)")
   break
end
function ChatArrival(_user,data)
   if tCommand[data] then
      local Chance = 6 - Shooting
      Shooting = Shooting + 1
      if Shooting == Yackpot then
         SendToAll(sBot, "Bang! ".._user.sName.." you blowed your brains out ;) (kick)")
         SendToAll(sBot, "is kicking ".._user.sName.." because: "..Reason)
            if _user.iIdent < 1 then
               SendPMTo(_user.iUserID,sBot, Reason)
               SendDataTo(_user.iUserID,"$ForceMove "..hubadresse)
            end
         Yackpot = math.random(1,6)
         Shooting = 0
      else
         SendToAll(sBot, "Clack... ".._user.sName.." you're lucky :) ("..Chance..":1)")
      end
   end
end

Dark
n00b
Posts: 45

cool,ty
L.E :
Code:
[00:36:03] <[€mpir€]Security> Russian roulette game started,  -> questionmarkfire (six shot, 1 bullet)
[00:36:06] <[€mpir€]Dark> ??
[00:36:08] <[€mpir€]Dark> ?
[00:36:09] <[€mpir€]Dark> ?
[00:36:09] <[€mpir€]Dark> ?
[00:36:10] <[€mpir€]Dark> ?

how does it works ?
L.E2: nevermind made it work
ATAG
n00b
Posts: 12

lol.. Commands are in tCommands table... now 2 commands are: '?fire' and 'questionmarkfire'