|
Joined: Jul 2014
Posts: 36
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2014
Posts: 36 |
So I'm a twitch streamer ( www.twitch.tv/TylersGaming) and I have a script that gives viewers a certain amount of points per 30 minutes but when I turn this feature on or off, I get this: http://puu.sh/ayF7n/bb313de5c1.pngSame thing for !off too : http://puu.sh/ayF83/50ec19c46e.pngI just can't figure it out because no where in my script has this message. Here is my script : on *:TEXT:!on*:#:{ if ($nick == tylersgaming) { if ($read(botstatus.txt,t,1) == on) {
} if ( $read(botstatus.txt,t,1) == off) { /write -c botstatus.txt /timerAward 0 1800 /awardPoints $chan write botstatus.txt on msg $chan Points will now be awarded. } } }
on *:TEXT:!off*:#:{ if ($nick == tylersgaming) { if ($read(botstatus.txt,t,1) == off) {
} if ( $read(botstatus.txt,t,1) == on) { /write -c botstatus.txt write botstatus.txt off /timerAward off msg $chan Points will no longer be awarded. } }
This is driving me crazy, I just can't figure it out, I'm also in my IRC so feel free just to drop by my chat and we can discuss. XD Also, if anyone knows how to auto update a file so I don't have to upload it everytime there is changes (my points file so people can see) that would be good too. Hope to hear from you guys soon! Thanks for reading!
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Try this:
ON *:TEXT:!on*:#test_chan: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == on) { msg $chan Points already are awarded. }
elseif (%status == off) {
write -c botstatus.txt on
timerAward 0 1800 awardPoints $chan
msg $chan Points will now be awarded.
}
}
ON *:TEXT:!off*:#test_chan: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == off) { msg $chan Points has not awarded. }
elseif (%status == on) {
write -c botstatus.txt off
timerAward off
msg $chan Points will no longer be awarded.
}
}
Last edited by westor; 31/07/14 10:39 AM.
|
|
|
|
Joined: Jul 2014
Posts: 36
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2014
Posts: 36 |
Still getting the same message.
|
|
|
|
Joined: Dec 2013
Posts: 779
Hoopy frood
|
Hoopy frood
Joined: Dec 2013
Posts: 779 |
Your issue seems very simple. You're running your bot and your main account in the same application with different status windows. Which means your scripts will trigger for both users. What you need to do is either stop using your main account on the same mIRC application and get a new portable one or use a check in your scripts to make sure that it only works for your bot. alias bot { if ($me != BOTNAME) { halt } } And then on all your scripts, on the first line you want to add "bot". For example: on *:TEXT:!on*:#:{
bot
if ($nick == tylersgaming) {
if ($read(botstatus.txt,t,1) == on) {
}
if ( $read(botstatus.txt,t,1) == off) {
/write -c botstatus.txt
/timerAward 0 1800 /awardPoints $chan
write botstatus.txt on
msg $chan Points will now be awarded.
}
}
} Edit: Just noticed you got another message in the channel for each attempt, do you have several instances of the script in different files by any chance?
Last edited by Nillen; 31/07/14 11:06 AM.
Nillens @ irc.twitch.tv Nillen @ irc.rizon.net
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Still getting the same message. Oups, sorry my mistake, try this one:
ON !*:TEXT:!on*:#: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == on) { msg $chan Points already are awarded. }
elseif (%status == off) {
write -c botstatus.txt on
timerAward 0 1800 awardPoints $chan
msg $chan Points will now be awarded.
}
}
ON !*:TEXT:!off*:#: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == off) { msg $chan Points has not awarded yet. }
elseif (%status == on) {
write -c botstatus.txt off
timerAward off
msg $chan Points will no longer be awarded.
}
} NOTE: Paste this code into your BOT and not on your mIRC program!!!!!
|
|
|
|
Joined: Jul 2014
Posts: 36
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2014
Posts: 36 |
Your issue seems very simple. You're running your bot and your main account in the same application with different status windows. Which means your scripts will trigger for both users. What you need to do is either stop using your main account on the same mIRC application and get a new portable one or use a check in your scripts to make sure that it only works for your bot. alias bot { if ($me != BOTNAME) { halt } } And then on all your scripts, on the first line you want to add "bot". For example: on *:TEXT:!on*:#:{
bot
if ($nick == tylersgaming) {
if ($read(botstatus.txt,t,1) == on) {
}
if ( $read(botstatus.txt,t,1) == off) {
/write -c botstatus.txt
/timerAward 0 1800 /awardPoints $chan
write botstatus.txt on
msg $chan Points will now be awarded.
}
}
} Edit: Just noticed you got another message in the channel for each attempt, do you have several instances of the script in different files by any chance? I'm not sure how to check for several instances... I just have the script in remote script editor.
|
|
|
|
Joined: Jul 2014
Posts: 36
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2014
Posts: 36 |
Still getting the same message. Oups, sorry my mistake, try this one:
ON !*:TEXT:!on*:#: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == on) { msg $chan Points already are awarded. }
elseif (%status == off) {
write -c botstatus.txt on
timerAward 0 1800 awardPoints $chan
msg $chan Points will now be awarded.
}
}
ON !*:TEXT:!off*:#: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == off) { msg $chan Points has not awarded yet. }
elseif (%status == on) {
write -c botstatus.txt off
timerAward off
msg $chan Points will no longer be awarded.
}
} NOTE: Paste this code into your BOT and not on your mIRC program!!!!! I'm also confused on this, where else can I put this other then remote.ini?
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
On your bot delete your old code and place the new one!
|
|
|
|
Joined: Jul 2014
Posts: 36
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2014
Posts: 36 |
On your bot delete your old code and place the new one! This is annoying, now it's 3 messages, it's getting worse. :S http://puu.sh/ayI7C/28ecf82b84.png
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
LOL!! too complicate you have multiple code paste on your both mIRC clients (yours and your bot) check and remove the older code first from your bot and then paste the new one also search on the script editor the word "I'm already" and delete the code that has this output, and on your client (TylersGaming nickname) somewhere on your remotes you have ON INPUT event remove the !off and !on code to stop display these messages! a better and more easy way is to change the COMMMAND PREFIX try this code and use @on or @off and not !on or !off to faster fix your bug.
ON !*:TEXT:@on*:#: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == on) { msg $chan Points already are awarded. }
elseif (%status == off) {
write -c botstatus.txt on
timerAward 0 1800 awardPoints $chan
msg $chan Points will now be awarded.
}
}
ON !*:TEXT:@off*:#: {
if ($nick !== tylersgaming) { return }
var %status = $read(botstatus.txt,t,1)
if (%status == off) { msg $chan Points has not awarded yet. }
elseif (%status == on) {
write -c botstatus.txt off
timerAward off
msg $chan Points will no longer be awarded.
}
} NOTE: THIS CODE PASTE IT ONLY ON YOUR BOT!!!!!
Last edited by westor; 31/07/14 11:46 AM.
|
|
|
|
Joined: Jul 2014
Posts: 36
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2014
Posts: 36 |
Fixed, turns out I had multiple scripts running (hiding in View)
so I just closed them and it works now XD
|
|
|
|
|