READ THE RULES
0 Members and 1 Guest are viewing this topic.
--- BirthdayMan v 3.5--- by Herodes -- Update 5/10/2004--- Converted to Lua 5 by jiten (some ideas taken from BirthdayMan v 2.6 LUA_5.0 by TT and Jelf)--- --- --- --- --- --- -- v2.5--- When Users are connected if there is a birthday it informs--- When a Birhtday-User connect it plays surprise and informs the Hub-- v2.6--- Fix from ... comment for the display age-- v 3 --- ability to display the Birthday nicks in the topic of the hub ... ( all of them ... the Ofline ones are in parentheses like (Herodes))--- added agecmd to get exact age--- added bhelpcmd --- added display of birthdays in the findcmd--- added ability for pm or main cmds .. ;)-- v3.5--- added integration of zodiac signs in various parts of the script --- added celebrities birthdays with a switch to load or not the file--- added celebcmd ,... works like findcmd but for celebrities--- added switch for displaying birthday in topic-- Small mod by Cêñoßy†ê 21/03/2006--- removed celebrity part--- removed You Are a xxxxx!!! when someone adds b-day--- added rightclick--- added option to reg or unreg bot in userlist--- removed TopicShow from settings (mayby forgotten thing there,allready was titshow)--- changed settings table little more to my taste :P--- Made needed changes to run with Ptokax DC Hub 0.3.4.0c
--[[ Birthday Man v.4.08 - LUA 5.0/5.1 by jiten (11/29/2007) ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Based on: BirthdayMan v 3.5 by Herodes and mods by Cêñoßy†ê CHANGELOG: ¯¯¯¯¯¯¯¯¯¯ Rewritten: Whole code; Changed: Command structure to tables (Function, Permissions, RightClick and Description); Changed: B-Day table structure to Julian values; Removed: File content that was sent on B-Day; Removed: Allowed Age; Removed: Topic updater (maybe in the future); Changed: Whole B-Day counting system to os.*; Changed: Commands returned according to input (Main or PM); Changed: Many other mods that can't recall at the moment (4/12/2006); Added: addbirthday command - requested by TT (4/13/2006); Fixed: Zodiac Sign Dates - thanks to Walazo; Changed: Error message on empty !bornon result - thanks to Walazo; Changed: !birthdays' content structure to fix bad tabbing; Changed: Settings.iVer; Added: string.lower checks - thanks to Walazo (4/14/2006) Fixed: !bornon Year function - thanks to Walazo Added: sNick to keep original nick - requested by TT (4/15/2006); Changed: *t to !*t; Fixed: Birthday is at midnight - reported by TT (6/25/2006) Added: Send Text File content - requested by TT (7/6/2006) Added: Hub Topic updater - requested by UwV (7/11/2006) Added: Celebrity's feature - requested by UwV (7/15/2006) Fixed: BDayCheck function - reported by TT (7/16/2006) Fixed: Added correct tabbing for messy !birthdays - reported by [NL]_Yvisaur and UwV; Changed: !birthdays is sorted from Jan to Dez - requested by UwV; Added: Details and 'All' field to !bornon command - requested by UwV; Added: Common fields to !celeb command - requested by UwV (7/24/2006) Added: %ptodaybirthdays - requested by Yahoo (11/28/2007)]]--
when 2 users have same date you get this [15:08:57] <-TîMêßô†-> *** Error: I already have Birthday on May 16, 1966! If it wasn't correctly set, ask Operators for help!greetzz TT
[19:00:18] <B-Day> *** Your Birthday is on July 25, 1983! I didn't know you were a Leo![19:00:18] <B-Day> *** New Birthday added by jiten on: 25/07/1983[19:00:45] <B-Day> *** Your Birthday is on July 25, 1983! I didn't know you were a Leo![19:00:45] <B-Day> *** New Birthday added by test on: 25/07/1983[19:01:42] <B-Day> ================================================================================= Nr. Birthdate: Weekday: Zodiac Sign: Status: Name: ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 1 July 25, 1983 Monday Leo *Online* test 2 July 25, 1983 Monday Leo *Online* jiten
you where right i added part to add other users mysel;f and then you get the error when i log in whit other nick and do that its np sorry about that greetzz TT
--[[ Birthday Man 3.x - 4.x DB Converter by jiten (4/15/2006) Requested by: TïMê†råVêlléR Changelog: - Changed: string.lowered index; - Added: sNick to each index (4/15/2006) 1. Place your old birthdays.tbl under your scripts' folder; 2. Run this script and the new file "tBirthday.tbl" will appear in the same folder; 3. And that's it!]]--tConvert = {}Main = function() local tmp; dofile("birthdays.tbl") for i,v in pairs(tBirthdays) do if v[3] < 1970 then tmp = 1970 - v[3]; v[3] = 1970 else tmp = 0 end local tTable = { day = v[1], month = v[2], year = v[3] } tConvert[string.lower(i)] = { sNick = i, iJulian = os.time(tTable), iAdjust = tmp } end local hFile = io.open("tBirthday.tbl","w+") Serialize(tConvert,"tBirthday",hFile); hFile:close() endSerialize = function(tTable,sTableName,hFile,sTab) sTab = sTab or ""; hFile:write(sTab..sTableName.." = {\n"); for key,value in pairs(tTable) do if (type(value) ~= "function") then local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key); if(type(value) == "table") then Serialize(value,sKey,hFile,sTab.."\t"); else local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value); hFile:write(sTab.."\t"..sKey.." = "..sValue); end hFile:write(",\n"); end end hFile:write(sTab.."}");end
now i was wondering .. would you mind to add those nice extra's again ?..i will attach the version that i use (+ celebstable) it would be really nice if you could add that back in again ..
CHANGELOG:¯¯¯¯¯¯¯¯¯¯Added: Hub Topic updater - requested by UwV (7/11/2006)Added: Celebrity's feature - requested by UwV (7/15/2006)Fixed: BDayCheck function - reported by TT (7/16/2006)
but with the !birthdays command it's a mess click for pictureis it possible to get this good?
birthdays = { tFunc = function(user) if next(tBirthday) then local sMsg, n = "\r\n\t"..string.rep("=", 105).."\r\n\tNr.\tStatus:\t\tZodiac Sign:\tWeekday:".. "\tBirthdate:\t\t\tName:\r\n\t"..string.rep("-", 210).."\r\n", 0 for i, v in pairs(tBirthday) do local sStatus, sTab = "*Offline*", "\t" n = n + 1; if GetItemByName(i) then sStatus= "*Online*" end; local sDate, sWDay, sZodiac = tFunctions.JulianToDate(v) if string.len(sZodiac) < 8 then sTab = "\t\t" end sMsg = sMsg.."\t"..n..".\t"..sStatus.."\t\t"..sZodiac..sTab..sWDay.."\t\t"..sDate.. "\t\t"..v.sNick.."\r\n" end user:SendMessage(Settings.sBot, sMsg) else user:SendMessage(Settings.sBot, "*** Error: There are no saved Birthdays!") end end, tLevels = { [-1] = 1, [0] = 1, [1] = 1, [2] = 1, [3] = 1, [4] = 1, [5] = 1, }, sDesc = "\t\tShows all Birthdays", tRC = "Show all B-Days$<%[mynick]> !{}"},
First post has been updated with some changes:Code: [Select]CHANGELOG:¯¯¯¯¯¯¯¯¯¯Added: Hub Topic updater - requested by UwV (7/11/2006)Added: Celebrity's feature - requested by UwV (7/15/2006)Fixed: BDayCheck function - reported by TT (7/16/2006)
========================================================================================================= People born in the same "Field" as yours: Field: Nick: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Year UwV2; _Saartje_ Day UwV2 Month Notox; PurpleHaze; [Rus]Elpa; UwV2; [Tele2][10mbitTele2]tripsun; _tntns_
Year UwV2 25/12/1971 ; _Saartje_ 04/04/1971 Day UwV2 25/12/1971 Month ; _tntns_ 10/11/68; UwV2 25/12/1971 ;
just " Sagittarius " (in Microsoft sans serif 8 ) is too long so needs a small edit here.and i miss the "full celeb info" (it used to show all (same day nr, same moth, same year, same day month and year)and a small request .. could birthday list be sorted ?i have exact same b- day as UwV2 .. but it doesn't show the "all" field .. in the new layout (wich really does look good) i kindda miss the deatails mabye ..
CHANGELOG:¯¯¯¯¯¯¯¯¯¯Fixed: Added correct tabbing for messy !birthdays - reported by [NL]_Yvisaur and UwV;Changed: !birthdays is sorted from Jan to Dez - requested by UwV;Added: Details and 'All' field to !bornon command - requested by UwV;Added: Common fields to !celeb command - requested by UwV (7/24/2006)