advertiser with timer and !ad command
 

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

advertiser with timer and !ad command

Started by b_w_johan, 05 October, 2004, 15:05:50

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

b_w_johan

i have this peace of script now i borrowd it from another script and adjusted it a bit..... so this is what i have at this moment.

TimeSpanInMinutes = 1


sHubName = frmHub:GetHubName()
sNetwork = "MARGMAR Dutch Division"
sHubAdress = "johan-hub.no-ip.info"
sSiteAdress = "johan-site.no-ip.info"
sFtpAdress = "ftp://82.172.20.253"





function OnTimer()
   SendAdMessage()
end

function SendAdMessage()

   sHubAdMessage = "Welkom in deze coole hub" .."\r\n"..
         "Groetjes Johan en de OPs" .."\r\n"..
         "?Network?    : "..sNetwork.." ".."\r\n"..
         "?Hub Name   : "..sHubName.."\r\n"..
         "?HubAddress    : "..sHubAdress.." ".."\r\n"..
         "?WebAddress    : "..sSiteAdress.." ".."\r\n"..
         "?FtpAddress    : "..sFtpAdress.." ".."\r\n"..
                "?Thank you for visiting. Hope you enjoy your stay.".."\r\n"

   SendToAll(BOTname, sHubAdMessage)
end


function Main()
   SetTimer(TimeSpanInMinutes*60000)
   StartTimer()
end

the problem is.....
there comes no ad...
im waiting for half an hour now and still nothig what's wrong???
and im still looking for "!show ad" part for the main chat commando or if you speak PM it will be shown in PM only

hope someone nows what to do??

maybe a link to a script wich has eveything i asked nut i don't need a complete script like Robocop or Guardian or whatever "Big" scripts there are.

Greetings,
Johan
checkout http://wwhublist.com/index.php for my World Wide HubList project!

[UK]Madman

It looks like the problem with the timed ad is the line...

SendToAll(BOTname, sHubAdMessage)

Because there is no bot name set anywhere in the script. Adding something like

BOTname = "BOT_NAME_HERE"

to the top of the script will solve this one.  As for the command bit, ill make something up soon.

enema

I havent used this one, but it looks awesome! Just edit some parts as you need:

--AdTimer 1.1
--
--by Mutor
--
--Yet another Hub Advert script
--Sends hub Advert on timer or by command
--
--
--User Settings-------------------------------------------------------------------------------------
bot = "HubAd"						-- Name for bot
mins = 120 						-- Interval [in minutes] between Ads
Hubaddy = "mutor.no-ip.com" 				-- Duh?
HubOwner = "Mutor"					-- Duh?
Prefix = "!"						-- Set Command Prefix
AdComm = "ad"						-- Command to send Ad immediately
TZone = " -5 GMT [EST]"					-- Time Zone hub resides in
HubMsg1 = "Here, you can put announcements"		-- Additional notices/info to be sent with ad
HubMsg2 = "or other information or..."			-- Additional notices/info to be sent with ad
HubMsg3 = "Nothing at all !"				-- Additional notices/info to be sent with ad
--End User Settings----------------------------------------------------------------------------------

function Main() 
	SetTimer(mins*60000) 
	StartTimer() 
end 

function DataArrival(user, data)
	s,e,cmd = strfind(data, "%b<>%s+(%S+)(%S+)")
	if (cmd==Prefix..AdComm) and user.bOperator then
		OnTimer()  
	end
end

function OnTimer() 
	local tmp
	tmp = "\r\n\r\n\t---<>-------------------------------------------------------------------------------------<>---\r\n"  
	tmp = tmp.."\t\t[ "..frmHub:GetHubName().." ]\r\n" 
	tmp = tmp.."\t---<>-------------------------------------------------------------------------------------<>---\r\n" 
	tmp = tmp.."\tHub Name: \t"..frmHub:GetHubName().."\r\n"	-- add/remove tabs ' \t '  ...to center hub name 
	tmp = tmp.."\tHub Owner: \t"..HubOwner.."\r\n" 
	tmp = tmp.."\tHub Addy: \t"..Hubaddy.."\r\n" 
	tmp = tmp.."\tHub Time: \t( "..date("%H:%M").." ) -- "..TZone .."\r\n"
	tmp = tmp.."\tHub Desc: \t"..frmHub:GetHubDescr().."\r\n" 
	tmp = tmp.."\tRedirect To: \t"..frmHub:GetRedirectAddress().."\r\n"
	tmp = tmp.."\tReg Server: \t"..frmHub:GetRegServer().."\r\n"  
	tmp = tmp.."\tRedirect All: \t"..RedirAll().."\r\n" 
	tmp = tmp.."\tRedirect Full: \t"..RedirFull().."\r\n" 
	tmp = tmp.."\tMax Users: \t"..frmHub:GetMaxUsers().."\r\n" 
	tmp = tmp.."\tMin Share: \t"..frmHub:GetMinShare().."\r\n"
	tmp = tmp.."\tHub Share: \t"..frmHub:GetCurrentShareAmount().."\r\n"
	tmp = tmp.."\tMasters Online: \t"..cProfile("Master").."\r\n" 
	tmp = tmp.."\tOps Online: \t"..cProfile("Operator").."\r\n" 
	tmp = tmp.."\tVips Online: \t"..cProfile("VIP").."\r\n"
	tmp = tmp.."\tRegs Online: \t"..cProfile("REG").."\r\n"
	tmp = tmp.."\t---<>-------------------------------------------------------------------------------------<>---\r\n" 
	tmp = tmp.."\tTotal Online: \t"..frmHub:GetUsersCount().."\r\n" 
	tmp = tmp.."\t---<>-------------------------------------------------------------------------------------<>---\r\n" 
	tmp = tmp.."\tNotice(s):\r\n"
	tmp = tmp.."\t-- "..HubMsg1.."\r\n"
	tmp = tmp.."\t-- "..HubMsg2.."\r\n"
	tmp = tmp.."\t-- "..HubMsg3.."\r\n"
	tmp = tmp.."\t---<>-------------------------------------------------------------------------------------<>---\r\n" 
	SendToAll(bot,tmp)
end

function RedirAll() 
	local rdstatusall = frmHub:GetRedirectAll()
	local rastatus = ""
	if rdstatusall == 1 then
		rastatus = "on"
	else
		rastatus = "off"
	end
	return rastatus
end 

function RedirFull()
	local rdstatusfull = frmHub:GetRedirectFull()
	local rfstatus = 0
	if rdstatusfull == 1 then
		rfstatus = "on"
	else
		rfstatus = "off"
	end
	return rfstatus
end 

--// Profile Counter
function cProfile(what)
	local disp = ""
	local table,online,offline = GetUsersByProfile(what),0,0
	for i, User in table do 
		if GetItemByName(User) then
			online = online + 1
		else
			offline = offline + 1
		end
	end
	disp = disp.."Online: "..online.."\tOffline: "..offline
	return disp
end

b_w_johan

thx both,
ill try it now.
lol i copyt this part of my script.. and deleted the part with botname lol..

enema within a few min ill tell you if its as awesome as it looks  :))
checkout http://wwhublist.com/index.php for my World Wide HubList project!

SMF spam blocked by CleanTalk