Jump to content

!allies command


SamB

Recommended Posts

Posted

make the list be in txt file, will be better..

The command:

on *:SIGNAL:mta.command:{
 if ($3 == !allies) {
   var %a = 0,%b
   while (%a <= $lines($scriptdir $+ allies.txt)) {
     if (!%b) %b = $read($scriptdir $+ allies.txt,%a)
     elseif (%b) %b = %b $+ , $read($scriptdir $+ allies.txt,%a)
     !inc %a
   }
   mta.text $1 $iif(%b,Allies: $v1,No allies on the list)
 }
}

and the .txt:

Teppe
No-Fear
etc.

OR if you prefer ini...

The command:

on *:SIGNAL:mta.command:{
 if ($3 == !allies) {
   var %a = 0,%b
   while (%a <= $ini($scriptdir $+ allies.ini,ALLIES,0)) {
     if (!%b) %b = $ini($scriptdir $+ allies.ini,ALLIES,%a)
     elseif (%b) %b = %b $+ , $ini($scriptdir $+ allies.ini,ALLIES,%a)
     !inc %a
   }
   mta.text $1 $iif(%b,Allies: $v1,No allies on the list)
 }
}

and the .ini:

[ALLIES]
Teppe=1
No-Fear=1
etc.=1

Do not PM me, im not going to read it anyway.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...