As the title says, simply adds someone as Special Friend, Scripting Helper etc.
Things to do :
1) Set a variable called %level containing all levels you've created; Example : %level 250 500 750 900 1000
2) Create A Section In Staff.ini File Called [DontUse] And Create An Item Containing The Titles You Dont Want Others To Use. Edit The Item Name In The End Of Code Too To Make It Work!
[*]Paste This In Your Staff.ini File :
[gTitles]
250=Hammer's Friend
500=Hammer's Special Friend
750=Troller
900=Scripting Helper
1000=The Pro Troller
Please report if there is any bug!
; Addstaff And Title Beta 1.1
; By Hammer
; gs.mindfreakers.net #Hawkee
alias addlevel {
if ($1 && $2) { set %levels %levels $2 | writeini Staff.ini gTitles $1 $2- | echo -a Level $1 Added! | halt }
else { echo -a Syntax : /addlevel <level> <title> }
}
on *:TEXT:!addstaff*:#: {
if ($nick !isop #) { msg $chan You're not an OP. Only OPs can use this command. }
else {
if ($2- == $null) {
msg $chan The Following Levels Are Available:
var %x = 1
while ($ini(Staff.ini,gTitles,%x)) {
msg $chan Level $ini(Staff.ini,gTitles,%x) - $readini(Staff.ini,n,gTitles,$ini(Staff.ini,gTitles,%x))
inc %x
}
msg $chan Syntax : !addstaff <Nickname> <Level>
halt
}
if ($3 == $null) {
msg $chan Please Choose A Level For $2
halt
}
if ($3 == 1) {
tokenize 32 Staff Welcome gLevels
remini Staff.ini $* $2
kick # $2 Please Rejoin To Get Your Normal Status.
msg $chan Added $2 As $3
halt
}
if (($2) && ($3)) {
if ($2 !ison #) { msg $chan $2 Isn't Online!
halt }
if ($2 ison #) {
if ($3 isin %levels) {
writeini Staff.ini Staff $2 $readini(Staff.ini,n,gTitles,$3)
writeini Staff.ini Welcome $2 $readini(Staff.ini,n,gTitles,$3) $2
writeini Staff.ini gLevels $2 $3
kick # $2 You Have Been Added To Our Special Users List! Please Rejoin.
msg $chan Added $2 As $3
halt
}
elseif ($3 !isin %levels) { msg $chan Level $3 Doesn't Exist! }
}
}
}
}
on *:JOIN:#: {
if ($nick == $me) { halt }
if ($readini(Staff.ini,n,Welcome,$nick) == $null) {
writeini Staff.ini Welcome $nick $nick
}
if ($readini(Staff.ini,n,ID,$nick) == $null) {
set %rand $rand(1,10000)
if ($readini(Staff.ini,n,USED_IDs,%rand) != USED) {
writeini Staff.ini ID $nick $rand(1,10000)
writeini Staff.ini USED_IDs %rand USED
}
}
if ($readini(Staff.ini,n,Greets,$nick) == $null) {
msg $chan [ $+ $readini(Staff.ini,n,Welcome,$nick) $+ ] No greet. Type !Greet to set one.
}
else {
msg $chan [ $+ $readini(Staff.ini,n,Welcome,$nick) $+ ] $readini(Staff.ini,n,Greets,$nick)
}
if ($readini(Staff.ini,n,Staff,$nick) != $null) {
if ($readini(Staff.ini,n,gLevels,$nick) == 250) {
mode # +h $nick
}
if ($readini(Staff.ini,n,gLevels,$nick) == 500) {
mode # +v $nick
}
if ($readini(Staff.ini,n,gLevels,$nick) == 750) {
mode # +h $nick
}
if ($readini(Staff.ini,n,gLevels,$nick) == 900) {
mode # +oa $nick $nick
}
if ($readini(Staff.ini,n,gLevels,$nick) == 1000) {
mode # +qao $nick $nick $nick
}
}
if ($readini(Staff.ini,n,Blacklist,$nick) != $null) {
kick # $nick You Are Banned.
halt
}
}
on *:TEXT:!greet*:#: {
writeini Staff.ini Greets $nick $2-
msg $chan Greet Set To : $2-
}
on *:TEXT:!title*:#: {
if ($2- == $null) {
msg $chan Format : !title <Title to add> - Will Add A Title Infront Of Your Name.
msg $chan Please Do Not Choose GM/GA/Owner Or Any Similar Titles Or You Will Be Banned.
halt
}
else {
if ($2 isin $readini(Staff.ini,n,DontUse,A)) {
msg $chan You want yourself to get banned?
}
}
if ($readini(Staff.ini,n,Staff,$nick) == $null) {
writeini Staff.ini Welcome $nick $2- $nick
msg $chan Title Saved.
halt
}
if ($readini(Staff.ini,n,Staff,$nick) != $null) {
msg $chan You're Already Added In Staff And Have A Staff Title. You Cannot Change It Unless You Get Kicked Out From Staff.
halt
}
}
; Additional Snippet
on *:TEXT:!info*:#: {
if ($readini(staff.ini,n,Welcome,$2) != $null) {
msg $chan 9Nickname : $2
msg $chan 8Unique ID : $readini(staff.ini,n,ID,$2)
if ($readini(staff.ini,n,gLevels,$2) != $null) { msg $chan 11Staff Level : $readini(staff.ini,n,gLevels,$2) }
if ($readini(staff.ini,n,Welcome,$2) == $2) { msg $chan 4Title : No Title Set! }
if ($readini(staff.ini,n,Welcome,$2) != $2) { msg $chan 7Title : $readini(staff.ini,n,Welcome,$2) }
if ($readini(staff.ini,n,Greets,$2) == $null) { msg $chan 4Greet : No Greet Set! }
if ($readini(staff.ini,n,Greets,$2) != $null) { msg $chan 9Greet : $readini(staff.ini,n,Greets,$2) }
halt
}
elseif ($2 == $null) {
msg $chan Syntax : !info <Nickname>
halt
}
if ($readini(staff.ini,n,Welcome,$2) == $null) { msg $chan $2 Doesn't Exist In My Database $+ ! }
}
So the above is the same as having a remini for each topic ? If I do a
tokenize 32 R1 R2 R3 R4 R5 And.so.on
remini Whatever.ini $* whatever
It wil remove whatever entry in all the "topics" listed in the tokenize ?
EDiT
A yes or no would have been appreciated... but am gonna try it next time I re-code My fail @Jethro
There's an alias (addlevel) that i added just now, that'll do it for you. And just to confirm, check whether you added the level in the variable in %levels as well, that plays an important role.