PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: dkt on 27 May, 2005, 12:27:54

Title: Scripts Request @ Dkt
Post by: dkt on 27 May, 2005, 12:27:54
Request #1
Message in main at regular intervals say ( interval = one hours ).
Message shld be displayed in main chat.
Message shld be taken from txt file present in scripts\automessage folder.
Any number of files present in scripts\automessage folder to be displayed in main chat at tat regular interval.
means
If there are three files say ( abc.text , rules.txt and regcommands.txt)
thn for the timer of one hr it shld display first abc.txt thn agian after one hour display rules.txt thn after one hour display regcommands.txt thn after one hour again display rules.txt and so on ....
Option to start and stop message for Master of Hub.
I searched in forums for this , but did not get what i want.

Request #2

I need a command to register users.
although there is an inbuilt PtokaX command...but when u register a user..it just shows ***user  was successfully added to user list.. but what i want is that when i register a user i shld get a pm from hub bot like this -


User has been registered by you.
please tell the user to add the following details in favourite hubs

hub name - dkt's hub
Hub address - 56.23.51.2
nick -
password -

i would really appreciate someone if he gives me the above scripts...
 





Title:
Post by: dkt on 27 May, 2005, 12:59:27
I am using this script for intro and outro for registered users but it doesnt show intro - ouro for operator or master..can anyone modify it to show intro outro for registered users, operators and master.

Bot = "Dkt's Bot"
--If users should have random intro/outros then set to 1
RandomUser = 1

function NewUserConnected(curUser)
if RandomUser == 1 then
local RandMsg = string.gsub(Intros[math.random(1,table.getn(Intros))], "%[CURUSER%]", curUser.sName)
SendToAll(Bot, RandMsg)
end
end

function UserDisconnected(curUser)
if RandomUser == 1 then
local RandMsg = string.gsub(Outros[math.random(1,table.getn(Outros))], "%[CURUSER%]", curUser.sName)
SendToAll(Bot, RandMsg)
end
end

--//User enters the hub text
Intros = {
" ---> [CURUSER] Has Entered The Hub. <--- ",  
}

Outros = {
" <--- [CURUSER] Has Left The Hub. ---> ",
}
Title:
Post by: dkt on 27 May, 2005, 13:08:42
I am using this time bot..i want this time bot to automatically display time and date in main chat at regular interval say ( 30 minutes). can smeone modify it for me ?

sBot = "Time-Bot"

function ChatArrival(user, data)
   if (string.sub(data,1,1)=="<") or (string.sub(data,1,5+string.len(sBot))=="$To: "..sBot) then
      data = string.sub(data,1,string.len(data)-1)
      s,e,cmd = string.find(data,"%b<>%s+(%S+)")
      if (cmd == "!time") then
         user:SendData(sBot, GetTime())
      end
   end
end

function GetTime()
   s = os.date("%S")
   h = os.date("%H")
   m = os.date("%M")
   d = os.date("%d")
   mm = os.date("%m")
   y = os.date("%y")
   Date = "Date: "..d.."/"..mm.."/20"..y.."           Time: "..h..":"..m..":"..s
   return Date
end
Title:
Post by: Dessamator on 27 May, 2005, 13:21:25
for  the first and second script, click the links on my signature !
for the last script,even though it already exists, just add this functions :

min= 30 -- choose how many mins here
function Main()
       SetTimer(60*1000*min)
       StartTimer()
end

function OnTimer()
SendToAll(sBot,GetTime())
end
Title:
Post by: dkt on 27 May, 2005, 13:33:41
QuoteOriginally posted by Dessamator
for the last script,even though it already exists, just add this functions :

min= 30 -- choose how many mins here
function Main()
       SetTimer(60*1000*min)
       StartTimer()
end

function OnTimer()
SendToAll(sBot,GetTime())
end

Thanks m8.. working fine Now :)