Modify this trigger please
 

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

Modify this trigger please

Started by BoyKind, 08 August, 2006, 11:58:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BoyKind

How can I block some words in that script ? For example when I type "hello", the bot answers, but as an example, when I type "helloz", the bot still answers ... how can I block that word so when I type "helloz" the bot won't answer ? This is the script code
Bot = frmHub:GetHubBotName()

trigall=1

trigw = {

lol={
"hahaha [CURUSER] ce funny esti :))",
"hehe",
"hahaha",
"lmao",
"rofl",
":D",
":))",
":)"
},

hmm={
"linste!!! pt ca [CURUSER] se gandeste :)",
"la ce te gandesti [CURSUER] ?",
"ganditori mai sunteti in ziua de azi :) la fel si [CURSUER]"
},

fav={
"Da [CURUSER], incearca asa -----> /fav ",
"Hmm, cred ca este asa, omule ;) -----> /fav ",
"incearca asta [CURUSER] -------> /fav ",
"[CURUSER], asa va merge :) -----> /fav ",
"Cred ca /fav va merge mai bine [CURUSER] ;-) "
},

funny={
"chiar ca-i amuzant [CURUSER]",
"hehe",
"lol",
"lmao",
"rofl",
":))"
},

hehe={
"hahaha [CURUSER] ce funny esti :))",
"haha",
"lol",
":)",
":D",
"lmao",
"rofl",
":))"
},

haha={
"hehehe [CURUSER] ce funny esti :))",
"hehe",
"lol",
":)",
":D",
"lmao",
"rofl",
":))"
},

rofl={
"hahaha [CURUSER] ce funny esti :))",
"hehe",
"lol",
"lmao",
":D",
"rofl",
":))"
},

lmao={
"hahaha [CURUSER] ce funny esti :))",
"hehe",
"lol",
":)",
":D",
"haha :D",
"rofl",
":))"
},

brb={
"Te asteptam [CURUSER]",
"Sa nu stai mult [CURUSER] .....*sniff*",
"[CURUSER] Nu pleci nicaieri!!! Hehe, glumeam doar :) daca trebuie sa pleci, trebuie sa pleci :) pa pa",
"*Sniff* ne vei lipsi [CURUSER] :'( ",
"ok [CURUSER]",
"Ai alte lucruri mai bune de facut [CURUSER] ? Asa-i ?",
"nu plecaaaaaa :((((((( ....... just kidding :D"
},

bye={
"Ne mai vedem, [CURUSER]",
"Pa pa, [CURUSER]",
"[CURUSER] Nu pleci nicaieri!!! Hehe, glumeam doar :) daca trebuie sa pleci, trebuie sa pleci :) pa pa",
"*Sniff* ne vei lipsi [CURUSER] :'( ",
"Pe curand [CURUSER]",
"Deja pleci?!",
"pa [CURUSER]",
"pleci asa devreme [CURUSER]?",
"Ai alte lucruri mai bune de facut [CURUSER] ? Asa-i ?",
"Haide, du-te, dar in curand te vei intoarce :)"
},

["pa"]={
"Ne mai vedem, [CURUSER]",
"Pa pa, [CURUSER]",
"[CURUSER] Nu pleci nicaieri!!! Hehe, glumeam doar :) daca trebuie sa pleci, trebuie sa pleci :) pa pa",
"*Sniff* ne vei lipsi [CURUSER] :'( ",
"Pe curand [CURUSER]",
"Deja pleci?!",
"pa [CURUSER]",
"pleci asa devreme [CURUSER]?",
"Ai alte lucruri mai bune de facut [CURUSER] ? Asa-i ?",
"Haide, du-te, dar in curand te vei intoarce :)"
},

hello={
"Hello [CURUSER]",
"Hey [CURUSER]",
"Wassup [CURUSER]",
"Hi [CURUSER]",
"Hey [CURUSER], ce faci?",
"Howdy [CURUSER]!",
"Salut, [CURUSER]",
"Sal [CURUSER]",
"[CURUSER], te cunosc de undeva?"
},

hi={
"Hello [CURUSER]",
"Hey [CURUSER]",
"Wassup [CURUSER]",
"Hi [CURUSER]",
"Hey [CURUSER], ce faci?",
"Howdy [CURUSER]!",
"Salut, [CURUSER]",
"Sal [CURUSER]",
"[CURUSER], te cunosc de undeva?"
},

["sal"]={
"Hello [CURUSER]",
"Hey [CURUSER]",
"Wassup [CURUSER]",
"Hi [CURUSER]",
"Hey [CURUSER], ce faci?",
"Howdy [CURUSER]!",
"Salut, [CURUSER]",
"Sal [CURUSER]",
"[CURUSER], te cunosc de undeva?"
},

["salut"]={
"Hello [CURUSER]",
"Hey [CURUSER]",
"Wassup [CURUSER]",
"Hi [CURUSER]",
"Hey [CURUSER], ce faci?",
"Howdy [CURUSER]!",
"Salut, [CURUSER]",
"Sal [CURUSER]",
"[CURUSER], te cunosc de undeva?"
},

["bot"]={
"Bots suck!",
"Un bot?",
"Eu? nu prea cred...",
"Sunt cat se poate de uman...",
"ce-i un bot?",
"Sper ca nu crezi ca pe mine ma cheama 'Bot' nu?",
"Vrei sa spui ca eu sunt o masinarie? Un program? :'(",
"EU?! HAHA!",
"Sunt o persoana reala!",
"Eu nu sunt sunt un BOT! EU sunt un om adevarat!",
"Poate ca sunt prost, dar nu sunt un bot!",
"Poate ca sunt confuz, dar nu sunt un robot!",
"Te asigur ca sunt la fel de real precum esti tu!",
"Stiu ca tu esti un bot,dar eu ce sunt ?",
"<- - - o persoana adevarata in carne si oase!",
"Omorati toti botii !",
"Cine-i un bot?!",
"un bot? unde?",
"un bot? aici ?!",
"Ma idoi ca este vreun bot p'aci",
"Cine ti-a spus asa ceva?",
"Eu NU sunt un bot!",
"Eu sunt prea real, imi cer scuze...",
"Sunt un om adevarat, in carne si oase",
"Iti faci o obisnuinta sa-i acuzi pe altii, asa-i [CURUSER]?"
},

sorry={
"nu te ingrijora [CURUSER]",
"nu-i nimica [CURUSER]",
"de ce iti ceri scuze?",
"e ok",
"atata timp cat iti pare rau........e ok :)",
"pentru ce [CURUSER] ?",
"Simt ca nu prea ai vrut sa spui asta...",
"nu prea par foarte sincere vorbele tale",
"chiar iti pare rau?",
"asa si ar trebui sa fii :D",
"hehe,asa si trebuie sa fii ;)"
},

sry={
"nu te ingrijora [CURUSER]",
"nu-i nimica [CURUSER]",
"de ce iti ceri scuze?",
"e ok",
"atata timp cat iti pare rau........e ok :)",
"pentru ce [CURUSER] ?",
"Simt ca nu prea ai vrut sa spui asta...",
"nu prea par foarte sincere vorbele tale",
"chiar iti pare rau?",
"asa si ar trebui sa fii :D",
"hehe,asa si trebuie sa fii ;)"
},

["scuze"]={
"nu te ingrijora [CURUSER]",
"nu-i nimica [CURUSER]",
"de ce iti ceri scuze?",
"e ok",
"atata timp cat iti pare rau........e ok :)",
"pentru ce [CURUSER] ?",
"Simt ca nu prea ai vrut sa spui asta...",
"nu prea par foarte sincere vorbele tale",
"chiar iti pare rau?",
"asa si ar trebui sa fii :D",
"hehe,asa si trebuie sa fii ;)"
},

yeah={
"yes",
"yup",
"uh huh",
"100%",
"you bet",
"uh-hu",
"oh yes",
"desigur",
"affirmativ",
"asa e!",
"sigur",
"corect",
"suna corect :)",
"exact!",
"vezi ca stii ?"
},

["da"]={
"yes",
"yup",
"uh huh",
"100%",
"you bet",
"uh-hu",
"oh yes",
"desigur",
"affirmativ",
"asa e!",
"sigur",
"corect",
"suna corect :)",
"exact!",
"vezi ca stii ?"
},

["dap"]={
"yes",
"yup",
"uh huh",
"100%",
"you bet",
"uh-hu",
"oh yes",
"desigur",
"affirmativ",
"asa e!",
"sigur",
"corect",
"suna corect :)",
"exact!",
"vezi ca stii ?"
},

["daps"]={
"yes",
"yup",
"uh huh",
"100%",
"you bet",
"uh-hu",
"oh yes",
"desigur",
"affirmativ",
"asa e!",
"sigur",
"corect",
"suna corect :)",
"exact!",
"vezi ca stii ?"
},

["dea"]={
"yes",
"yup",
"uh huh",
"100%",
"you bet",
"uh-hu",
"oh yes",
"desigur",
"affirmativ",
"asa e!",
"sigur",
"corect",
"suna corect :)",
"exact!",
"vezi ca stii ?"
},

}


function Main()
end

function ChatArrival(curUser, data)
	local status=string.sub(data,1,string.len(data)-1)
	-- parse the command
	local s,e,cmd = string.find( status, "%b<>%s+%p(%S+)" )
	if (cmd=="quiet") then
		trigall=0
		SendToAll(Bot, "Hmf, Okidoki I will be quiet :(( ")
		return 1
	elseif (cmd=="speak") then
		trigall=1
		SendToAll(Bot, "Okay, I will talk to you again :-)")
		return 1
	end
	-- get the msg only using regular expression
	local s,e,msg = string.find(data, "%b<>([%a ]+)")
	-- look in the table
	if trigall==1 then
		for key, value in pairs(trigw) do
			for key2, value2 in pairs(value) do
				if string.find(string.lower(msg), key) then
				else 
					break
				end
				if string.find(string.lower(msg), "!me") then
					local t="**"..curUser.sName
					local data=string.gsub (msg, "!me", t, 1 )
				end
				SendToAll( data ) -- send the original data
				SetTimer(500)
				StartTimer()
				answer, x = string.gsub(value[math.random(1,table.getn(value))], "%b[]", curUser.sName)
				return 1; -- tell the hub we have processed the data
			end
		end
	end
end

function OnTimer()
	SendToAll(Bot, answer) -- send bot's answer
	StopTimer()
end
I have tryed to put [" "] on the word I want, but I didn't worked ...
With all the respect

Pothead

I would guess by modifiying this line. :)
Quote from: BoyKind on 08 August, 2006, 11:58:37
   local s,e,msg = string.find(data, "%b<>([%a ]+)")

BoyKind

With all the respect

BoyKind

Man, I thank you 4 the reply ... but that f'kin script still doesn't work :-<
With all the respect

UwV

Quote from: BoyKind on 09 August, 2006, 21:12:30
Man, I thank you 4 the reply ... but that f'kin script still doesn't work :-<

what pothead means is YOU need edit that line .. ...
if you dont want to learn he will surely show you how i guess...
but for now ..
try try try and suceed ;0) ..
1st hint ..
a chatline has a space between the <nick> ( %b<>)  and the message  ([%a+])  ..
2nd hint ...
read this ..
http://forum.ptokax.org/index.php?topic=763.0
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

BoyKind

I know what he ment, I appriciate your help, but I don't know how to modify that line anymore...I tried, but I can't make it work :(
With all the respect

JueLz

I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

BoyKind

I appriciate your post, but I'm not that good in scripting ... sry :( I don't know what to do ...
With all the respect

BoyKind

That's how I got the script  ??? you want me to show you the link ?
With all the respect

BoyKind

#9
I'm not lying Mutor :) I learn my lesson. I have posted a long time ago a script with no tag ( with intention ) and nobody answer to it :) but here is the truth http://www.uknnet.com/lua/thread.php?postid=9672
With all the respect

UwV

#10
http://www.uknnet.com/lua/thread.php?postid=9672
so that post sez ...

QuoteWould the maker of this script please inform me who u are, as this script was supplied to me without credits, I will amend post once I know

then the function you are using in this version has been posted by someone .. Markitos to be more exact.

Your reply :
QuoteThx :D     

It works  :) thank you   :)

__________________
With all the respect

so yo would be "With all the respect " to add his name to the "new" credits...

also you say it is working and you just want a small edit done : ..

Quotehow can I block some words in the script ?
How can I block some words in that script ? For example when I type "hello", the bot answers, but as an example, when I type "helloz", the bot still answers ... how can I block that word so when I type "helloz" the bot won't answer ?


then you post the same thing again ..
http://www.uknnet.com/lua/thread.php?threadid=1492

now you post it again here ....
and you ask for the same thing here...

most scripters do read both boards ..
and would get slightly annoiyed by seeing three threads asking the same thing from the same user..

( guess I am not really a scripter,.. I never read that board  ;)  )
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

BoyKind

at first, I thought that the bot works fine, but after I have modify it, I saw that I had problems ... I'l search for the credits, and I'l edit all my posts, if that will make all of you happy. And once again, I did not remove the credits, that's how I got the script.
With all the respect

modular

Quote from: BoyKind on 19 August, 2006, 18:52:48
at first, I thought that the bot works fine, but after I have modify it, I saw that I had problems ... I'l search for the credits, and I'l edit all my posts, if that will make all of you happy. And once again, I did not remove the credits, that's how I got the script.
;D

BoyKind

man, have you saw that I don't know that better english ? sheesh man, didn't you took a look over the sript to see what have I modify ?
With all the respect

modular

 ;D was refering to what the bold text say's not how it is spelled
was a long story to read .. just finished following all threads ..
my conclusion ?   
  bot works you modded it bot now don't work.



BoyKind

yeah,man. sheesh ... a man makes mistakes ... I make more
With all the respect

BoyKind

Mutor, please read carefully what Toobster sais when he posts that script for me: http://www.uknnet.com/lua/thread.php?threadid=1464
With all the respect

BoyKind

Man, but I need that script :( damn :( if you can't help me with that script, to tell me what I have to do in this line
local s,e,msg = string.find(data, "%b<>([%a ]+)")
could you at least help me find another script, or make me another trigger script similar to this one ?
With all the respect

BoyKind

:) you didn't understand me ... I didn't ask 4 a !talk script, I ask for a triggers script, similar to the one I got :P the !talk command exists in the 0.3.5.1 too :P if you want to talk as another nick with the !talk command in Ptoka 0.3.5.1 you just type: !talk <nick> message, like !talk <BoyKind> hi
With all the respect

BoyKind

thank you :D it works \:D/ I'm so happy :D thank you :D
With all the respect

BoyKind

With all the respect

BoyKind

can you make another modification on that script ? Like, when someone types "sal" (hello in my language) and after "sal" the guy types something else, like "sal BoyKind" the bot won't answer? And when the guy says simply "sal" the bot to answer ?
With all the respect

BoyKind

With all the respect

JueLz

I am owner of the MzDistortion? Empire
the addy to my hub is mzdistortion.no-ip.org
____________________________________________
--=                        [HT 500]                          =--

SMF spam blocked by CleanTalk