|
Joined: Oct 2014
Posts: 49
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2014
Posts: 49 |
This rank script works up to 1000 points however when this value is exceeded it will no longer give a response. Anyone able to shed any light on this, or even offer a fix?
on *:text:!rank:#:{
if (($readini(Points.ini,$+(#,.,$nick),Points) >= 0) && ($readini(Points.ini,$+(#,.,$nick),Points) < 750)) {
msg # $nick is a solid gold mug. Is that even a good idea? Thank you so much for your support. You can now slap people. Keep it up!
set %hug $addtok(%hug,$nick,32)
set %slap $addtok(%slap,$nick,32)
set %linkok $addtok(%linkok,$nick,32)
set %qok $addtok(%qok,$nick,32)
}
elseif (($readini(Points.ini,$+(#,.,$nick),Points) >= 750) && ($readini(Points.ini,$+(#,.,$nick),Points) < 1000)) {
msg # $nick is a diamond encrusted kettle. That's really something! You're the best, thankyou so much for your support. Keep it up!
set %hug $addtok(%hug,$nick,32)
set %slap $addtok(%slap,$nick,32)
set %linkok $addtok(%linkok,$nick,32)
set %qok $addtok(%qok,$nick,32)
}
elseif (($readini(Points.ini,$+(#,.,$nick),Points) >= 1000) && ($readini(Points.ini,$+(#,.,$nick),Points) > 1000000)) {
msg # $nick is now a crystal teapot full of the finest English breakfast tea around! Congratulations! I can't thank you enough for all of your support, you've watched over 83 hours of strim! <3
set %hug $addtok(%hug,$nick,32)
set %slap $addtok(%slap,$nick,32)
set %linkok $addtok(%linkok,$nick,32)
set %qok $addtok(%qok,$nick,32)
}
elseif ($readini(Points.ini,$+(#,.,$nick),Points) >= 1000000) && ($readini(Points.ini,$+(#,.,$nick),Points) > 5000194) {
msg # $nick is a timelord. I call hax.
set %hug $addtok(%hug,$nick,32)
set %slap $addtok(%slap,$nick,32)
set %linkok $addtok(%linkok,$nick,32)
set %qok $addtok(%qok,$nick,32)
}
}
|
|
|
|
Joined: Jan 2004
Posts: 1,360
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 1,360 |
Sure it will: at 1000000
Correct the right side of the third and fourth conditions from > to < (like your previous lines).
Last edited by Loki12583; 21/10/14 02:21 AM.
|
|
|
|
Joined: Oct 2014
Posts: 49
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2014
Posts: 49 |
Yup, it was one of those things we just didn't look for. Cheers Loki :')
|
|
|
|
Joined: Apr 2014
Posts: 14
Pikka bird
|
Pikka bird
Joined: Apr 2014
Posts: 14 |
Need to pull this topic up, as there is something i can't figure out: Currently, the script is deciding it's action on the value of the Points written down in the Points.ini
What would i have to put down, if i want the bot to do a certain action when there is no value for a user in the .ini file? And i don't mean like 0 points or something, i mean literally no value at all.
|
|
|
|
Joined: Jan 2004
Posts: 1,360
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 1,360 |
if ($readini(Points.ini,$+(#,.,$nick),Points) == $null)
|
|
|
|
Joined: Apr 2014
Posts: 14
Pikka bird
|
Pikka bird
Joined: Apr 2014
Posts: 14 |
Guess i made a mistake during the writing part then, as your part of the code seems to be about correct. on *:text:!loc:#:{
if ($readini(Locations.ini,$+(#,.,$nick),Location) == !$null) { return }
writeini -n Locations.ini $nick Location someplace
} When a person types !loc, i want the bot to read the Location.ini file. If there is no value for the user, i want it to write down the value "someplace" for the user. Edit: Alright, it is working not the way i edited the code. Problem is, i would like the whole thing to react to ppl who join the channel, instead of typing !loc. I tried this: on !*:join:#: {
if ($readini(Locations.ini,$+(#,.,$nick),Location) == !$null) { return }
writeini -n Locations.ini $nick Location someplace
} Sadly, it dosn't put the person who join the chat in the .ini file, but the bot itself. Where is my error?
Last edited by Ahramanyu; 29/10/14 02:17 AM.
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
Try to use this code:
on !*:join:#: {
if ($readini(Locations.ini,$nick,Location)) { return }
writeini -n Locations.ini $nick Location someplace
}
on *:text:!loc:#:{
if ($readini(Locations.ini,$nick,Location)) { return }
writeini -n Locations.ini $nick Location someplace
}
|
|
|
|
Joined: Apr 2014
Posts: 14
Pikka bird
|
Pikka bird
Joined: Apr 2014
Posts: 14 |
I did some testing today, and came to this conclussion: on *:text:!loc:#:{
if ($readini(Locations.ini,$+(#,.,$nick),Location) >= !$null) { | halt }
writeini -n Locations.ini $nick Location someplace
} @westor I also tested out your suggestions, and both times, the command with on text worked. The on join tho dosn't work at all. Any idea why this could be?
|
|
|
|
Joined: Dec 2008
Posts: 1,515
Hoopy frood
|
Hoopy frood
Joined: Dec 2008
Posts: 1,515 |
I did some testing today, and came to this conclussion: on *:text:!loc:#:{
if ($readini(Locations.ini,$+(#,.,$nick),Location) >= !$null) { | halt }
writeini -n Locations.ini $nick Location someplace
} @westor I also tested out your suggestions, and both times, the command with on text worked. The on join tho dosn't work at all. Any idea why this could be? When the user joins on the channel the code is writing on the locations.ini the nickname with location to 'someplace' you need to change the 'someplace' to your think there.
|
|
|
|
|