DrunkUser
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

DrunkUser

Started by Madman, 13 April, 2005, 07:10:23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Madman

--//Stripped from FunScript v7 made by Madman
--//Script orginally based on Hawk's Kenny Script

Bot = "DrunkBot"
DrunkNicks = {} --//Saves drunk user
MinTimer = 10 --//Min the users will be drunk

function OnTimer()
	DrunkNicks = {} --//Empty table
		SendToAll(Bot, "All drunks users are now sober")
	StopTimer() --//Kill the timer
end

function ChatArrival(curUser, data)
	data = string.sub(data,1,string.len(data)-1)
	s,e,cmd = string.find(data,"%b<>%s+(%S+)")
	if curUser.bOperator then
		local s,e,Drunked = string.find(data, "%b<>%s+%S+%s+(%S+)")
		if cmd == "!makedrunk" then
			StopTimer()
			SetTimer(1000*60*MinTimer)
			StartTimer()
				if Drunked == nil then
					curUser:SendData(Bot, "Syntax: "..cmd.." nick")
					return 1
				end
			Drunk(curUser, data)
			return 1
		elseif cmd == "!undrunk" then
				if Drunked == nil then
					curUser:SendData(Bot, "Syntax: "..cmd.." nick")
					return 1
				end
			UnDrunk(curUser, data)
			return 1
		elseif cmd == "!showdrunk" then
			ShowDrunk(curUser)
			return 1
		elseif cmd == "!undrunkall" then
			DrunkNicks = {}
				SendToAll(Bot, "All drunk users are now sober")
			return 1
		end
	end
	if string.sub(data,1,1) == "<" then
		if DrunkNicks[curUser.sName] == 1 then
			text = DrunkText[math.random(1, table.getn(DrunkText))]
			SendToAll(curUser.sName, text)
			return 1
		end
	end
end

function Drunk(curUser, data)
local s,e,cmd,DrunkUser = string.find(data,"%b<>%s+(%S+)%s+(%S+)")
local Drunked = GetItemByName(DrunkUser)
	if Drunked == nil then
		curUser:SendData(Bot, "The User "..DrunkUser.." is not in the hub...")
	else
		DrunkNicks[Drunked.sName] = 1
		SendToAll(Bot,Drunked.sName.." is drunk now beacuse of " ..curUser.sName)
	end
end

function UnDrunk(curUser, data)
local s,e,cmd,DrunkUser = string.find(data,"%b<>%s+(%S+)%s+(%S+)")
local Drunked = GetItemByName(DrunkUser)
	if Drunked == nil then
		curUser:SendData(Bot,"The User "..DrunkUser.." is not in the hub....")
	else
		if DrunkNicks[Drunked.sName] == 1 then
		DrunkNicks[Drunked.sName] = nil;
			SendToAll(Bot, Drunked.sName.." is now sober...")
		end
	end
end

function ShowDrunk(curUser)
	local names = ""
		for index, value in DrunkNicks do
	local line = index
		names = names.." "..line.."\r\n"
	end
	curUser:SendData(Bot,"\r\n\r\nDrunk Users..\r\n\r\n"..names)
end

DrunkText = { --//Text users in drunkmode will say ;)
	"geee thanks a beer *hick* *drool*",
	"Wow.. *hick*... *cough*... you're.... *cough*... hot... *hick*",
	"Crap, I have to pee.... *drinking*... oh wait.. too late",
	"*cough* hey guys!!!! IT'S PARTY TIME!!!!",
	"*hick* look at me, I'm dancinggggg...",
	"I WANT TUBORG",
	"*cough* damn people in here look hot... wanna get it on ?",
	"I WANT BUDWEISER!!!!",
	"I feel so good *puking*",
	"HEY WHO STOLE MY BEER ?!?!?!",
	"Look I'm drunk lol",
	"Carslberg, is that a swedish town ? *hick*",
	"shit.. I'm *hick* drunk",
	"anybody got a bucket ? *barfing*",
	"Why is everything upside down?",
	"are you saying mushrooms are better than BEER ????",
	"I do get horny when I'm drunk...",
	"me dRunk? -*- hik -*-",
	"pftftt paff the boffle bartender   pfffttttttt",
	"I just drank a little...",
	"I am not drunk!!",
	"I am  not dddddddddddddrunk.....",
	"drunk?",
	"pfftt!",
	"pour me another",
	"*spew*",
	"oohhh my head",
	"I think I'm gonna hurl",
	"*BLAH*",
	"*BURP*",
	"me not drunk *HICK*",
}
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

SMF spam blocked by CleanTalk