birthday script - Page 2
 

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

birthday script

Started by kash?, 04 April, 2005, 11:52:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vadertje

my hub addy is whitenation.dyndns.dk

i can give you also my email maybe easyer to talk and to explaine

?Tr??T_????

#26
hey hey hey plz plz help urgent...

i rmoved this birthday bot and my topic isnt chnging...
what i do plz urgent

Madman

QuoteOriginally posted by ?Tr€€T_????
hey hey hey plz plz help urgent...

i rmoved this birthday bot and my topic isnt chnging...
what i do plz urgent

use the cmd's
!topic off
!topic
!restartscripts
!restart


Try thoose...
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

sander815

if i want to put a short description in the hub's description of the bot( f.i.: add your birthday, type !bhelp) what do i have to add?

Syphrone-NL

QuoteOriginally posted by madman
QuoteOriginally posted by ?Tr€€T_????
hey hey hey plz plz help urgent...

i rmoved this birthday bot and my topic isnt chnging...
what i do plz urgent

use the cmd's
!topic off
!topic
!restartscripts
!restart


Try thoose...


I got this damn problem to cant the topic away tryed all the commands you give.

I also changed in the script the topic to another topic but it doesnt work i still get the first topic.

HELP
Owner of 2 public hubs in Palace Network ---> www.palace-network.nl

kunal

try changing the topic in the ptokax----network tab

Syphrone-NL

QuoteOriginally posted by kunal
try changing the topic in the ptokax----network tab

I have tryed this now but i doesnt work either i also changed in the script this:

frmHub:SetHubName(topic.." - Today is the birthday of the following user"..tit)

to this:

frmHub:SetHubName(topic.." - ..tit")


doesnt work either still get:

Today is the birthday of the following user Syphrone-NL

Any suggest???
Owner of 2 public hubs in Palace Network ---> www.palace-network.nl

kunal

have u edited this in the script
TopicShow = 0         --- to display the birthday nicks in the Hub's Topic ... ( 1/0 : enabled / disabled )
disable it and then remove the topic from the ptokax network tab

Syphrone-NL

Yes i did that kunal i didnt work either and i know now why i found the soluction

He didnt putt it in the topic but he putt the birthday in the hubs name

So i needed to change the hubname not the topic
Owner of 2 public hubs in Palace Network ---> www.palace-network.nl

kunal

i m happy that u finally found the solution to ur problem

Syphrone-NL

but i think that somebody need to change the script then that it comes really in the topic not in the hubname
Owner of 2 public hubs in Palace Network ---> www.palace-network.nl

UwV

QuoteOriginally posted by Syphrone-NL
but i think that somebody need to change the script then that it comes really in the topic not in the hubname

i think you can do it Syphrone,.. look :

just try change this.. :

--------------------------------------	
	topic = frmHub:GetHubName()
	frmHub:SetHubName(topic.." - Today is the birthday of the following user"..tit)
to:
	topic = frmHub:GetHubTopic()
	frmHub:SetHubTopic(topic..tit)" - Today is the birthday of the following user"..tit)
---------------------------------------

or maybe even this...
(if i am not wrong this is a little neater since it won't change the topic if there is no user's birthday)
-----------------------------------
	if titshow ~= 0 then
		local tit = ""
		local ct = 0
		for i,v in tNow do 
			if ct == 0 then
				tit = " "..v
			else
				tit = tit..", "..v
			end
			ct = ct +1
		end	
		if ct ~= 0 then
			if ct > 1 then
				tit = " Today is the birthday of the following user's"..tit..", Send them a PM *-<;o)"
			end
			if ct == 1 then
				tit = " Today is the birthday of:"..tit..", Send a PM *-<:oP"
			end
			topic = frmHub:GetHubTopic()
			frmHub:SetHubTopic(topic..tit)
		end
	end
-------------------------------------------
neither way is tested ... i just "think to know" it will work..
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

UwV

--	for prevention of repeating of topic....
		--	topic = frmHub:GetHubTopic()
		--	frmHub:SetHubTopic(topic..tit)
			frmHub:SetHubTopic(tit)					
		end
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

UwV

This one is "tested" ..

DefTopic = "Today there is no user to celebrate the birthday of.. maybe we need another topic for today ? ;0)"

function CheckBirthdays()
	tNow = {}
	local count = 0
	local yeah = nil
	for i, v in tBirthdays do
		if tBirthdays[i][2] == tonumber(os.date("%m")) then
			if tBirthdays[i][1] == tonumber(os.date("%d")) then
				if GetItemByName(i) then
					local happy = GetItemByName(i)
					DoHappyBirthday(happy)
					yeah = 1
				end
				count = count + 1
				if yeah == nil then
					tNow[count] = "("..i..")"
				else 
					tNow[count] = i
				end
			end
		end
		yeah = nil
	end
	if titshow ~= 0 then
		local tit = ""
		local ct = 0
		for i,v in tNow do 
			if ct == 0 then
				tit = " "..v
			else
				tit = tit..", "..v
			end
		ct = ct +1
		end	
		if ct ~= 0 then
			if ct > 1 then
				tit = "Today is the birthday of the following user's"..tit..", Send them a PM *-<;o)"
			end
			if ct == 1 then
				tit = "Today is the birthday of:"..tit..", Send a PM *-<:oP"
			end
			frmHub:SetHubTopic(tit)					
		else
			topic = frmHub:GetHubTopic()
			if topic == nil then
				topic = DefTopic
			end
			if string.sub(topic, 1, 24) == "Today is the birthday of" then
				frmHub:SetHubTopic(DefTopic)
			end
		end
	end
end

this fixes the problem of doubling topic, dont hang if no topic and set the topic to a default value if there is no birthday.
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

SMF spam blocked by CleanTalk