mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
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

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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

Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
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?

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
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

Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
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?

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
You already have link timeout code, and you want it adapted?

Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
links were just an example but pretty much anything

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
example code of this?

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
you didn't answer any of my questions

Joined: Dec 2018
Posts: 53
T
TroyL Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Dec 2018
Posts: 53
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?


Link Copied to Clipboard