mIRC Home    About    Download    Register    News    Help

Print Thread
None of my sub scripts are working #264668
29/12/18 07:14 PM
29/12/18 07:14 PM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
So basically this code isnt working
Code:
if (($msgtags(msg-id).key == sub) && ($msgtags(room-id).key == 30084163)) {
    var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
    var %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime)
    msg $1 /me bingAw NEW SUB!! rooAww Thank You %nick For Subscribing With A %sub-plan Sub! Welcome! bingAw rooAww
   
  }
if (($msgtags(msg-id).key == resub) && ($msgtags(room-id).key == 30084163)) {
    var %nick $iif($msgtags(display-name).key, $v1, $msgtags(login).key)
    VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99, Prime, Prime) 
    msg $1 /me rooAww RESUB!! rooHappy %nick Has Just Resubscribed For $msgtags(msg-param-months).key Months In A Row With A %sub-plan Sub! Welcome Back! rooAww rooHappy
    
  }
if (($msgtags(msg-id).key == subgift) && ($msgtags(room-id).key == 30084163)) {  
    var %nick_from $iif($msgtags(display-name).key, $v1, $msgtags(login).key) , %nick_to $iif($msgtags(msg-param-recipient-display-name).key, $v1, $msgtags(msg-param-recipient-user-name).key)
    VAR %sub-plan $replace($msgtags(msg-param-sub-plan).key, 1000, $chr(36) $+ 4.99, 2000, $chr(36) $+ 9.99, 3000, $chr(36) $+ 24.99)
    msg $1 /me rooGift GIFTED SUB!! rooGift Thank you %nick_from For Gifting A %sub-plan Sub To %nick_to $+ ! Welcome! agonySUB rooGift
   
  }
 }

it was working a few days ago and now its not

Re: None of my sub scripts are working [Re: TroyL] #264670
29/12/18 07:34 PM
29/12/18 07:34 PM
Joined: Jan 2004
Posts: 1,158
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,158
you must've changed something.
try adding a line performing an echo to the status window, so you can see if the line is even being reached. also another similar line as the first command inside the :TEXT: handler. If they're not being shown to the status window, that means you've done something to disable it. most likely candidates:

1. You put another :TEXT: handler above it within the same script
2. The :TEXT: handler has the @ prefix and you're not Op
3. You disabled events handlers and typing /remote says remote events are off, in which case you can re-enable that with "/remote on"


Code:
//echo -s this debug message comes from line $scriptline of $script

Re: None of my sub scripts are working [Re: maroon] #264674
31/12/18 03:57 AM
31/12/18 03:57 AM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
Could you provide an example of it? And also it started the day after i downloaded the json mirc file to get the variables for an uptime command. So could that of caused this?

Re: None of my sub scripts are working [Re: TroyL] #264675
31/12/18 04:41 AM
31/12/18 04:41 AM
Joined: Jan 2004
Posts: 1,158
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,158
this looks like the code i suggested in
https://forums.mirc.com/ubbthreads.php/topics/264614/Re:_Script_Response_Time#Post264614

Do you still have those 3 lines below the line?
raw USERNOTICE:*:{
Those lines were echoing debug info to a custom @Sub window. If that code is still there, is there anything showing up in that window? If not, maybe your $msgtags(room-id).key is no longer 30084163 or there's another :USERNOTICE: event above this event handler that's stealing everything. Or maybe "/remote" says OFF.

Offhand, the only way I can think of that a JSON script would disable this would be if it contained a 'msg' that isn't working right, or if it uses :PARSELINE: to intercept server messages and replaces them with garbled text. You could temporarily uninstall the JSON script to see if the problem goes away, but I kinda doubt it's the problem.

Be sure to scout your status window for any error messages that might be related.

Re: None of my sub scripts are working [Re: maroon] #264684
01/01/19 12:10 AM
01/01/19 12:10 AM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
I checked about the room id but when i use the room id code that would always work it just shows "Room ID: " then its blank.



UPDATE: SUBS AN BITS are working now

Also every time i talk in a chat, on mIRC in the status windows it keeps saying USERSTATE or ROOMSTATE

Re: None of my sub scripts are working [Re: TroyL] #264692
02/01/19 03:38 AM
02/01/19 03:38 AM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
Ok so say if someone posts a link and they're not supposed to and my bot times them out, how would i give them a 5 second time out as a warning and then the next time they do it they get timed out for 600 seconds. So basically how do i code a warning system for my bot?

Re: None of my sub scripts are working [Re: TroyL] #264693
02/01/19 05:51 AM
02/01/19 05:51 AM
Joined: Jan 2004
Posts: 1,158
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,158
You already have link timeout code, and you want it adapted?

Re: None of my sub scripts are working [Re: maroon] #264694
02/01/19 06:17 AM
02/01/19 06:17 AM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
links were just an example but pretty much anything

Re: None of my sub scripts are working [Re: TroyL] #264696
02/01/19 06:47 AM
02/01/19 06:47 AM
Joined: Jan 2004
Posts: 1,158
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,158
It could probably be adapted from the flood counter, where instead of counting how many times they say something, it would check to see if they said 'link' one time. In the action section, you would check to see if the warning flag exists. If it does not exist, you set the warning flag and give the warning. But if it does already exist, you lower the boom.

It was ambiguous if you to ban all links or exempt some. To ban a link, you'd need to come up with a definition for what that is, especially if you want to flag strings containing http or beginning with it, containing www. etc. It can get very easy to have false positives.

Re: None of my sub scripts are working [Re: maroon] #264701
03/01/19 05:16 AM
03/01/19 05:16 AM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
example code of this?

Re: None of my sub scripts are working [Re: TroyL] #264702
03/01/19 07:02 AM
03/01/19 07:02 AM
Joined: Jan 2004
Posts: 1,158
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,158
you didn't answer any of my questions

Re: None of my sub scripts are working [Re: maroon] #264707
04/01/19 05:52 AM
04/01/19 05:52 AM
Joined: Dec 2018
Posts: 52
T
TroyL Offline OP
Babel fish
TroyL  Offline OP
Babel fish
T

Joined: Dec 2018
Posts: 52
OK this doesn't matter i figured out how to do this but my bot isnt picking up on someone doing /me so how do i put that in the on *:text:* thing?