mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Re: (TWITCH) Adding currencies [Re: FoxInABox] #259396 14/11/16 08:28 PM
Joined: Sep 2016
Posts: 34
F
Furiny Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Sep 2016
Posts: 34
Let me clarify a bit - I mean that I want the script to run 3,6,9,12,15,18,21 etc.. No need less than 3 months at all so I put key > 3.

Code:
raw USERNOTICE:*:{
  if ($msgtags(room-id).key == 12665) && (resub isin $msgtags) {
    if ($msgtags(msg-param-months).key > 3 ) && (3 // $msgtags(msg-param-months).key) {
      msg $1 !bonus $msgtags(display-name).key $calc( 500 + 100 *   $floor( $calc( ( $msgtags(msg-param-months).key / 3 ) - 1 ) ) )
    }
  }

Re: (TWITCH) Adding currencies [Re: Furiny] #259397 14/11/16 09:51 PM
Joined: Oct 2016
Posts: 14
F
FoxInABox Offline
Pikka bird
Offline
Pikka bird
F
Joined: Oct 2016
Posts: 14
3 // X makes sure it is:
0 3 6 9 and so on

The X > 0 part was just to stop it from accepting 0 as a valid value, as the value have to be greater.

By checking if X > 3 will make it so that X can not be exactly 3 anymore.

You can of course try X >= 3, but I just wasn't sure why it didn't work earlier.

Re: (TWITCH) Adding currencies [Re: FoxInABox] #259418 18/11/16 04:36 PM
Joined: Sep 2016
Posts: 34
F
Furiny Offline OP
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Sep 2016
Posts: 34
Hey,
I had chance to test today so it's working nicely! Jilech has to sub for 36months to get bonus golds so it's working!

Thank you!




Re: (TWITCH) Adding currencies [Re: FoxInABox] #259419 19/11/16 05:21 AM
Joined: Jan 2014
Posts: 7
S
Silverzeppelin Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Jan 2014
Posts: 7
I have a same situation but mine is a little less complicated.
Their first subscription is 1000 coins
but the following months after are 100xN amount months
ex. 15 resub = 1500 coins
ex. 35 resub = 3500 coins


Any help would be appreciated

-SilverZeppelin

Page 2 of 2 1 2