Invitation script (read more inside)
 

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

Invitation script (read more inside)

Started by Snooze, 14 February, 2004, 16:14:13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Snooze

Hey guys,

Once again im in need of your expert advice/help.

Im looking for a script that will do the following:

Send a PM or private msg in the hub when a user with the following specs enters

1) Not regged in hub
2) Not an Op
3) Have xx GB or more

I know that there is scripts out there that will do parts of this, but as my lua skills are limited I have not yet succeded in this.

I would prefer that the msg is called from a txt file and that the msg could be both triggered and send as adefault msg.

Any help will be great :)


/Snooze

nErBoS

Hi,

Hope it helps....

-- Requested by Snooze
-- Made by nErBoS

Bot = "PMmer" 
bshare = "bshare.txt" -- In script folder

BigShare = 8 -- In GB

function Main() 
frmHub:RegBot(Bot)
end 

function NewUserConnected(user)
if not(GetProfileName(user.iProfile) == "Reg" or GetProfileName(user.iProfile) == "Vip") then
	s,e,share = strfind(user.sMyInfoString, "$MyINFO $ALL [^$]+$ $[^$]*$[^$]*$([^$]+)")
	share = share / (1024*1024*1024)
	if (share >= BigShare) then
	Readtextfile(user, bshare)
	end
end
end 


function Readtextfile(user, file)
   	local filecontents = ""
	local handle = openfile(file, "r")
	if (handle ~= nil) then
		local line = read(handle)
		while line do
        	filecontents = filecontents..line.."\r\n"
		line = read(handle)
		end
		closefile(handle)
      	user:SendPM(Bot, filecontents)
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

Snooze

Thanks nErBoS !

Thats just the help i needed :) I'll just add a trigger section to this one and it will be perfect :D

Thanks again,

/Snooze

Smulf

Thnx nErBoS! greatz script:D Just what I needed...
[Smulf]

Snooze

Hey nErBoS,

I've now been running this script for a few days, and just wanted to let you know that its working perfectly !!

Thanks again :-)

**Snooze

nErBoS

Hi,

Don't need to thanks i'm here to help where i can :)

Best regards, nErBoS
--## nErBoS Spot ##--

SMF spam blocked by CleanTalk