Is there anyone who can help me with this??
I wanna have a command that makes it possible to "whisper" to other users..And no one can / Should se it =))..And no...
I dont wanna send an PM...Thats the point of the Whisper =))
U can skip that xtra thingy =))
EG.
+whisper Snortan Hi hi u ugly little moron =]
*This is not sent to the mainchat of course*
The user Snortan gets this in his Mainchat.....
The user Snoris whispered this to you : Hi hi u ugly little moron =]
Is there someone who can help me with this??
I've tried out some stuff but I'm a n00b as always =))
This is what i came up with =)
if (cmd=="+whisper") then
arg=strsub(arg,1,strlen(arg)-1)
SendToNick(arg,botname,"The user "..user.sName.." sent you this msg : "..arg.."")
user:SendData(botname,"You whispered to "..arg.."")
return 1
end
I'll hope there is SOMEONE who can help me with this =]
Hi,
Hope it helps...
--Requested by Snoris
--Made by nErBoS
Bot = "Whisper-Bot"
function Main()
frmHub:RegBot(Bot)
end
function DataArrival(user, data)
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="+whisper") then
s,e,cmd,usrto,msg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+(.*)")
local usr = GetItemByName(usrto)
if (usr == nil) then
user:SendData(Bot, "The user is'nt online.")
return 1
elseif (usrto ~= nil and msg ~= nil) then
user:SendData(Bot,"You whispered to "..usrto.."")
usr:SendData(Bot, "The "..user.sName.." whispered this to you : "..msg)
return 1
else
user:SendData(Bot, "Syntax error, the command is +whisper .")
return 1
end
end
end
end
Best regards, nErBoS
that's a cool idea...but is this posible to make
OP's and Hub Muster to see the Whispered messages???
(for administrative purpices) 8)
QuoteOriginally posted by BoJlk
that's a cool idea...but is this posible to make
OP's and Hub Muster to see the Whispered messages???
(for administrative purpices) 8)
spying you mean.
plop
Maybe you'd like to have a look at this one .. InterCom (http://board.univ-angers.fr/thread.php?threadid=2525&boardid=12)
BTW it works like a Charm! 8)
but how can i unregister the BOT
so it won't be seen i the user list?
what line in the script do i delete/edit
(and how to make a description fot the bot too?)
And how do i Make it available in the !help commands
for User or for OPs
change this partfunction Main()
frmHub:RegBot(Bot)
end
to this function Main()
-- frmHub:RegBot(Bot)
end
Doesn't matter u both ROCK!
Any way i was wondering if i type the [username]
the user name can contain character like "?" etc'
so i can't type it when i use the command!
Can it be done like RightClick option?
any suggestions? ?(
Syntax Error: expected;
last token read: `-' at line 7 in file `...\PtokaX-0.326.TestDrive4\scripts\Whisper 1.1.lua'
?(
:D
Sorry just added "-"
"--> Option for right click command"
Case Closed it's now Complette...
when i've done a reload in DC++
i recieve another RightClick Command!
so it's two now!...
i've done it three time now it's 5 commands in the rightClick option! ?(
QuoteOriginally posted by Mutor
When your done editing the user commands, restart your client.
Sorry that i need to ask this thought some terms are not formiliar to me...
Editing witch user command?
and restarting the DC++ software?
hi m8
try this
added a Clear to the user commands
--Whisper 1.01
--by Mutor
--Request by Snoris
--
--Sends a "For your eyes only message" to another user in main.
--Added request by BoJlk -> Option for right click command
--
--User Settings-------------------------------------------------------------------------------------
Comm = "+whisper" -- Script Command
Bot = "[Sentry]" -- Rename to your main Px bot
Confirmation = "1" -- Show whisper confirmation [show to sender only] "1"=yes "0"=no
SendComm = "1" -- Send user command [right click] "1"=yes "0"=no
--End User Settings----------------------------------------------------------------------------------
--
--$UserCommand 1 X Where -> 1=Hub Menu 2=User Menu 3=Hub/User Menu
--
function NewUserConnected(user)
if SendComm == "1" then
user:SendData("$UserCommand 255 |") -- clear
user:SendData("$UserCommand 1 2 Whisper To User $<%[mynick]> "..Comm.." %[nick] %[line:Whisper-Message]||")
user:SendData(" *** Notice :: Right click 'Whisper' command enabled ***")
end
end
OpConnected = NewUserConnected
function DataArrival(user, data)
s,e,cmd,who,msg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)")
if (cmd == Comm) then --and user.bOperator then -- Use this for Ops use only
local nick = GetItemByName(who)
if not nick then
SendToNick(user.sName,Bot.." The user -> "..who.." is not online. Check your spelling.")
return 1
end
nick:SendData(Bot,"The user "..user.sName.." whispered this to you : " ..msg)
if Confirmation == "1" then
SendToNick(user.sName,"Whisper sent...")
end
return 1
end
end
QuoteOriginally posted by ??????Hawk??????
added a Clear to the user commands
if you have any other scripts sending right click
commands, it has a good chance of erasing those.
-BH
i hate long commands.. i'd make a shortcut for it...
(mod's 4 mutors last post above.)
- Comm = "+whisper"
+ Comm = {["+wisper"]= 1, ["+w"] = 1}
- if (cmd == Comm) then --and user.bOperator then -- Use this for Ops use only
+ if Comm[cmd] then --and user.bOperator then -- Use this for Ops use only
-BH
Me too i hate the long commands
If you misstyped it by accident... ?(
you'll have a nasty outcome :D
so BottledHate you right
but where do i add those lines?
here?
--User Settings-------------------------------------------------------------------------------------
Comm = "+whisper" -- Script Command
Bot = "[Sentry]" -- Rename to your main Px bot
Confirmation = "1" -- Show whisper confirmation [show to sender only] "1"=yes "0"=no
SendComm = "1" -- Send user command [right click] "1"=yes "0"=no
--End User Settings----------------------------------------------------------------------------------
--
sorry...
find the line with the "-" and replace it with the line that has the "+" next to it.
:D
- Comm = "+whisper"
+ Comm = {["+wisper"]= 1, ["+w"] = 1}
- if (cmd == Comm) then --and user.bOperator then -- Use this for Ops use only
+ if Comm[cmd] then --and user.bOperator then -- Use this for Ops use only
-BH
Great...!
Gonna Test it now...
This is a Cool Script
thanks to [Snoris]
Got an Error in Whisper...
QuotePtokaX-0.326.TestDrive4scriptsWhisper v1.2.lua
Syntax Error attempt to compare nil with number
Syntax Error table index is nil
Syntax Error table index is nil
Syntax Error table index is nil
Syntax Error table index is nil
Common No one has an answer for that error
Syntax Error: table index is nil
Considering this Script and for General Idea?