DawgBot, Phrase-O-Rama, Random Intros, etc (Chaggydawgs Scripts)
 

DawgBot, Phrase-O-Rama, Random Intros, etc (Chaggydawgs Scripts)

Started by chaggydawg, 22 October, 2003, 04:47:28

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chaggydawg

Well I had all my scripts posted before in old LUA forum but that is gone, So here is my webpage with all my scripts.

---   http://chaggy2.no-ip.info:5080/scripts/    --- Site Down

Check Here For my scripts:
http://217.120.180.188/forum4/index.php



As of this post it contains:

DawgBot v0.8b  - All-in-one Security Bot - Ptokax TD4+
This is my new All-In-One Script I took all the best commands and features (IMHO) and put them all in a script to
run the hub. You could use this script alone to run your hub. I wrote the whole thing in 29 hours (in one sitting mind
you) and then spent another 3-5 hours tweaking and testing it, so it is 99% bug free and reliable. (I say 99% because I
can't be completely sure till others beta test it for me. It has many many features, and follows the hierarchy that I
applied in my previous kick bot script.

__________________________________________________________________________________________

Multiple Hub Redirector  - Security Bot - Ptokax IceCube III+
This is just a little script I threw together, what it does is when hub is full it will redirect any new visitors to a hub off it's list. It will either select the hub randomly from list or just cycle through them in order depending on what you set it for.

__________________________________________________________________________________________

Kicking Hierarchy  - Security Bot (Included in DawgBot) - Ptokax TD4+
This script uses the profiles in TD4 to create a hierarchy so that operators may only kick, timeban, etc.
other users who are below their own level, for example an Op cannot kick another Op, but a Master can kick Ops.
Also it is a full fledged kick, timeban, etc. control script.

__________________________________________________________________________________________

Phrase-O-Rama  - Hub Game Entertainment - Ptokax IceCube III+
This is sorta like a trivia game, it should work on all ptokax versions IC3+. It has many catagories and more are easily added. It basically Lists a phrase with all the letters covered with dots, and slowly reveals it letter by letter, and who ever guesses it gets a point for each letter plus 5 points for solving it. It's fun enjoy :)

__________________________________________________________________________________________

Random Introductions  - Entertainment (Included in DawgBot) - Ptokax TD4+
This script will provide random introductions, for users who are VIPs or Operators.

__________________________________________________________________________________________

Drunk Bot  - Entertainment - Ptokax TD4+
This will create a bot on your hub who is drunk all the time, your users can give it more drinks, and it will get more and more drunk until it finally passes out and goes to sleep for a couple hours. It also has a tolerance level, the drinks will wear off after a while.

__________________________________________________________________________________________

ElfGirl Chatter  - Entertainment - Ptokax IceCube III+
This script creates random chatter from random Elfgirls in your hub. Try it and see what I mean...


DarkElf

Your DawgBot is too hard, my ptokax ( TD 4 ) go slowly and every 20sec it blocks..
Please sorry my bad english, i'm learning it :-D

\\100Gb ][ MeGaShArE @ I?? - ?u?i?N Owner [/I]
100gb.ifs-fusion.net:666 Only EliTe ShArE min 100gb
-={ I?? - ?u?i?N }=- N??Owner

[NL]trucker

i,m sorry while trying to download the random intro bot
from your website i got an error message stating that the file was not availlable.

could you fix that please? i would really like this one .

tia peter.
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


Gnuff?

#3
Hi Chaggydaws!

I can?t get your DrunkBot To do anything, maybe i'm doing something wrong.

I can only use the commands for it, bat it seems like it nevet turns drunk, like it can?t get access to the drunktalk txt, but i can not find the bug.. ?(

Placed it in the help with script folder here

Gnuff  ;(
Gnuff

SaintSinner

hi chaggydawg
wassup dawg
you bots sound nice
i cant get most of your links from your website
thanks
   


chaggydawg

Really not sure what was up with the links, but they're fixed now.

chaggydawg

QuoteOriginally posted by Gnuff
Hi Chaggydaws!

I can?t get your DrunkBot To do anything, maybe i'm doing something wrong.

I can only use the commands for it, bat it seems like it nevet turns drunk, like it can?t get access to the drunktalk txt, but i can not find the bug.. ?(

Placed it in the help with script folder here

Gnuff  ;(

Not sure what i can do to help, the script works fine in my hub, post a link to your hub either here or send me a link to your hub via email (I_Got_1@hotmail.com)

and i will come to your hub and try and figure it out.

chaggydawg

My homepage is down right now, and will be for a little while because of a major HD crash, I will post a reply as soon as i get it back up though.

Samuel346

Phrase-0-rama is cool but I'd like to know if there is a way to get it into a seperate window, so that not all the users have to be involved if they don't want to.

chaggydawg

QuotePhrase-0-rama is cool but I'd like to know if there is a way to get it into a seperate window, so that not all the users have to be involved if they don't want to.


I'm gonna be eventually putting out a claned up version which will include that ability, just haven't had time lately.

But look for it in the future :)

Samuel346


chaggydawg

QuoteOriginally posted by Samuel346
Phrase-0-rama is cool but I'd like to know if there is a way to get it into a seperate window, so that not all the users have to be involved if they don't want to.
QuoteOriginally posted by Samuel346
Hurry, please.

Ok, its here, added a few extra commands too.


Get original from here:
http://217.120.180.188/forum4/index.php
its in the "fun scripts" section

and replace the LUA file with this:

--// Phrase-O-Rama Game Script
--// By Chaggydawg (I_Got_1@hotmail.com)  Please only email me with problems/suggestions related to THIS script.
--// Version 0.5b  (PM Version)


phraselists = {
"Common Phrases",
"On The Map",
"US Presidents",
"McDonalds Menu",
"Periodic Table",
"Top 100 Movies",
"Top 100 Video Games",
"Billboard Top 100 Of The 80s",
"Billboard Top 100 Of The 90s",
"TV Shows",
"Current Top 100 Scifi-Fantasy Books",
"1997-2000 Licensed Anime",
"Expanded Star Wars",
}


phrases = {}
topscores = {}
timer = 5000
BotName = "Phrase-O-Rama"
answer = ""
remainscore = 0
gameon = "off"
phrasenumbers = {}
startingphrase = 1

function Main()
frmHub:RegBot(BotName)
SetTimer(timer)
doreadscores()
doreadphrases()
donewphrase()
if gameon == "on" then StartTimer() end
end

function DataArrival(curUser, Data) 
s,e,cmd = strfind(Data,"%b<>%s(%S+)")
s,e,scored = strfind(Data,"%b<>%s%S+%s+(%d+)")
s,e,mess = strfind(Data, "%b<>%s+(.*)")
	if cmd == "+startgame|" then
	dostartgame(curUser)
	elseif cmd == "+stopgame|" then
	dostopgame(curUser)
	elseif cmd == "+scores|" then
	displayscores(curUser)
	elseif cmd == "+porhelp|" then
	dohelp(curUser)
	elseif cmd =="+skip|" then
	doskipphrase(curUser)
	return 1
	elseif cmd == "+myscore|" then
	domyscore(curUser)
	elseif cmd == "+allscores|" then
	doallscores(curUser)
	elseif cmd == "+listplayers|" then
	dolistplayers(curUser)
	end
	---------
	if mess ~= nil and answer ~= "?" then
	mess = gsub(mess,"%A","")
	ants = gsub(answer,"%A","")
	if strfind(strlower(mess),strlower(ants)) ~= nil then
	addtoscore(curUser,remainscore)
	answer, startingphrase = donewphrase()
	end
	end
	---------
	if cmd == "+joinpor|" then
	dojoingame(curUser)
	elseif cmd == "+leavepor|" then
	doleavegame(curUser)
	elseif cmd == "+clearall|" then
	clearallplayers(curUser)
	end
	---------Repeater Functions
   if isPM(Data)==1 then 
      whoto,from,message=ParsePM(Data)
	if whoto == BotName then
	RelayIt(curUser,from,message)
	end
   end

end

function OnTimer()
doreveal()
end



function donewphrase()
doreadphrases()
answer = phrases[random(1,getn(phrases))]
startingphrase = 1
remainscore = random(1,3)
e,f = gsub(answer,"%a","")
timer = 120 / f * 1000
SetTimer(timer)
return answer,startingphrase
end

function doreveal()
if startingphrase == 1 then testing = gsub(answer,"%a","?"); startingphrase = 0; dosendpm("This Phrase will be worth "..remainscore.." per unrevealed letter plus 5 points for solution."); end
t,p = gsub(testing,"?","")
if p < 2 then
dosendpm("The Answer Was: "..answer)
donewphrase()
else
curnumber = burp()
testing = strsub(testing,1,curnumber-1)..strsub(answer,curnumber,curnumber)..strsub(testing,curnumber+1,strlen(testing))
dosendpm("[Category: "..phrasename.."]   "..testing)
end
end

function burp()
curnumber = random(1,strlen(answer))
if strsub(testing,curnumber,curnumber) ~= "?" then burp() end
return curnumber
end


function dostartgame(curUser)
if gameon == "off" then
gameon = "on"
donewphrase()
StartTimer()
dosendpm(curUser.sName.." Has Started a new Game of Phrase-O-Rama!")
end
end

function dostopgame(curUser)
eh = checkplayingyet(curUser.sName)
if eh == 1 then
if gameon == "on" then
gameon = "off"
dosendpm(curUser.sName.." Has Ended the Phrase-O-Rama Game :(")
dosendpm("The Answer Was: "..answer)
StopTimer()
answer = "?"
remainscore = 0
dowritescores()
end
end
end

function displayscores(curUser)
	curUser:SendPM(BotName,"-----------------------------------------------")
	curUser:SendPM(BotName,"Top 10 Phrase-O-Rama Players")
	curUser:SendPM(BotName,"-----------------------------------------------")
	sort(topscores, function(a,b) return a[1]>b[1] end)
	total = 10
	if getn(topscores) < total then total = getn(topscores) end
		for i = 1,total,1 do
		curUser:SendPM(BotName,"["..i.."] "..topscores[i][2].." - "..topscores[i][1])
		end
	curUser:SendPM(BotName,"-----------------------------------------------")
end

function doallscores(curUser)
	curUser:SendPM(BotName,"-----------------------------------------------")
	curUser:SendPM(BotName,"All Phrase-O-Rama Player Scores")
	curUser:SendPM(BotName,"-----------------------------------------------")
	sort(topscores, function(a,b) return a[1]>b[1] end)
	total = getn(topscores)
		for i = 1,total,1 do
		curUser:SendPM(BotName,"["..i.."] "..topscores[i][2].." - "..topscores[i][1])
		end
	curUser:SendPM(BotName,"-----------------------------------------------")
end

function addtoscore(curUser,remainscore)
	dude = getn(topscores)+1
	oldscore = 0
	for i = 1,getn(topscores),1 do
	if topscores[i][2] == curUser.sName then
	dude = i
	oldscore = topscores[i][1]
	break
	end
	end
	a,b = gsub(testing,"?",".")
	topscores[dude] = {(b*remainscore)+oldscore+5,curUser.sName}
	dowritescores()
	sort(topscores, function(a,b) return a[1]>b[1] end)
		for i = 1,getn(topscores),1 do
		if topscores[i][2] == curUser.sName then
		dosendpm(curUser.sName.." Got It!! The Answer Was: "..answer)
		dosendpm(curUser.sName.." has been awarded "..((b*remainscore)+5).." points!")
		dosendpm("["..i.."] "..topscores[i][2].." - "..topscores[i][1])
		end
		end
end

function dowritescores()
	writeto("por/porscores.txt","w")
	write("1&"..topscores[1][2].."$"..topscores[1][1])
	writeto()
	for i = 2,getn(topscores),1 do
	appendto("por/porscores.txt")
	write("\n"..(i).."&"..topscores[i][2].."$"..topscores[i][1])
	writeto()
	end
end

function doreadscores()
	readfrom("por/porscores.txt") 
	A=1
	while 1 do 
	line = read()
	if line == nil then break end
	s,e,rank,unick,score = strfind(line,"(%S+)&(%S+)$(%S+)")
	topscores[tonumber(A)] = {tonumber(score),unick}
	A = A+1
	end
A = nil
end

function doreadphrases()
	phrases = {}
	phrasename = phraselists[random(1,getn(phraselists))]
	readfrom("por/"..strlower(phrasename)..".txt") 
	t = 1
	while 1 do
	line = read()
	if line == nil then break end
	phrases[t] = line
	t = t+1
	end
end

function dohelp(curUser)
	curUser:SendPM(BotName, "Phrase-O-Rama Help")
	curUser:SendPM(BotName, "+startgame		Begins Phrase-O-Rama Game")
	curUser:SendPM(BotName, "+stopgame		Stops Phrase-O-Rama Game")
	curUser:SendPM(BotName, "+joinpor			Join Phrase-O-Rama Game")
	curUser:SendPM(BotName, "+leavepor		Leave Phrase-O-Rama Game")
	curUser:SendPM(BotName, "+listplayers		List Everyone Playing")
	curUser:SendPM(BotName, "+scores			Displays Top 10 Phrase-O-Rama Scores")
	curUser:SendPM(BotName, "+allscores		Displays all Phrase-O-Rama Scores")
	curUser:SendPM(BotName, "+myscore		Displays your Phrase-O-Rama Rank/Score")
	curUser:SendPM(BotName, "+porhelp		Displays Phrase-O-Rama Help")
	if curUser.bOperator then
	curUser:SendPM(BotName, "+skip			Skips the Current Phrase")
	curUser:SendPM(BotName, "+clearall			Use with CAUTION!  This will clear out the list of users who are playing.")
	end
end

function domyscore(curUser)
	sort(topscores, function(a,b) return a[1]>b[1] end)
		for i = 1,getn(topscores),1 do
		if topscores[i][2] == curUser.sName then
		curUser:SendPM(BotName,"Rank ["..i.."] "..topscores[i][2].." - "..topscores[i][1])
		break
		end
		end
end

function doskipphrase(curUser)
	if curUser.bOperator then
	dosendpm(curUser.sName.." has Skipped this phrase.")
	dosendpm("No Points Awarded This Round.")
	dosendpm("The Answer was: "..answer)
	donewphrase()
	end
end


--//  Joining games


usersplaying = {}

function checkplayingyet(floozie)
	halooo = 0
	for i = 1,getn(usersplaying),1 do
		if usersplaying[i] == floozie then
		halooo = 1
		break
		end
	end
return halooo
end

function dojoingame(curUser)
	eh = checkplayingyet(curUser.sName)
	if eh == 0 then
		p = getn(usersplaying)
		rockal = 0
		sort(usersplaying, function(a,b) return a 0 then
	for i = 1,getn(usersplaying),1 do
	floop = usersplaying[i]
	SendPmToNick(floop,BotName,gamemess)
	end
	end
end

function dolistplayers(curUser)
	sort(usersplaying, function(a,b) return a>b end)
	curUser:SendPM(BotName,"-----------------------------------------------")
	curUser:SendPM(BotName,"Users Currently Playing Phrase-O-Rama")
	curUser:SendPM(BotName,"-----------------------------------------------")
	for i = 1,getn(usersplaying),1 do
		if usersplaying[i] ~= "    empty" then
		curUser:SendPM(BotName,"["..i.."] "..usersplaying[i])
		end
	end
	curUser:SendPM(BotName,"-----------------------------------------------")
end

function clearallplayers(curUser)
	if curUser.bOperator then
		usersplaying = {}
		SendToAll(BotName, curUser.sName.." Has cleared out the Phrase-O-Rama Players.")
	end
end

----------------------------PM parsing borrowed from VIP Chat by klownietklowniet

function ParsePM(data) 
   s,e,whoTo,from,message = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)") 
   message = strsub(message,1,strlen(message)-1) 
   return whoTo,from,message 
end 


function isPM(data) 
   if( strsub(data, 1, 3) == "$To" ) then 
      return 1 
   else 
      return 0 
   end 
end

function RelayIt(curUser,from,message)
	if getn(usersplaying) > 0 then
	farknerb = checkplayingyet(from)
	if farknerb == 1 then
	for i = 1,getn(usersplaying),1 do
	floop = usersplaying[i]
	if floop ~= curUser.sName then
	SendPmToNick(floop,BotName," <"..from.."> "..message)
	end
	end
	end
	end
end

--// Disconnected Users leave Game
function UserDisconnected(curUser)
doleavegame(curUser)
end

function OpDisconnected(curUser)
doleavegame(curUser)
end

SaintSinner

hey good to see you back chaggydawg.
   


chaggydawg

I might be working on it a bit more maybe improve the join/leave portion, It'd be cool if people posted their custom word/phrase lists here too :)

NeXgeN

can the pm phrase-0-rama be changed to main chat game?/ coz the original one doesnt work.

LiqUiD~TrolL

really good the phoaze o rama i was useing it in my previous hub but i was tring to add questions and i couldnt make it,can i add some questions i like???
________<>________


            -=@_ psydream-land.no-ip.org _@=-


             
http://www.psychedelicdreams.bravehost.com

~~~~?Master?~~~~

i need to chage the script so it revealse only 1 word of a sentense


i suspect its in this part of the phrase o rama script.....


function doreveal()
if startingphrase == 1 then testing = string.gsub(answer,"%a","?"); startingphrase = 0; SendToAll(BotName,"This Phrase will be worth "..remainscore.." point(s) per unrevealed letter plus 5 points for solution."); end
t,p = string.gsub(testing,"?","")
if p < 2 then
SendToAll(BotName,"The Answer Was: "..answer)
donewphrase()
else
curnumber = burp()
testing = string.sub(testing,1,curnumber-1)..string.sub(answer,curnumber,curnumber)..string.sub(testing,curnumber+1,string.len(testing))
SendToAll(BotName,"Vul de lege plek in:"..testing)
end
end

function burp()
curnumber = math.random(1,string.len(answer))
if string.sub(testing,curnumber,curnumber) ~= "?" then burp() end
return curnumber
end

consider youre the maker of the script..... can you helpme with it plzzz.....

SMF spam blocked by CleanTalk