tag script
 

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

tag script

Started by ]-[?LL?L?L??nG?L, 16 March, 2008, 13:48:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

]-[?LL?L?L??nG?L

Can I plz have a conversion to the new API of this little script plz  :P :P
-- Another try ;-)
---Lua 5 Description Tag by ??????Hawk?????? 07-05-2005
-- Lua 5.1 ny Madman, 16.04.06
--Commands
--
--	!dset [Nick] [Description]		Sets the Description ov a Given User
--	!ddel [Nick]					Sets description back to Normal. Requires user to log back in to clear.
--


HubOwner = "]-[?LL?L?L??nG?L"		--// Set Your Nick Here
Mins =  1						--// Time in mins to update the Tags

tTables = {
tProfiles = {
	["0"]  = {		
		["Enable"] = 0,				--//  1 to enable tag    0 to disable
		["Description"] = "owner",	--// Set the Owner Tag Here Eg.   ["Description"] = "I AM THE OWNER",
		},
	["0"] = {
		["Enable"] = 1,
		["Description"] = "master",		--// Set the Master Tag Here
		},
	["2"] = {
		["Enable"] = 0,
		["Description"] = "superUser",		--// Set the SuperUser Tag Here
		},
	["1"] = {
		["Enable"] = 1,
		["Description"] = "op",		--// Set the OP Tag Here
		},
	["4"] = {
		["Enable"] = 0,
		["Description"] = "kvip",	--// Set the KVIP Tag Here
		},
	["2"] = {
		["Enable"] = 1,
		["Description"] = "vip",		--// Set the VIP Tag Here
		},
       	["3"] = {
		["Enable"] = 1,
		["Description"] = "reg",		--// Set the Reg Tag Here
		},



},
tUserCommands = {
	["!dset"] = function(user,data)
		local _,_,dUser,dDescrip = string.find( data, "%b<>%s+%S+%s+(%S+)%s+(.*)" )
		if dUser and dDescrip then
			tTables.tUsers[dUser] = dDescrip
			user:SendData(tBot,dUser.."'s Description is now set to '"..dDescrip..".")
		else
			user:SendData(tBot,"ERR..  Command is.... !dset [Nick] [Description]")
		end
		return 1
	end,


	["!ddel"] = function(user,data)
		local _,_,dUser = string.find( data, "%b<>%s+%S+%s+(%S+).*" )
		if dUser then
			tTables.tUsers[dUser] = nil
			user:SendData(tBot,dUser.."'s Description is now set to Normal.")
		else
			user:SendData(tBot,"ERR..  Command is....  !ddel [Nick]")
		end
		return 1
	end,
},
tUsers = {},

}

tBot = frmHub:GetHubBotName()
timer = 60000 * Mins
function Main() 
	SetTimer(timer)
	StartTimer() 
end 

function OnTimer()
	for tProfile,tInfo in pairs(tTables.tProfiles) do
		if tTables.tProfiles[tProfile]["Enable"] == 1 then
			for x,usr in pairs(frmHub:GetOnlineUsers(tProfile)) do
				local userToShow = GetItemByName(usr["sName"])
				local s,e,name,desc,speed,email,share = string.find(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
					if tTables.tUsers[userToShow.sName] then
						SendToAll( "$MyINFO $ALL "..name.." "..tTables.tUsers[userToShow.sName].."$ $"..speed.."$"..email.."$"..share.."$")
					else
						SendToAll( "$MyINFO $ALL "..name.." "..tTables.tProfiles[tProfile]["Description"].." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
					end
			end
		end
	end
end

function ChatArrival(curUser, data)
	data = string.sub(data,1,string.len(data)-1)
	local _,_,tCmd = string.find( data, "%b<>%s+(%S+).*" )
		if tCmd  and curUser.sName == HubOwner then
			if tTables.tUserCommands[tCmd] then
				return tTables.tUserCommands[tCmd](curUser, data)
			end
		end
end




Thank You in Advance  :-* :-* :-*

Madman

#1
-- Another try ;-)
---Lua 5 Description Tag by ?˜”??•Hawk•??”˜? 07-05-2005
-- Lua 5.1 ny Madman, 16.04.06
-- Converted to API 2 by Madman,16.03.08
-- Fixed bug with setting nick description, now keeps user org descr

--Commands
--
--	!dset [Nick] [Description]		Sets the Description ov a Given User
--	!ddel [Nick]					Sets description back to Normal. Requires user to log back in to clear.
--


HubOwner = "]-[€LL?L?††L€?nG€L"		--// Set Your Nick Here
Mins =  1						--// Time in mins to update the Tags

tTables = {
	tProfiles = {
		["0"]  = {		
			["Enable"] = 0,				--//  1 to enable tag    0 to disable
			["Description"] = "owner",	--// Set the Owner Tag Here Eg.   ["Description"] = "I AM THE OWNER",
			},
		["0"] = {
			["Enable"] = 1,
			["Description"] = "master",		--// Set the Master Tag Here
			},
		["2"] = {
			["Enable"] = 0,
			["Description"] = "superUser",		--// Set the SuperUser Tag Here
			},
		["1"] = {
			["Enable"] = 1,
			["Description"] = "op",		--// Set the OP Tag Here
			},
		["4"] = {
			["Enable"] = 0,
			["Description"] = "kvip",	--// Set the KVIP Tag Here
			},
		["2"] = {
			["Enable"] = 1,
			["Description"] = "vip",		--// Set the VIP Tag Here
			},
		["3"] = {
			["Enable"] = 1,
			["Description"] = "reg",		--// Set the Reg Tag Here
			},
	},
	tUserCommands = {
		["dset"] = function(user,data)
			local _,_,dUser,dDescrip = string.find( data, "%b<>%s+%S+%s+(%S+)%s+(.*)" )
			if dUser and dDescrip then
				tTables.tUsers[dUser] = dDescrip
				Core.SendToUser(user,"<"..tBot.."> "..dUser.."'s Description is now set to '"..dDescrip..".")
			else
				Core.SendToUser(user,"<"..tBot.."> ERR..  Command is.... !dset [Nick] [Description]")
			end
			return true
		end,
		["ddel"] = function(user,data)
			local _,_,dUser = string.find( data, "%b<>%s+%S+%s+(%S+).*" )
			if dUser then
				tTables.tUsers[dUser] = nil
				Core.SendToUser(user,"<"..tBot.."> "..dUser.."'s Description is now set to Normal.")
			else
				Core.SendToUser(user,"<"..tBot.."> ERR..  Command is....  !ddel [Nick]")
			end
			return true
		end,
	},
	tUsers = {},
}

tBot = SetMan.GetString(21)
timer = 60000 * Mins

function OnStartup() 
	descT = TmrMan.AddTimer(timer)
end 

function OnTimer(tID)
	if tID == descT then
		for tProfile,tInfo in pairs(tTables.tProfiles) do
			if tTables.tProfiles[tProfile]["Enable"] == 1 then
				for x,usr in pairs(Core.GetOnlineUsers(tonumber(tProfile))) do
					local userToShow = Core.GetUser(usr.sNick,true)
					local s,e,name,desc,speed,email,share = string.find(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
					if tTables.tUsers[userToShow.sNick] then
						Core.SendToAll( "$MyINFO $ALL "..name.." "..tTables.tUsers[userToShow.sNick].." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
					else
						Core.SendToAll( "$MyINFO $ALL "..name.." "..tTables.tProfiles[tProfile]["Description"].." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
					end
				end
			end
		end
	end
end

function ChatArrival(curUser, data)
	local data = string.sub(data,1,-2)
	local _,_,tCmd = string.find( data, "%b<>%s+%p(%S+).*" )
	if tCmd and curUser.sNick == HubOwner then
		if tTables.tUserCommands[tCmd] then
			return tTables.tUserCommands[tCmd](curUser, data),true
		end
	end
end


That should do the trick...

And so Mutor don't have to... ;p
This script is a waste of Bandwith
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

]-[?LL?L?L??nG?L

#2
Ahahahahaha yep he already told me  :-* :-* :-* :-*
and thank you  :-*

?[-?Genius?-]?

Hi

Its possible add Unresterid user In this script?

Tankx :)

SMF spam blocked by CleanTalk