this script does not check if %Bot = On / Off and when i make it type out %bot its null in the message
It does work on setting on / off but when its on its gonna say bot is already on, but it doesent, it just writes on in the file again
my nick is Admin and that works the bot in the database is Bot=on
so %Bot is null here whats the problem ?
on *:TEXT:!bot *:#: {
if (VoltTechBot !isop #) {
msg $chan I don't have mod or im still booting up.
/halt
}
if ($chan == #volttechbot) { /halt }
var %chani = C:\Users\server\Documents\mIRCsave\ $+ $chan $+ \register.txt | var %pointy = C:\Users\server\Documents\mIRCsave\ $+ $chan $+ \Points.ini | var %topic = $+(#,.,$nick) | var %Group = $readini(%pointy,%topic,Group) | var %BotStatus = C:\Users\server\Documents\mIRCsave\ $+ $chan $+ \database.ini | var %topicb = Bot.Status | var %Bot = $read(%BotStatus,%topicb,Bot)
if (%Group == Admin) {
if ($2 == Off) {
if (%bot == off) {
msg $chan Bot is already Off
/halt
}
/msg $chan Bot is now Off
var %topicb = Bot.Status
writeini -n %botstatus %topicb Bot off
/halt
}
if ($2 == On) {
if (%bot == on) {
msg $chan Bot is already On
/halt
}
/msg $chan Bot is now On
var %topicb = Bot.Status
writeini -n %botstatus %topicb Bot on
/halt
}
}
}