PtokaX forum

Archive => Archived 5.1 boards => Help with scripts => Topic started by: ?SERVUS? on 07 June, 2006, 20:33:35

Title: help for this script: description
Post by: ?SERVUS? on 07 June, 2006, 20:33:35
Hi,

i need this script for PtokaX DC Hub 0.3.4.0k1 [debug]
Please help


--------------------------------------------------
--Description Tag by ??????Hawk?????? 05-07-2004 -
--------------------------------------------------



MasterTagInDescription = "[Admin] "

OperatorTagInDescription = "[Operator] "

VIPTagInDescription = "[VIP] "

RegTagInDescription = "[REG] "

--==================================================================

Mins =  0.1   --===Sets the time for the tags to be updated

--==================================================================



timer = 60000 * Mins
function Main()
SetTimer(timer)
StartTimer()
end

function OnTimer()
TagInDescription()
end

function TagInDescription()
local aux,usr
for aux, usr in GetUsersByProfile("Master") do
if (GetItemByName(usr) ~= nil) then
local userToShow = GetItemByName(usr)
if (userToShow.sMyInfoString ~= nil) then
local s,e,name,desc,speed,email,share = string.find(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
SendToAll( "$MyINFO $ALL "..name.." "..MasterTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
for aux, usr in GetUsersByProfile("Operator") do
if (GetItemByName(usr) ~= nil) then
local userToShow = GetItemByName(usr)
if (userToShow.sMyInfoString ~= nil) then
local s,e,name,desc,speed,email,share = string.find(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
SendToAll( "$MyINFO $ALL "..name.." "..OperatorTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
for aux, usr in GetUsersByProfile("VIP") do
if (GetItemByName(usr) ~= nil) then
local userToShow = GetItemByName(usr)
if (userToShow.sMyInfoString ~= nil) then
local s,e,name,desc,speed,email,share = string.find(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
SendToAll( "$MyINFO $ALL "..name.." "..VIPTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
for aux, usr in GetUsersByProfile("Reg") do
if (GetItemByName(usr) ~= nil) then
local userToShow = GetItemByName(usr)
if (userToShow.sMyInfoString ~= nil) then
local s,e,name,desc,speed,email,share = string.find(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
SendToAll( "$MyINFO $ALL "..name.." "..RegTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
end






THx all

Servus
Title: Re: help for this script: description
Post by: Markitos on 07 June, 2006, 21:38:45
--[[
Modified Description Tag & BadWord in Description by (uk)jay 07/5/2005
My First Attempt at a Script - based on Hawk's Description Tag and plop's wordreplacer
Thx to jiten for help
Sets Description Tag
Markitos ChangeLog:
Removed word replacer 7/6/2006
]]--

--Timer In Mins
Mins =  1
iTime = 60000 * Mins

function Main()
SetTimer(iTime)
StartTimer()
end

tProfiles = {
        [-1] = "{User}", --// Set the User Tag Here
[0]  = "{Master}",        --// Set the Master Tag Here Eg.   [Profile Number] = "I AM A MASTER",
[1] = "{Op}",        --// Set the Operator Tag Here
[2] = "{Vip}",        --// Set the VIP Tag Here
[3] = "{Reg}",        --// Set the Reg Tag Here
[4] = "{Net Founder}",        --// Set the NetFounder Tag Here
[5] = "{Moderator}",        --// Set the Moderator Tag Here
}

function OnTimer()
for tProfile,tDesc in pairs(tProfiles) do
for i,nick in pairs(frmHub:GetOnlineUsers(tProfile)) do
if nick.sMyInfoString ~= nil then
local s,e,name,desc,speed,email,share = string.find(nick.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
SendToAll( "$MyINFO $ALL "..name.." "..tProfiles[tProfile].." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
end


//-Edited
Fixed a "didn't noticed bug"