Chat Room
 

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

Chat Room

Started by night_hawk, 10 February, 2004, 16:43:05

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

night_hawk

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.... ?(

WickeD

-- 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

night_hawk

i need it to work for all my users vip regs and ops

night_hawk

i need it to work for all my users vip regs and ops

WickeD

-- 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

night_hawk

i need my admin users added to if you can

night_hawk

Is there a way that they can log thems in to it in stead of it being a pop up

WickeD

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

night_hawk

where do i find that

WickeD

(Your Profiles do you find in your ptokaX map/Profiles.DAT)


//WickeD

night_hawk

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)

night_hawk

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

WickeD

-- 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

night_hawk

thank you for helping me old...If you like to join my hub i would be glad to invite you and thank you again

SMF spam blocked by CleanTalk