Whisper script conversion 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

Whisper script conversion please :)

Started by AMediaMan, 13 March, 2005, 05:36:36

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AMediaMan

hi everyone. i was just wondering if someone could convert this for me.
--Whisper 1.01
--by Mutor
--Request by Snoris
--
--Sends a "For your eyes only message" to another user in main.
--Added option for right click command
--
--User Settings-------------------------------------------------------------------------------------
Comm = "+whisper"	-- Script Command
Bot = frmHub:GetHubBotName()	--Bot name pulled from hub
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 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," "..user.sName.." whispered : " ..msg)
				if Confirmation == "1" then
					SendToNick(user.sName,"Whisper sent...")
				end
	return 1
	end
end

any help would be great :)  thnx,
                           
                                                 AMediaMan

blackwings

this should work =>
--Whisper 1.01
--by Mutor
--Request by Snoris
--
--Sends a "For your eyes only message" to another user in main.
--Added option for right click command
--
--User Settings-------------------------------------------------------------------------------------
Comm = "+whisper"	-- Script Command
Bot = frmHub:GetHubBotName()	--Bot name pulled from hub
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 1 2 Whisper To User $<%[mynick]> "..Comm.." %[nick] %[line:Whisper-Message]||")
		user:SendData(" *** Notice :: Right click 'Whisper' command enabled ***")
	end
end

OpConnected = NewUserConnected

function ChatArrival(user,data)
	s,e,cmd,who,msg = string.find(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," "..user.sName.." whispered : " ..msg)
				if Confirmation == "1" then
					SendToNick(user.sName,"Whisper sent...")
				end
	return 1
	end
end


Herodes

#2
You may wanna look in here ( InterCom ) for this kind of script ...

AMediaMan

very nice blackwings i ty much :), been tested and seems to work just fine thnx again.


AMediaMan.



PS. Herodes i am testing the one you posted here as well ty :)

SMF spam blocked by CleanTalk