Hi i need just a plain chat room that my users can chat in. I run trivia in the main part of my hub. All I need is something that they can join on there own. I tried one chat room script and it did not work right it show two messages when i typed and it messed around with my ops when they tried to use there commands.. I am useing test drive 4.99 it someone one can make a simple scritp i would be very happy thank you.... ?(
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for Users.
function Main()
ChatRoom = "ChatRoom"
frmHub:RegBot(ChatRoom)
end
Levels= { [-1]=0, }
------------------
-- Data Arrival --
------------------
function DataArrival(user,data)
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for Hub-Users only. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(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 Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
_______________________________________
Try it! I have not tryed it! So no guarantees that it works! =)
//WickeD
i need it to work for all my users vip regs and ops
i need it to work for all my users vip regs and ops
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Master.
function Main()
ChatRoom = "ChatRoom"
frmHub:RegBot(ChatRoom)
end
Levels= { [-1]=0,[0]=0,[1]=0,[2]=0,[3]=0,[4]=0,}
------------------
-- Data Arrival --
------------------
function DataArrival(user,data)
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(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 Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
_________________________________________
I have not tryed it! So no guarantees that it works!
//WickeD
i need my admin users added to if you can
Is there a way that they can log thems in to it in stead of it being a pop up
QuoteOriginally posted by night_hawk
Is there a way that they can log thems in to it in stead of it being a pop up
That can I not help you whit! Sorry I am not so good on writing scripts!
____________________________________________
I can add Admin to it if you post your Profiles here so I can se what profiles your Admin has!
(Your Profiles do you find in your ptokaX map/Profiles.DAT)
//WickeD
where do i find that
(Your Profiles do you find in your ptokaX map/Profiles.DAT)
//WickeD
sorry i am new to ptokax i am just learn it what do you mean profile for my admins. I am trying to understand what you trying to tell me... Do you mean my doc files(scripting)
i found this for profile thats all hope it helps
0|Master|11111111111111111111000000000000
1|Operator|11111100011001111111000000000000
2|VIP|10000000000001111000000000000000
3|Reg|10000000000000000000000000000000
4|Guest|10000000000000000000000000000000
5|Admin|11111100011111111111000000000000
-- Chat-Room
-- Original VipChat v1.0
-- By Guibs 10/11/2003
-- Enjoy :)
-- Simple Modify by NightLitch
-- to Master Bot Only
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints.
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master.
function Main()
ChatRoom = "ChatRoom"
frmHub:RegBot(ChatRoom)
end
Levels= { [-1]=0,[0]=0,[1]=0,[2]=0,[3]=0,[4]=0,[5]=0}
------------------
-- Data Arrival --
------------------
function DataArrival(user,data)
if(strsub(data,1,4) == "$To:") then
s,e,whoTo = strfind(data,"$To:%s+(%S+)")
if whoTo == ChatRoom then
if Levels[user.iProfile] then
s,e,whoTo,from,msg = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
MasterChatRoom(user,msg)
elseif Levels[user.iProfile] == nil then
user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.")
end
end
end
end
function MasterChatRoom(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 Levels[user.iProfile] then
usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg)
end
end
end
end
end
end
___________________________________________
Try this then! I think is it fixed now! Good luck!
//WickeD
thank you for helping me old...If you like to join my hub i would be glad to invite you and thank you again