Request message script controled by profiles
 

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

Request message script controled by profiles

Started by Vipertje, 31 May, 2007, 21:44:03

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vipertje

I need a hub message script controlled by hub profiles, i have now 1 that only do mass massage send to the hub and I want some messages send by profiles sort like only to USER profile and REG profile.

Do someone knowa script for that or can someone build something like that for me, that will be great.

grtz,
Vipertje

Vipertje

If I understand this script then he only send messages to PM's but I want the messages show in MainChat.

Is this possible?

Vipertje

I have this one now for all users:

-- Rotating Message 1.1 by jiten - for PtokaX 0.3.3.0 build 16.09
-- based on Rotating Message 1.0 by Mutor The Ugly
-- Rotates n text files posted to main chat at interval
--
--User Settings---------------------------------------------------------------------
mSet = {
   sBot = ("Mega-foon"),      -- Bot Name
   RunStatus = 1,         -- Auto Start -> 1=ON 0=OFF
   iDelay = 111,         -- Delay between each text file in minutes
   -- Don't change this
   iCnt = 1,
   --------------------
}

sFile = { -- put here the files you want to send
        "admessage/1.txt",
}

--End User Settings-----------------------------------------------------------------

Main = function() 
   SetTimer(mSet.iDelay*60*1000) 
   StartTimer() 
end 

ChatArrival = function(sUser, sData)
   sData=string.sub(sData,1,-2) 
   local s,e,cmd = string.find(sData, "%b<>%s+[%!%?%+%#](%S+)" )
   if sUser.bOperator then
      local tCmds = {
      ["addon"] =   function(user,data)
               mSet.RunStatus = 1
               user:SendData(mSet.sBot,"Messages started...")
               OnTimer()
            end,
      ["addoff"] =   function(user,data)
               mSet.RunStatus = 0
               user:SendData(mSet.sBot,"Messages stopped...")
            end,
      }
      if tCmds[cmd] then
         return tCmds[cmd](sUser,sData),1
      end
   end
end

OnTimer = function()
   if mSet.RunStatus == 1 then
      for i = 1, table.getn(sFile) do
         if i == mSet.iCnt then
            local f,tmp = io.open(sFile,"r"),""
            if f then
               tmp = f:read("*a")--
               tmp = string.gsub(tmp,"|",string.char(166))
               tmp = string.gsub(tmp,"\n","\r\n")
               f:close()
               SendToAll(mSet.sBot,"\r\n"..tmp)
            end
            if table.getn(sFile) == i then
               mSet.iCnt = 1
            else
               mSet.iCnt = i + 1
            end
            break
         end
      end
   end
end


In this version the text prefers to a txt file. Your version what i did understand of it does only the text what you did input (so only 1 message) is that correct?

If yes is it not possible to prefer it to a txt file also?

Vipertje

Ok what I want is the script of mine last reply added.

Added in that the script has a users profile setting like:

   [1] = 1,
   [2] = 1,
   [3] = 0,
   [4] = 1,
   [5] = 1,
   [-1] = 0,
   
  • = 1,

    This way its easy to use it for 1 or more profiles at the same time.

    I hope you understand me with this..
    Can no one add that in the script?

SMF spam blocked by CleanTalk