Is there an easier way to do this? - 25/02/12 01:23 AM
is there an easier way to do this, because i don't feel like repeating the $# thing so it can search the sentence till it finds the word in the botdata.ini file.
Code:
on 1:TEXT:!define *:#:{ .writeini botdata.ini Define-Explain $2 $3- .msg $chan The Definition Of ( $2 ) Has Been Set. } on 1:TEXT:*:#:{ if ($readini(botdata.ini,Define-Explain,$1) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$1) != $null) { /timer1 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$1) } if ($readini(botdata.ini,Define-Explain,$2) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$2) != $null) { /timer2 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$2) } if ($readini(botdata.ini,Define-Explain,$3) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$3) != $null) { /timer3 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$3) } if ($readini(botdata.ini,Define-Explain,$4) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$4) != $null) { /timer4 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$4) } if ($readini(botdata.ini,Define-Explain,$5) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$5) != $null) { /timer5 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$5) } if ($readini(botdata.ini,Define-Explain,$6) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$6) != $null) { /timer6 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$6) } if ($readini(botdata.ini,Define-Explain,$7) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$7) != $null) { /timer7 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$7) } if ($readini(botdata.ini,Define-Explain,$8) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$8) != $null) { /timer8 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$8) } if ($readini(botdata.ini,Define-Explain,$9) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$9) != $null) { /timer9 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$9) } if ($readini(botdata.ini,Define-Explain,$10) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$10) != $null) { /timer10 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$10) } if ($readini(botdata.ini,Define-Explain,$11) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$11) != $null) { /timer11 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$11) } if ($readini(botdata.ini,Define-Explain,$12) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$12) != $null) { /timer12 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$12) } if ($readini(botdata.ini,Define-Explain,$13) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$13) != $null) { /timer13 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$13) } if ($readini(botdata.ini,Define-Explain,$14) == $null) { } elseif ($readini(botdata.ini,Define-Explain,$14) != $null) { /timer14 1 1 .msg $chan $readini(botdata.ini,Define-Explain,$14) } }