[Request] Multiple Botdescription
 

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] Multiple Botdescription

Started by Krysalis, 10 June, 2005, 12:59:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Krysalis

Hello,

i search for a multiple Bot description Script.
There is still on in Lua 4. Dont know Autor @ Moment.
In this script u can set any bots description, tag, email, connection.
But always for one Bot.
Is this possible to make ONE script, where u can set this settings for all Bots?

like:

Botname1="Bot1"
Description=""
Tag=""
Email=""
Speed=""

Botname2="Bot2"
Description=""
Tag=""
Email=""
Speed=""

Botname3="Bot3"
Description=""
Tag=""
Email=""
Speed=""

info should be resend every 15 Minutes.
Thanks in Advance



Dessamator

yap just add a timer, see the howto section , but im not so sure u need to resend the info the bot dont really change u only need to set it once !
Ignorance is Bliss.

jiten

Maybe this one:
-- Script For Bot Description
-- Converted to lua 5 by Madman
-- Optimized some...

Bot = {
	["Name"] = "(•???†•)M?3?T?g?™",
	["Email"] = "HubMp3World@hotmail.com",
	["Descr"] = "? [??] k s okupa do Hu? em geral ?",
	["Speed"] = "Bot",
	["Share"] = 1024 * 1024 * 1024,
}
Bot2 = {
	["Name"] = "(•???†•)M?3?i?™",
	["Email"] = "HubMp3World@hotmail.com",
	["Descr"] = "? [??] k filtra os IPs permitidos no Hu? ? ",
	["Speed"] = "Bot",
	["Share"] = 1024 * 1024 * 1024,
}
Bot3 = {
	["Name"] = "(•???†•)M?3?Ch?t™",
	["Email"] = "HubMp3World@hotmail.com",
	["Descr"] = "? [??] Chat dos Operadores ?",
	["Speed"] = "Bot",
	["Share"] = 1024 * 1024 * 1024,
}
Bot4 = {
	["Name"] = "(•???†•)M?3????",
	["Email"] = "HubMp3World@hotmail.com",
	["Descr"] = "? [??] k verifika kem faz PU? ? ",
	["Speed"] = "Bot",
	["Share"] = 1024 * 1024 * 1024,
}

function Main()
frmHub:RegBot(Bot.Name)
MyInfoString = "$MyINFO $ALL "..Bot.Name.." "..Bot.Descr.."$ $"..Bot.Speed..string.char(1).."$"..Bot.Email.."$"..Bot.Share.."$"
SendToAll(MyInfoString)

frmHub:RegBot(Bot2.Name)
MyInfoString2 = "$MyINFO $ALL "..Bot2.Name.." "..Bot2.Descr.."$ $"..Bot2.Speed..string.char(1).."$"..Bot2.Email.."$"..Bot2.Share.."$"
SendToAll(MyInfoString2)

frmHub:RegBot(Bot3.Name)
MyInfoString3 = "$MyINFO $ALL "..Bot3.Name.." "..Bot3.Descr.."$ $"..Bot3.Speed..string.char(1).."$"..Bot3.Email.."$"..Bot3.Share.."$"
SendToAll(MyInfoString3)

frmHub:RegBot(Bot4.Name)
MyInfoString4 = "$MyINFO $ALL "..Bot4.Name.." "..Bot4.Descr.."$ $"..Bot4.Speed..string.char(1).."$"..Bot4.Email.."$"..Bot4.Share.."$"
SendToAll(MyInfoString4)
end

function NewUserConnected(user)
user:SendData(MyInfoString)
user:SendData(MyInfoString2)
user:SendData(MyInfoString3)
user:SendData(MyInfoString4)
end

OpConnected = NewUserConnected

Dessamator

that script has quite a looooot of repitition, could be resolved with a simple function !
Ignorance is Bliss.

jiten

QuoteOriginally posted by Dessamator
that script has quite a looooot of repitition, could be resolved with a simple function !
Indeed it has, as I only pasted the original code.
Maybe later I'll touch it a bit ;)

Cheers

Krysalis

The i will wait for your "moddet" Version, Jiten ;-)

Krysalis

Sorry,

At the Moment i see that i use the wrong forum. I would post into Lua5 Section....can any Mod move this?

jiten

Here goes my try:
-- Script For Bot Description
-- Converted to lua 5 by Madman
-- Touched a bit by jiten

iDelay = 15 -- Delay between MyINFO Sending

tBots = {
	{ Name = "bot1", Email = "mail1", Descr = "desc1", Share = 1024*1024*1024, },
	{ Name = "bot2", Email = "mail2", Descr = "desc2", Share = 1024*1024*1024, },
	{ Name = "bot3", Email = "mail3", Descr = "desc3", Share = 1024*1024*1024, },
	{ Name = "bot4", Email = "mail4", Descr = "desc4", Share = 1024*1024*1024, },
}

Main = function()
	for i = 1, table.getn(tBots) do
		frmHub:RegBot(tBots[i]["Name"])
		SendToAll("$MyINFO $ALL "..tBots[i]["Name"].." "..tBots[i]["Descr"].."$ $"..string.char(1).."$"..tBots[i]["Email"].."$"..tBots[i]["Share"].."$")
	end
	SetTimer(60*1000*iDelay) StartTimer()
end

OnTimer = Main
Best regards,

jiten

Dessamator

yap thats the way, clean clean clean :)
Ignorance is Bliss.

Krysalis

Many thx as always, Jiiten;-)

Krysalis

Hello:)

can you add "Tag" and "Connection" please?

And if is possible to insert cmds for changing descriptions while scripts running?

Greets

jiten

Try using this although there's no difference with the previous one (just removed some stuff). Btw, you can insert the tag right next to the description.
-- Script For Bot Description
-- Converted to lua 5 by Madman
-- Touched a bit by jiten

iDelay = 15 -- Delay between MyINFO Sending

tBots = {
	{ "bot1", "mail1", "desc1<++ V:0.668,M:A,H:0/0/1,S:1>", 1024*1024*1024, },
	{ "bot2", "mail2", "desc2<++ V:0.668,M:A,H:0/1/1,S:1>", 1024*1024*1024, },
	{ "bot3", "mail3", "desc3<++ V:0.668,M:A,H:0/1/1,S:1>", 1024*1024*1024, },
	{ "bot4", "mail4", "desc4<++ V:0.668,M:A,H:0/1/1,S:1>", 1024*1024*1024, },
}

Main = function()
	for i = 1, table.getn(tBots) do
		frmHub:RegBot(tBots[i][1])
		SendToAll("$MyINFO $ALL "..tBots[i][1].." "..tBots[i][3].."$ $"..string.char(1).."$"..tBots[i][2].."$"..tBots[i][4].."$")
	end
	SetTimer(60*1000*iDelay) StartTimer()
end

OnTimer = Main

SMF spam blocked by CleanTalk