PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: blastbeat on 09 March, 2007, 01:27:41

Title: description tag script
Post by: blastbeat on 09 March, 2007, 01:27:41
Hi

I have written a new script which based on hawks description tag script. I tried to limit the bandwidth consumption and now the description tag of single users can be changed.

Thanks for comments, blastbeat
Title: Re: description tag script
Post by: bastya_elvtars on 09 March, 2007, 01:43:47
Moved to Finished scripts.
Title: Re: description tag script
Post by: TrIp-iN-SuN on 09 March, 2007, 10:51:48
[11:45] Syntax ...s\065_-_System_-_desctag_by_blastbeat_v0[1][1].4.lua:86: attempt to call a table value

i get error i am profile 6 hubowner tag added but i get that error
Title: Re: description tag script
Post by: blastbeat on 09 March, 2007, 13:29:26
hi

i tested my script with PtokaX 0.3.5.1 with LUA 5.0.2 i think, maybe thats the problem.
Try to use "for i,curUser in ipairs(onlineUsers) do" instead of "for i,curUser in onlineUsers do" in line 86.
I will downlaod a new version of PtokaX and test the script.
Title: Re: description tag script
Post by: TrIp-iN-SuN on 09 March, 2007, 17:48:26
ok tnx and i use lua 5.1
Title: Re: description tag script
Post by: bastya_elvtars on 09 March, 2007, 18:21:48
Uh, oh, please don't post 5.0. :-/
Title: Re: description tag script
Post by: blastbeat on 09 March, 2007, 18:59:02
Hi

the script should work with LUA 5.1 now, and i have changed the timer to prevent overwriting of MyINfos if different users connect in short intervals (< 1 sec)

Title: Re: description tag script
Post by: TrIp-iN-SuN on 09 March, 2007, 20:31:30
works good and if i want use only 4 profile from all how i doing that del profiles my self it's not work i get error

[21:26] Syntax ...s\065_-_System_-_desctag_by_blastbeat_v0[1][1].5.lua:173: attempt to concatenate field 'tagToShow' (a nil value)
Title: Re: description tag script
Post by: blastbeat on 09 March, 2007, 21:41:31
Hi

you dont have to del anything in the settings. if you use only 4 profiles, then the script only uses the first 4 entries in the tag settings because the custom tag names like "[Operator] " are linked with the profil number which is the number of order in the Profiles.xml i think.
But when you delete a profile number with tag in the settings and the script needs it later then errors like "..attempt to concatenate field 'tagToShow' (a nil value)" appear.

if you dont have defined a special tag for an user then is tagToShow=tag[GetUserProfile(username)]=tag[n] with n=-1,0,1,2,...,numberofprofiles

if tag[k] isnt defined in settings then tag[k]=nil and you get an error

hope i was able to help

blastbeat
Title: Re: description tag script
Post by: TrIp-iN-SuN on 11 March, 2007, 22:02:14
no in my hub we have 8 profile but i want to use from all 8 only 4
Title: Re: description tag script
Post by: blastbeat on 11 March, 2007, 23:19:34
Hi

leave the tag blank of the profile you dont want to use in the settings. for example if you dont want to use profile 0,2,3 then change the settings like this:

tag={

--standard profiles:
--
--["profile number"]= "[tagname in description] "

[0]= "",
[1]= "[Aufseher] ",
[2]= "",
[3]= "",
[4]= "[Svip]",
[5]= "[Vip] ",
[6]= "[Reguser] ",
[7]= "[User] ",
[8]= "[Gast] ",
[9]= "[Server] ",
[10]= "[Specialuser] ",
[-1]= "[Unreg] ",

}


blastbeat
Title: Re: description tag script
Post by: TrIp-iN-SuN on 12 March, 2007, 20:57:35
ok tnx :P
[0]= "-={?Master PsySuN?}=-",
[1]= "-={?Op PsySuN?}=-",
[2]= "",
[3]= "",
[4]= "",
[5]= "-={?SuperOp PsySuN?}=-",
[6]= "-={?Owner Of PsySuN?}=-",
[7]= "",
[8]= "",
[9]= "",
[10]= "",
[-1]= "",


i doing this like u tell me and i get error
[21:51] Syntax ...s\065_-_System_-_desctag_by_blastbeat_v0[1][1].5.lua:181: attempt to concatenate field 'tagToShow' (a nil value)
Title: Re: description tag script
Post by: blastbeat on 13 March, 2007, 03:50:18
Hi

i rewrote the script a little bit, now you can switch on/off the profile tag of a certain profile und the tags of unregged user are shown now.

hope it works

blastbeat
Title: Re: description tag script
Post by: TrIp-iN-SuN on 26 May, 2008, 12:24:26
hi same one can convert this script to API 2?