PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: Metaphase on 30 April, 2006, 19:27:23

Title: Text File Messaging Script Request.
Post by: Metaphase on 30 April, 2006, 19:27:23
Hi all.

Its been some time since I last posted on this site, and I must say things have changed a fair bit since then. Lots of new faces.? :) I have tried seaching for scripts that might do what I need but I could not find any. If there are any existing posts the please point me in the right direction.

I am looking for an LUA 5 script that will call specified text files from the ptokax text folder and post them either in main or pm. I need this script to be customisable in the respect of the following...

Able to change access rights by profile with right click accessability. Something like this if possible...

function NewUserConnected(user)
if sTable.tAllowList[user.iProfile] == 1 then
user:SendData("$UserCommand 1 1 "..sTable["Menu"].."\\Mass Message\\Send to Main$<%[mynick]> !hson&#124;|")
user:SendData("$UserCommand 1 1 "..sTable["Menu"].."\\Mass Message\\Send to PM$<%[mynick]> !hsoff&#124;|")
end
? SetTimer(1000)
? StartTimer()
end

OpConnected = NewUserConnected



tAllowList = {
[0] = 1, --// Master Profile (enabled)
[1] = 1, --// Ops Profile (enabled)
[2] = 1, --// VIP Profile (enabled) ? ? ? ? ? ? ? ? ? ?--// Profiles Allowed to use the command? 1 = yes? / 0 = No
[3] = 0, --// REG Profile (Disabled)
[4] = 1, --// Moderator Profile (enabled)
[5] = 1, --// Netfounder Profile (enabled)
},


Obviously incomplete!? ;)

Although access to starting the script would be limitted to the allow list, it would need to be seen by all users or designated user profiles. It would also need to ask for the name of the .txt file you would like to send.

Any help you guys can offer would be appricated.
Title: Re: Text File Messaging Script Request.
Post by: Metaphase on 01 May, 2006, 03:55:35
Nice one Mutor. That script done exactly what I needed it to do. All working fine.

*note to other users:? If you intend on using this script, make sure you visit http://thewildplace.dk/ and download the PxUtilities and Dependancies. This script will not work otherwise.