PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: sUiCiDeMAniC on 22 October, 2003, 21:31:30

Title: !say command
Post by: sUiCiDeMAniC on 22 October, 2003, 21:31:30
im looks for script that has the !say command just like the one in ptokax, like this:
!say nick message

and it will make it look like the "nick" said it
can somebody please make it, or is there one?

-mAnIc
Title:
Post by: pHaTTy on 22 October, 2003, 21:44:12
i wud make it.............but i dont think its a nice script to have,to me its like a spy bot, it goes beyond privacy, and being able to control what someone says, is not right, it can cause trouble, maybe i not make.................hmmmm

i will c

-War3zMantis
Title:
Post by: Skrollster on 22 October, 2003, 21:53:37
and i don't think it is that wrong, it is already an in built command in YHub, why not make a script of it...

function DataArrival(user,data)
if (strsub(data, 1, 1) == "<" ) and user.bOperator then
-- remove end pipe
data=strsub(data,1,strlen(data)-1)
--extract command
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
--check if cmd exist
if not cmd then cmd = "0" end
-- make the cmd caseinsensitive
cmd = strlower(cmd)
-- get the command prefix
cmdprefix = strsub(cmd, 1,1)
-- check if the cmd prefix is !,+,# or ?
if cmdprefix == "!" or cmdprefix == "+" or cmdprefix == "#" or cmdprefix == "?" then
-- Remove the prefix and check the command
cmd = strsub(cmd, 2,strlen(cmd))
if cmd = "say" then
_,_,as,message = strfind(data, "%b<>%s+%S+%s+(%S+)%s+(.+)")
SendToAll(as, message)
return 1
end
end
end
end

this can only be used by Operators...
Title:
Post by: sUiCiDeMAniC on 22 October, 2003, 22:39:11
thank you skrollster but im gettign an error, it might be cuz im usin the beta ptokax but heres the error:

Syntax Error: `then' expected;
  last token read: `=' at line 17 in string "function DataArrival(user,data)
..."

can it be fixed??? please help

and (uk-kingdom)pH?tt?: its not a SPY-BOT its a fun little script, it helps you have fun i love the little feature, bringes so much joy

-mAnIc
Title:
Post by: Skrollster on 22 October, 2003, 23:51:44
function DataArrival(user,data)
if (strsub(data, 1, 1) == "<" ) and user.bOperator then
-- remove end pipe
data=strsub(data,1,strlen(data)-1)
--extract command
_,_,cmd=strfind(data, "%b<>%s+(%S+)")
--check if cmd exist
if not cmd then cmd = "0" end
-- make the cmd caseinsensitive
cmd = strlower(cmd)
-- get the command prefix
cmdprefix = strsub(cmd, 1,1)
-- check if the cmd prefix is !,+,# or ?
if cmdprefix == "!" or cmdprefix == "+" or cmdprefix == "#" or cmdprefix == "?" then
-- Remove the prefix and check the command
cmd = strsub(cmd, 2,strlen(cmd))
if cmd == "say" then
_,_,as,message = strfind(data, "%b<>%s+%S+%s+(%S+)%s+(.+)")
SendToAll(as, message)
return 1
end
end
end
end
Title:
Post by: pHaTTy on 22 October, 2003, 23:55:13
QuoteOriginally posted by sUiCiDeMAniC
thank you skrollster but im gettign an error, it might be cuz im usin the beta ptokax but heres the error:

Syntax Error: `then' expected;
  last token read: `=' at line 17 in string "function DataArrival(user,data)
..."

can it be fixed??? please help

and (uk-kingdom)pH?tt?: its not a SPY-BOT its a fun little script, it helps you have fun i love the little feature, bringes so much joy

-mAnIc
i dont mean its a spy bot, what i mean is that depending on how you use it, it can cause trouble,

and yep Skrollster

i know of quite a few Mods that have been un modded because of peeps making them say stuff
and it loked funny
so they unmodded yep :(

thats why i dont think its nice depending on how you use it
Title:
Post by: sUiCiDeMAniC on 23 October, 2003, 00:09:56
thanks skrollster  :))
Title:
Post by: plop on 23 October, 2003, 01:33:53
have 2 agree with phatty.
i got nearly banned from a chatprogram (paltalk) and that was just for finding a bug wich caused that.
i wasn't using it in a bad way.
just was speaking with a nick wich wasn't in the room.
i was asked in the past for making a command like this in crazy bot and for the same reason i didn't.
if i 1 day would add it 2 crazy bot a check if there isn't a user with that nick in the hub would be included.
it's fun 2 confuse the users with some1 speaking wich isn't in the hub but many ppl find it offensive 2 see there own nick say (weird) things.

plop