Guides » mIRC - MSL » VIP Script - Release

Dette er mit første VIP script og mit første størrere script. Dette er ikke en guide, men et release af mit VIP script.
 
Langt om længe blev jeg færdig med mit VIP script med lidt hjælp, det lykkeds mig desvære ik at få hjælp her inde fra, men var heldig at have et par m8s der kunne det jeg manglede :)


Botten er fatisk nem nok at sætte op da den selv spørger efter info ved load via on *:load:
Det den skal bruge er det navn du selv har på irc nu, kanalen som botten skal fungere på samt hvilken mode vip botten skal give som standart (denne kan ændres via $vip mode)


Der er disse commands (der er beskrevet hvad de gør i $vip help cmd, fx $vip help add)
$vip add #chan mode (mode er det som de skal have på den kanal du adder for at få op eller voice på din kanal)
$vip del #chan
$vip addadmin nick (tilføjer en admin som kan bruge de andre commands og tilføje nye kanaler)
$vip del addmin nick
$vip addmaster nick (samme som admin dog kan denne ændre på $vip mode og $vip skin samt tilføje og slette brugere=
$vip delmaster nick
$vip list (udskriver listen af kanaler)
$vip userlist
$vip skin nyt skin der kan bruges :nick: :host: og :chans: til at udskrive de forskellige ting.
$vip mode @/+ (vip mode er det som folk skal have på din kanal er det @ får de op og + giver voice)



Som sagt kan der fines mere hjælp ved $vip help cmd
Dette script er på englesk for at lave det mere internationalt samt der hvor jeg selv skulle bruge det er international kanal, du skal være velkommen til at rette til dansk hvis du lyster.


Er der fejl eller har du bare kommentar eller andet til scriptet så skriv endelig.


skulle det ske at den ikke selv opretter vipinfo.ini så skal du selv oprettet filen ved navn vipinfo.ini i roden ad botten irc mappe. fx C:\mIRC


ini filen skal se sådan ud
[masters]
*!*ident@host=nick



fx min er
[masters]
*!*chi@staff.steambans.com=SB|ReLaX



der kommer os andet i filen men dette er bare hvad der skal bruges hvis den ik selv bliver oprettet under on *:load: eventen


Scriptet kan ses i funktion på #NeedClan!


Her er så Scriptet håber i kan bruge det :)


on *:load:{
echo -a 7##################################################
echo -a 7#--------------- 3V.I.P. Sctipt 7------------------#
echo -a 7#---------------- 3Version 1.0 7-------------------#
echo -a 7#------------------------------------------------#
echo -a 7#------------------ 3By ReLaX 7--------------------#
echo -a 7#----------------- 3#NeedClan! 7-------------------#
echo -a 7#-------------- 3www.webdesignz.dk 7---------------#
echo -a 7##################################################
writeini vipinfo.ini masters $address( $+ $$?="Enter you IRC nickname as it is RIGHT now" $+ ,1) OWNER
set %vip.chan $$?="Enter the your VIP channel (eg #NeedClan!)"
set %vip.mode $$?="Set vip mode (@ or +) can be changed by $vip mode @/+"
set %vip.skin V.I.P - :nick: (:host:) is V.I.P on :chans:
}


on *:JOIN:%vip.chan: {
set -u30 %vipchan. [ $+ [ $nick ] ] $chan
whois $nick
}


raw 319:*: {
if (%vipchan. [ $+ [ $2 ] ] != $null) {
var %i = 1, %c, %l
while ($ini(vipinfo.ini,chans,%i)) {
var %c = $ifmatch, %m = $readini(vipinfo.ini,chans,%c)
if ($+(*,%m,%c,*) iswm $3-) {
var %l = $addtok(%l, $readini(vipinfo.ini,chans,%c) $+ %c,32)
}
inc %i
}
if (%l != $null) {
var %vip.message = $replace(%vip.skin,:nick:,$2)
var %vip.message = $replace(%vip.message,:host:,$address($2,1))
var %vip.message = $replace(%vip.message,:chans:,$replace(%l,$chr(32),$chr(32) $chr(45) $chr(32)))
msg %vipchan. [ $+ [ $2 ] ] %vip.message
mode %vipchan. [ $+ [ $2 ] ] + $+ $replace($replace(%vip.mode,+,v),@,o) $2
unset %vipchan. [ $+ [ $2 ] ]
}
}
}


on *:text:$vip *:%vip.chan:{
if ($readini(vipinfo.ini,admins,$address($nick,1))) || ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($2 = add) {
if ($readini(vipinfo.ini,chans,$3)) {
notice $nick The channel $3 is already added
}
else {
var %status = $4
if (!$4) {
%status = @
}
writeini vipinfo.ini chans $3 %status
notice $nick The channel ( $+ %status $+ ) $3 has been added
}
}
elseif ($2 = del) {
if ($readini(vipinfo.ini,chans,$3)) {
remini vipinfo.ini chans $3
notice $nick The channel $3 has been removed
}
else {
notice $nick The channel $3 is not added
}
}
elseif ($2 = list) {
var %number = $calc($ini(vipinfo.ini,chans,0)+1)
notice $nick V.I.P list << $+ %number channels>>
var %i = 1
var %c.n = 1
var %timer = 1
while (%i < %number) {
var %chan = $ini(vipinfo.ini,chans,%i)
if (%c.n == 15) {
var %chans = %chans ( $+ $readini(vipinfo.ini,chans,%chan) $+ ) %chan
timer 1 %timer notice $nick %chans
unset %chans
unset %c.n
inc %timer
inc %timer
}
else {
var %chans = %chans ( $+ $readini(vipinfo.ini,chans,%chan) $+ ) %chan -
}
inc %i
inc %c.n
}
notice $nick %chans
unset %chans
unset %c.n
}
elseif ($2 = userlist) {
var %number.m = $calc($ini(vipinfo.ini,masters,0)+1)
var %number.a = $calc($ini(vipinfo.ini,admins,0)+1)
var %i.m = 1
var %i.a = 1
var %users.m = Masters: 
var %users.a = Admins: 
while (%i.m < %number.m) {
var %user.m = $ini(vipinfo.ini,masters,%i.m)
var %users.m = %users.m $readini(vipinfo.ini,masters,%user.m) ( $+ %user.m $+ ) -
inc %i.m
}
while (%i.a < %number.a) {
var %user.a = $ini(vipinfo.ini,admins,%i.a)
var %users.a = %users.a $readini(vipinfo.ini,admins,%user.a) ( $+ %user.a $+ ) -
inc %i.a
}
notice $nick %users.m
notice $nick %users.a
}
elseif ($2 = mode) {
if ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($3) {
if ($3 = @) || ($3 = +) {
if ($3 = %vip.mode) {
notice $nick Vip.mode is already %vip.mode
}
else {
set %vip.mode $3
notice $nick Vip mode has been changed to " $+ %vip.mode $+ "
}
}
else {
notice $nick Vip mode needs to be @ (op) or + (voice)
}
}
else {
notice $nick Vip mode is " $+ %vip.mode $+ "
}
}
else {
notice $nick You do NOT have access to do that!
}
}
elseif ($2 = skin) {
if ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($3) {
set %vip.skin $3-
notice $nick V.I.P skin has been changed to " $+ %vip.skin $+ "
}
else {
notice $nick Skin: %vip.skin
}
}
else {
notice $nick You do NOT have access to do that!
}
}
elseif ($2 = addadmin) {
if ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($readini(vipinfo.ini,admins,$address($3,1))) {
notice $nick The admin $3 is already added
}
else {
writeini vipinfo.ini admins $address($3,1) $3
notice $nick The admin $3 has been added
}
}
else {
notice $nick You do NOT have access to do that!
}
}
elseif ($2 = deladmin) {
if ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($readini(vipinfo.ini,admins,$address($3,1))) {
remini vipinfo.ini admins $address($3,1)
notice $nick The admin $3 has been removed
}
else {
notice $nick The admin $3 is not added
}
}
else {
notice $nick You do NOT have access to do that!
}
}
elseif ($2 = addmaster) {
if ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($readini(vipinfo.ini,masters,$address($3,1))) {
notice $nick The master $3 is already added
}
else {
writeini vipinfo.ini masters $address($3,1) $3
notice $nick The master $3 has been added
}
}
else {
notice $nick You do NOT have access to do that!
}
}
elseif ($2 = delmaster) {
if ($readini(vipinfo.ini,masters,$address($nick,1))) {
if ($readini(vipinfo.ini,masters,$address($3,1))) {
remini vipinfo.ini masters $address($3,1)
notice $nick The master $3 has been removed
}
else {
notice $nick The master $3 is not added
}
}
else {
notice $nick You do NOT have access to do that!
}
}
elseif ($2 = help) {
if ($3 = add) { notice $nick Help for add: Syntax: $chr(36) $+ vip add #channel @/+ - This will add a channel to the V.I.P list }
elseif ($3 = del) { notice $nick Help for del: Syntax: $chr(36) $+ vip del #channel - This will delete a channel from the V.I.P list }
elseif ($3 = list) { notice $nick Help for list: Shows the list of V.I.P channels }
elseif ($3 = addadmin) { notice $nick Help for addadmin: Syntax: $chr(36) $+ vip addadmin nick - This will add a V.I.P admin }
elseif ($3 = deladmin) { notice $nick Help for deladmin: Syntax: $chr(36) $+ vip deladmin nick - This will delete a V.I.P admin }
elseif ($3 = addmaster) { notice $nick Help for addmaster: Syntax: $chr(36) $+ vip addmaster nick - This will add a V.I.P master (masters can add/del admins and masters, and they can use the skin and mode command) }
elseif ($3 = delmaster) { notice $nick Help for delmaster: Syntax: $chr(36) $+ vip delmaster nick - Thiss will delete a V.I.P master }
elseif ($3 = userlist) { notice $nick Help for userlist: Shows the list of admins and masters }
elseif ($3 = mode) { notice $nick Help for mode: Syntax: $chr(36) $+ vip mode @/+ - This is the mode V.I.Ps will get when they join (only a master can use the mode command) }
elseif ($3 = skin) { notice $nick Help for skin: Syntax: $chr(36) $+ vip skin or $chr(36) $+ vip skin - To insert nick use :nick:, users host :host: and the V.I.P channels :chans: (only masters can use the skin command) }
else {
timer 1 1 notice $nick Commands: add - del - list - addadmin - deladmin - addmaster - delmaster - userlist - mode - skin
timer 1 2 notice $nick To help for each command use $chr(36) $+ vip help command
timer 1 3 notice $nick Remember to use $chr(36) $+ vip before the command like $chr(36) $+ vip add #channel @
}
}
}
else {
notice $nick You do NOT have access to do that!
}
}



Enjoy!
Skrevet af Christian Nyhuus - Onsdag den 22 august 2007. kl. 15:16 * Læst 3645 gang(e)



Kommentar


Christian Nyhuus
Jeg håber i kan bruge dette script til noget, selvom det godt nok ikke er en guide
 
Garf
Jo da vil da prøve det :D
 

Forside
Omkring mig
Billede Galleri
Film Galleri
Guides
Links
Søg
Sitemap
RSS Feed for Webdesignz.dk