PM to VIPs ONLY upon Entre
 

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

PM to VIPs ONLY upon Entre

Started by [G-T-E]Gate?, 16 March, 2004, 23:30:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[G-T-E]Gate?

Iam in need of a script/Bot that will send a PM to ONLY VIP Profile once they connect to the hub.
Then once they have read the PM they have to send a receipt back to the bot which the Master will only see.

The script will also include a Timer ( PM sent every 30min to VIP until they have sent a receipt then it will be deactivated to just that VIP that has sent hi/her receipt)
Running 3.2.6TD4 and Mean_Machine v2.1.2.2
If my wish isnt understandable I'll try again..
Greatfull in advanced
[G-T-E]Gate?

NightLitch

Well I understand you, but I don't understand why you want it like that ? why ?
//NL

[G-T-E]Gate?

Fair enough question NightLitch,
Skrollster is working on a script that Iam going to implament to my hub and I need to send a Messeege to the VIP s? I can know what ISP they have and then edit their Registeration. Thread is here >>
 Check it out
will explain more if needed..
Night Owl up late

[G-T-E]Gate?

Skrollster

don't have time to this now, and will probably not have for the rest of the week... have a lot to do now forward... :(

[G-T-E]Gate?

Skrollster thanks anyway for reading the thread.
 I know that time is short, Iam pushing 50 and between work and Play it feels..
Will be on the look out when u got time ..
Ha det :)

??????Hawk??????

this should do what your wanting m8  :-


-----------------------------------------
--Vip Message on Entry
--a confirmed message will pm the hub owner and stop spamming the vip
-- a reminder pm will be sent every hr to confirm
-- By ??????Hawk?????? 17-3-04
-----------------------------------------
HubOwner = "Your-Nick"
Botname = "entrance_confirm"
Message = "  blahh blahh  waffle  waffle .. please confim this message by typing    ' confirmed '  with out the '" 
arrVips = {}
hrs = 1000 * 60 * 60


function Main()
	frmHub:RegBot(Botname)
	SetTimer(hrs)
	StartTimer() 
end

function NewUserConnected(curUser) 
	LevelBot = GetProfileName(curUser.iProfile)
		if LevelBot == "VIP" then
			curUser:SendPM(Botname, Message)
			if (not arrVips[curUser.sName]) then
				arrVips[curUser.sName] = 1
			end
		end
end 

function DataArrival(curUser, data)
	LevelBot = GetProfileName(curUser.iProfile)
		if LevelBot == "VIP" then
			local s, e, sTo = strfind(data, "^%$To: (%S+)")
				if sTo ~= Botname then 
					return 1
				else
					local s,e,cmd,d = strfind(data, "%b<>%s+(%S+)(%S+)") 
						if cmd == "confirmed" then
							if (arrVips[curUser.sName]) then
								arrVips[curUser.sName] = nil
								SendPmToNick( HubOwner, Botname, curUser.sName.." has just confirmed they have read the message." )

							end
						end
				end
		end
end				
 

function OnTimer()
	for vips, value in arrVips do
		SendPmToNick( vips, Botname, Message )
	end
end

[G-T-E]Gate?

Thanks Hawk for ur work I really appreciate it ...

One Question, I want to make a duplicate of the script(same idea) but instead have
the messege sent to normal users can u show me what has to be changed.
Iam using Mean Machine v2.1.2.2 and 326TD4
Ty    :]

??????Hawk??????

#7
hmmm  not tested  but i think this should work

set to work on normal users and ignore VIP's



-----------------------------------------
--Vip Message on Entry
--a confirmed message will pm the hub owner and stop spamming the user
-- a reminder pm will be sent every hr to confirm
-- By ??????Hawk?????? 17-3-04
-----------------------------------------
HubOwner = "Your-Nick"
Botname = "entrance_confirm"
Message = "  blahh blahh  waffle  waffle .. please confim this message by typing    ' confirmed '  with out the '" 
arrVips = {}
hrs = 1000 * 60 * 60


function Main()
	frmHub:RegBot(Botname)
	SetTimer(hrs)
	StartTimer() 
end

function NewUserConnected(curUser) 
	LevelBot = GetProfileName(curUser.iProfile)
		if LevelBot ~= "VIP" then
			curUser:SendPM(Botname, Message)
			if (not arrVips[curUser.sName]) then
				arrVips[curUser.sName] = 1
			end
		end
end 

function DataArrival(curUser, data)
	LevelBot = GetProfileName(curUser.iProfile)
		if LevelBot ~= "VIP" then
			local s, e, sTo = strfind(data, "^%$To: (%S+)")
				if sTo ~= Botname then 
					return 1
				else
					local s,e,cmd,d = strfind(data, "%b<>%s+(%S+)(%S+)") 
						if cmd == "confirmed" then
							if (arrVips[curUser.sName]) then
								arrVips[curUser.sName] = nil
								SendPmToNick( HubOwner, Botname, curUser.sName.." has just confirmed they have read the message." )

							end
						end
				end
		end
end				
 

function OnTimer()
	for vips, value in arrVips do
		SendPmToNick( vips, Botname, Message )
	end
end

[G-T-E]Gate?

Hawk , Iam not sure if Im going blind of just aged some more but the 2 script look very much alike , no change , usersprofile is still messege to VIP in both. Please tell me Iam wrong and where.
function NewUserConnected(curUser)
   LevelBot = GetProfileName(curUser.iProfile)
      if LevelBot ~= "VIP" then
         curUser:SendPM(Botname, Message)
         if (not arrVips[curUser.sName]) then
            arrVips[curUser.sName] = 1

??????Hawk??????

#9
lol  yeh not too bigger change but

notice the 2 lines
if LevelBot == "VIP" then
this is, if it equals VIP


changed to:-

if LevelBot ~= "VIP" then
this is, if it does not equal VIP

[G-T-E]Gate?

OKay , u got me Ty

[G-T-E]Gate?

OK just ran a test on both scripts.
They work perfectly sending the messege to the correct Profile and the confirmed messege is received by Hub Owner.
Just one problem though, Ever time the VIP or NonVIP reconnects to the hub he gets the messege again and again.
Now how to get the script to reconise that the User has confirmed as not to send it back again...
In no rush , will be keeping an eye out for a responce.
Great work so far and Damn  quick if I may say so, Cheers  :D

??????Hawk??????

try this m8.  



-----------------------------------------
--Vip Message on Entry
--a confirmed message will pm the hub owner and stop spamming the VIP
-- a reminder pm will be sent every hr to confirm
-- By ??????Hawk?????? 17-3-04
-----------------------------------------
HubOwner = "Your-Nick"
Botname = "entrance_confirm"
Message = "  blahh blahh  waffle  waffle .. please confim this message by typing    ' confirmed '  with out the '" 
arrVips = {}
arrStore = {}
hrs = 1000 * 60 * 60


function Main()
	frmHub:RegBot(Botname)
	SetTimer(hrs)
	StartTimer() 
end

function NewUserConnected(curUser) 
	LevelBot = GetProfileName(curUser.iProfile)
		if LevelBot == "VIP" then
			if (not arrStore[curUser.sName]) then
				curUser:SendPM(Botname, Message)
				if (not arrVips[curUser.sName]) then
					arrVips[curUser.sName] = 1
				end
			end
		end
end 

function DataArrival(curUser, data)
	LevelBot = GetProfileName(curUser.iProfile)
		if LevelBot == "VIP" then
			local s, e, sTo = strfind(data, "^%$To: (%S+)")
				if sTo ~= Botname then 
					return 1
				else
					local s,e,cmd,d = strfind(data, "%b<>%s+(%S+)(%S+)") 
						if cmd == "confirmed" then
							if (arrVips[curUser.sName]) then
								arrVips[curUser.sName] = nil
								arrStore[curUser.sName] = 1
								SendPmToNick( HubOwner, Botname, curUser.sName.." has just confirmed they have read the message." )

							end
						end
				end
		end
end				
 

function OnTimer()
		for vips, value in arrVips do
			SendPmToNick( vips, Botname, Message )
		end
end

[G-T-E]Gate?

Thanks HK will run the test after work..
Cheers

SMF spam blocked by CleanTalk