Vip Chat :)
 

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

Vip Chat :)

Started by Guibs, 10 November, 2003, 12:42:30

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guibs

Hi there,,

A stand alone script for Vip & higher, depending of your profiles.dat file used. [The script is following the PtokaX profile by default (0 = master, 1=op, 2=vip)]

------------------
-- VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)

------------------
-- Main Function --
------------------
function Main()
	VIPCHAT = "-=VipChat=-"
	frmHub:RegBot(VIPCHAT)
end

------------------
-- Data Arrival --
------------------

function DataArrival(user,data)
	if(strsub(data,1,4) == "$To:") then
		s,e,whoTo = strfind(data,"$To:%s+(%S+)")
		if whoTo == VIPCHAT then
			if user.iProfile == 0 or user.iProfile == 1 or user.iProfile == 2 then
				s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
				VipChatRoom(user,msg)
			end
		end
	end
end

-------------------
-- Vip Chat Room --
-------------------

function VipChatRoom(user,msg)
	local allprofiles = GetProfiles()
	local index, profile, index2, nick
	for index, profile in allprofiles do
		local users = GetUsersByProfile(profile)
		for index2, nick in users do
			local usr = GetItemByName(nick)
			if usr ~= nil then
				if user.sName == usr.sName then
				else
					if usr.iProfile == 0 or usr.iProfile == 1 or usr.iProfile == 2 then
						usr:SendData("$To: "..usr.sName.." From: "..VIPCHAT.." $<"..user.sName.."> " ..msg)
					end
				end
			end
		end
	end
end
------------------
Enjoy,,,, :)

l8tr,, ;o)
-- Please,... don\'t ask help in Pm,...Forums are made for that, to help everyone & my Inbox pm will be safe,... Thks,,  :))  --
CB forum     /     CB Home page

pHaTTy

AH DAMN, that reminds me i supposed to be making sumit similar for AC,,,,,,,,,,,,, hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

nice script guibs m8 :o)
Resistance is futile!

AlwaysConnected

QuoteOriginally posted by (uk-kingdom)pH?tt?
AH DAMN, that reminds me i supposed to be making sumit similar for AC,,,,,,,,,,,,, hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

nice script guibs m8 :o)

doesnot matter phatty  :D

pHaTTy

ahh phew ok AC heheeh
Resistance is futile!

BrickTop

vipchat script    guibs

I cant get the vipchat script to work, get an error in line 9 of code  any ideas????????


code:--------------------------------------------------------------------------------
-- VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)

------------------
-- Main Function --
------------------
function Main()
   VIPCHAT = "-=VipChat=-"
   frmHub:RegBot(VIPCHAT)
end

------------------
-- Data Arrival --
------------------

function DataArrival(user,data)
   if(strsub(data,1,4) == "$To:") then
      s,e,whoTo = strfind(data,"$To:%s+(%S+)")
      if whoTo == VIPCHAT then
         if user.iProfile == 0 or user.iProfile == 1 or user.iProfile == 2 then
            s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
            VipChatRoom(user,msg)
         end
      end
   end
end

-------------------
-- Vip Chat Room --
-------------------

function VipChatRoom(user,msg)
   local allprofiles = GetProfiles()
   local index, profile, index2, nick
   for index, profile in allprofiles do
      local users = GetUsersByProfile(profile)
      for index2, nick in users do
         local usr = GetItemByName(nick)
         if usr ~= nil then
            if user.sName == usr.sName then
            else
               if usr.iProfile == 0 or usr.iProfile == 1 or usr.iProfile == 2 then
                  usr:SendData("$To: "..usr.sName.." From: "..VIPCHAT.." $<"..user.sName.."> " ..msg)
               end
            end
         end
      end
   end
end
--------------------------------------------------------------------------------

SMF spam blocked by CleanTalk