PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: GeceBekcisi on 30 April, 2005, 00:44:12

Title: Description Changer
Post by: GeceBekcisi on 30 April, 2005, 00:44:12
Maybe I have stirict rules in my hub but some of users (and even my OPs sometimes) keep on using naughty words or ads in their description. I don't want to kick them because of this, but I think I can compete with them in someway.. That's why I need a script to modify given nicks' descriptions.. Can anyone help me?
Title:
Post by: Cêñoßy†ê on 30 April, 2005, 01:47:22
Try this hawks nice script..
If u want to remove completely original profiles description,just remove  "..desc.." from that profile :D

Error fixed.. Thx Hawk

Original:
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.." "..OpsTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end

Description removed:
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.." "..OpsTagInDescription.." $ $"..speed.."$"..email.."$"..share.."$")
end
end
end

Here is the script:
--Description Tag by ??????Hawk?????? 05-07-2004
--Add Description For Moderator And NetFounder by 6Marilyn6Manson6
--===Sets the tag to be shown in Vip's descriptions=================

VipTagInDescription = "{ViP}"   --\\ Tag

--==================================================================
--===Sets the tag to be shown in op's descriptions==================

OpsTagInDescription = "{OP}"   --\\ Tag

--==================================================================
--===Sets the tag to be shown in masters's descriptions=============

MastersTagInDescription = "{MaSTeR}"   --\\ Tag

--==================================================================
--===Sets the tag to be shown in moderators's descriptions==========

ModeratorTagInDescription = "{MoDeRaToR}"   --\\ Tag

--==================================================================
--===Sets the tag to be shown in NetFounder's descriptions==========

NetFounderTagInDescription = "{NetFounder}"   --\\ Tag

--==================================================================
--===Sets the tag to be shown in reg's descriptions=================

regTagInDescription = "{ReG}"   --\\ Tag

--==================================================================
--===Sets the time for the tags to be upos.dated====================

Mins =  1

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



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

function OnTimer()
TagInDescription()
end

function TagInDescription()
local aux,usr
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("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.." "..OpsTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
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.." "..MastersTagInDescription.."  "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
for aux, usr in GetUsersByProfile("Moderator") 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.." "..ModeratorTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
end
end
end
for aux, usr in GetUsersByProfile("NetFounder") 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.." "..NetFounderTagInDescription.." "..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

Title:
Post by: ??????Hawk?????? on 30 April, 2005, 01:55:57
hi m8  

Error in above code

lineSendToAll( "$MyINFO $ALL "..name.." "..MastersTagInDescription.." " "..desc.."$ $"..speed.."$"..email.."$"..share.."$")

should be
SendToAll( "$MyINFO $ALL "..name.." "..MastersTagInDescription.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")

??????Hawk??????
Title:
Post by: GeceBekcisi on 30 April, 2005, 02:04:47
Hmm.. I saw these but.. Here is an example of what I need...

Users Desc
a I am an asshole trying to ad here...
b I can't control my hands from swearing
c I am too lamer pls help me
d I am op but I dunno how I became


Cos I wanna humiliate them for what they are doing with my words...
Title:
Post by: vadertje on 06 May, 2005, 23:18:37
Syntax [string "--Description Tag by ??????Hawk?????? 05-07-2004
..."]:106: `end' expected (to close `for' at line 98) near `'      <<<
Title:
Post by: ??????Hawk?????? on 07 May, 2005, 02:05:03
hi m8  


See LUA 5 finished scripts section



??????Hawk??????