Need help with script.
 

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

Need help with script.

Started by Joker, 03 December, 2003, 13:57:57

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joker

Can anyone tell me why this script dont work with PtokaX TestDrive 4 ?

Code:






bot
="SearchNotifier" 


trigs = { 

lolita="[USER] shares/is looking for lolita porn"
preteen="[USER] shares/is looking for preteen porn"
incest="[USER] shares/is looking for incest porn"
animalsex="[USER] shares/is looking for sex with animals"
animalfuck="[USER] shares/is looking for sex with animals"
horsesex="[USER] shares/is looking for sex with animals"
horsefuck="[USER] shares/is looking for sex with animals"
rape="[USER] shares/is looking for rape stuff"
nazi="[USER] shares/is looking for nazistuff"






function 
DataArrival(userdata

	
	
if ((
strlower(strsub(data,1,3))=="$sr")or(strlower(strsub(data,1,7))=="$search")) then 
	
	
	

	
	
	
for 
keyvalue in trigs do 

	
	
if( 
strfindstrlower(data), key) ) then 

	
	
	
answergsub(value"%b[]"user.sName)
 
	
	
	
SendToAll(botanswer 

	
	
	
end

	
	
end

	
end

end



Please help me  :(  !

pHaTTy

hi there, well sr i think is SR yes


bot="SearchNotifier" 


trigs = { 

lolita="[USER] shares/is looking for lolita porn", 
preteen="[USER] shares/is looking for preteen porn", 
incest="[USER] shares/is looking for incest porn", 
animalsex="[USER] shares/is looking for sex with animals", 
animalfuck="[USER] shares/is looking for sex with animals", 
horsesex="[USER] shares/is looking for sex with animals", 
horsefuck="[USER] shares/is looking for sex with animals", 
rape="[USER] shares/is looking for rape stuff", 
nazi="[USER] shares/is looking for nazistuff"


} 



function DataArrival(user, data) 

        if ((strlower(strsub(data,1,3))=="$SR")or(strlower(strsub(data,1,7))=="$Search")) then 
            
            for key, value in trigs do 

        if( strfind( strlower(data), key) ) then 

            answer, x = gsub(value, "%b[]", user.sName)
 
            SendToAll(bot, answer ) 

            end

        end

    end

end

yep that shud work


hmmm im not sure i think search data 1, 13

bot="SearchNotifier" 


trigs = { 

lolita="[USER] shares/is looking for lolita porn", 
preteen="[USER] shares/is looking for preteen porn", 
incest="[USER] shares/is looking for incest porn", 
animalsex="[USER] shares/is looking for sex with animals", 
animalfuck="[USER] shares/is looking for sex with animals", 
horsesex="[USER] shares/is looking for sex with animals", 
horsefuck="[USER] shares/is looking for sex with animals", 
rape="[USER] shares/is looking for rape stuff", 
nazi="[USER] shares/is looking for nazistuff"


} 



function DataArrival(user, data) 

        if ((strlower(strsub(data,1,3))=="$SR")or(strlower(strsub(data,1,13))=="$Search")) then 
            
            for key, value in trigs do 

        if( strfind( strlower(data), key) ) then 

            answer, x = gsub(value, "%b[]", user.sName)
 
            SendToAll(bot, answer ) 

            end

        end

    end

end


i cud be wrong :/
Resistance is futile!

Joker

Hi.
 I tryed bouth , but they dont do anything.
I need that message to be seen in main chat .
I tryed to search but nothing happend.

plop

frmHub:EnableSearchData(n) ... enables/disables passing of $Search, $MultiSearch and $SR to current script.
your gone need 2 add the next part in the script.
function Main()
frmHub:EnableSearchData(1)
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Joker

Nope. Still nothin happend.

Script look like this now:

bot="SearchNotifier" 


trigs = { 

lolita="[USER] shares/is looking for lolita porn", 
preteen="[USER] shares/is looking for preteen porn", 
incest="[USER] shares/is looking for incest porn", 
animalsex="[USER] shares/is looking for sex with animals", 
animalfuck="[USER] shares/is looking for sex with animals", 
horsesex="[USER] shares/is looking for sex with animals", 
horsefuck="[USER] shares/is looking for sex with animals", 
rape="[USER] shares/is looking for rape stuff", 
nazi="[USER] shares/is looking for nazistuff"


} 


function Main()
frmHub:EnableSearchData(1)
end


function DataArrival(user, data) 

        if ((strlower(strsub(data,1,3))=="$SR")or(strlower(strsub(data,1,13))=="$Search")) then 
            
            for key, value in trigs do 

        if( strfind( strlower(data), key) ) then 

            answer, x = gsub(value, "%b[]", user.sName)
 
            SendToAll(bot, answer ) 

            end

        end

    end

end

tezlo

#5
lol..
if strsub(strlower(data), 1, 3) == "$SR" (never)
1, 13 are you making them numbers up ?
the only thing missing was enablesearchdata
trigs = { 
lolita="[USER] shares/is looking for lolita porn", 
preteen="[USER] shares/is looking for preteen porn", 
incest="[USER] shares/is looking for incest porn", 
animalsex="[USER] shares/is looking for sex with animals", 
animalfuck="[USER] shares/is looking for sex with animals", 
horsesex="[USER] shares/is looking for sex with animals", 
horsefuck="[USER] shares/is looking for sex with animals", 
rape="[USER] shares/is looking for rape stuff", 
nazi="[USER] shares/is looking for nazistuff"
} 

function Main()
	frmHub:EnableSearchData(1)
end

function DataArrival(user, data) 
	if strsub(data, 1, 3) == "$SR" or strsub(data, 1, 7) == "$Search" then 
		data = strlower(data)
		for key, value in trigs do
			if strfind(data, key, 1, 1) then 
				local answer = gsub(value, "%b[]", user.sName)
				SendToAll("mom", answer)
			end
		end
	end
end

Joker

Thank you.
Now it work  :D

Joker

Hi.

What command do i need to use , if i want message only to SU+ , not for OP:s ?

Is there SendPmToSu command or something like that?
I dont know , why i get all messages in main chat , even if i use SendPmToOps commant. Still i get message in main chat.

Joker

Hi.

What command do i need to use , if i want message only to SU+ , not for OP:s ?

Is there SendPmToSu command or something like that?
I dont know , why i get all messages in main chat , even if i use SendPmToOps commant. Still i get message in main chat.
Can anyone please tell me , how can script send warn messages only to hub owner , not for OP:s

BlazeXxX

Hmmm.. I guess it needs a table there in the script.. not sure.. Tezlo,Plop,Phatty,Optimus are the ppl you shoud seek for help on this matter :P

tezlo

here..
function SendPmTo(profile, from, what)
	local table = GetUsersByProfile(profile)
	for id, name in table do SendPmToNick(name, from, what) end
end

SendPmTo("SuperOP", "botname", "message")

note that if you dont register the botname..
messages will either display in main or get ignored (client issue)

BlazeXxX

Here is something bit more useful, but not tested..


-- Start copying from here
-- Modified by BlazeX
-- Written by Tezlo
Bot = "Granny"

trigs = {
lolita="[USER] shares/is looking for lolita porn",
preteen="[USER] shares/is looking for preteen porn",
incest="[USER] shares/is looking for incest porn",
animalsex="[USER] shares/is looking for sex with animals",
animalfuck="[USER] shares/is looking for sex with animals",
horsesex="[USER] shares/is looking for sex with animals",
horsefuck="[USER] shares/is looking for sex with animals",
rape="[USER] shares/is looking for rape stuff",
nazi="[USER] shares/is looking for nazistuff"
}

function Main()
frmHub:RegBot(Bot)
frmHub:EnableSearchData(1)
end

function DataArrival(user, data)
   if strsub(data, 1, 3) == "$SR" or strsub(data, 1, 7) == "$Search" then
      data = strlower(data)
      for key, value in trigs do
         if strfind(data, key, 1, 1) then
            local answer = gsub(value, "%b[]", user.sName)
            function SendPmTo(SuperOP, Bot, answer)
            local table = GetUsersByProfile(profile)
            for id, name in table do SendPmToNick(cur.sUser, Bot, answer) end
            end
         end
      end
   end
end

tezlo

bot = "search-spy"

trigs = { "lolita", "preteen", "incest", "animalsex", "animalfuck", "horsesex", "horsefuck", "rape", "nazi" }

function Main()
	frmHub:RegBot(bot)
	frmHub:EnableSearchData(1)
end

function SendPmTo(profile, from, what)
	local table = GetUsersByProfile(profile)
	for id, name in table do SendPmToNick(name, from, what) end
end

function DataArrival(user, data) 
	if strsub(data, 1, 3) == "$SR" or strsub(data, 1, 7) == "$Search" then 
		data = strlower(strsub(data, 9, -1))
		SendToNick("tezlo", ">> "..data)
		for id, value in trigs do
			if strfind(data, value, 1, 1) then 
				SendPmTo("SuperOP", bot, user.sName.." is looking for: "..value)
			end
		end
	end
end

Joker

Now it work .  :D
Thank you tezlo.

SMF spam blocked by CleanTalk