Bit of help please ....
 

News:

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

Bit of help please ....

Started by Tw?sT?d-d?v, 14 February, 2008, 20:20:32

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tw?sT?d-d?v

Ive been working on a anti-advert script for the new api and i would like to know the best way to make a cmd add a word to a .TBL file

Here is rough script so far ...   
-------------------------------------------------------------------------------- 
-- Simple Anti-Advert Blocker 
-- Added allowed profile option
-- Added .TBL file 
-------------------------------------------------------------------------------- 
---   Config Stuff
	  
Antiadds = { 
             adds = "adds.tbl",
}
Allowed = {
                      [0] = 1,	 -- Master
                      [1] = 0,	 -- Operator
                      [2] = 0,   -- VIP
                      [3] = 0,   -- Reg
                      [-1] = 0,  -- User
}
Messagetosend = {
                   mess = "Sorry, your PM was blocked. Please use main chat to post adverts!"
}
Bot = {
       bot = "{-Twisteds-Soul-}"
}
-------------------------------------------------------------- 
OnStartup = function()
	if loadfile(Antiadds.adds) then dofile(Antiadds.adds) end
end

Bot = Bot.bot
function ToArrival(user,data)
	Core.GetUserAllData(user) 
	if user.iProfile ~= 0 then
		for key,a in pairs(adds) do 
			if( string.find(string.lower(data), key) ) then 
				Core.SendPmToNick(user.sNick,Bot, (Messagetosend.mess))  
				return true 
			end 
		end 
	end 
end


Ive looked at other scripts but cant get my head round it  ....   

Tw?sT?d-d?v

Nice  ty :)     
Ive noticed in the notes of the px rc builds that the Lua has bee upgraded.     
Upgraded: Lua to 5.1.3.
Are there any main differances between the lua previous?

Tw?sT?d-d?v

Cool tyvm   
btw  when does the  "Mutor manual"  come out    :P

SMF spam blocked by CleanTalk