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)
AH DAMN, that reminds me i supposed to be making sumit similar for AC,,,,,,,,,,,,, hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
nice script guibs m8 :o)
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
ahh phew ok AC heheeh
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
--------------------------------------------------------------------------------