mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Deega #241927 03/06/13 05:29 PM
Joined: May 2013
Posts: 26
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: May 2013
Posts: 26
i did this but it isnt increasing
darkcastle = 1 in table TwitchChannelUsers even though $hget(DoubleTokens,darkcastle).data = Double

Code:
[/code]

alias AddTokensToDoubleUsers {
  var %i = 1, %a
  while ($nick(#,%i)) {
    %a = $v1
    if ($hget(DoubleTokens,%a) == Double) { hinc TwitchChannelUsers %a }
    inc %i
  }
}
[code]

Last edited by DaRkCaSTLe1974; 03/06/13 05:42 PM.
Joined: May 2013
Posts: 26
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: May 2013
Posts: 26
nvm modified and got it working tyvm deega

Joined: May 2013
Posts: 26
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: May 2013
Posts: 26
the script below works but only if $2 is 11 or higher other wise it gives the /set: line too long error for this line
if ($v1 >= %tempWinnerAmount) { %a = %a $hget(TwitchChannelUsers,%i).item }
looking for a possible solution so $2 can be any ammount specified set %tempWinnerAmount $2
Code:
[/code]

on *:TEXT:!roll*:#: {
  if ($hget(MasterList,$nick) == Master) {
    set %tempWinnerAmount $2
    msg %giveawayautotokenschannel Rolling
    var %i = 1, %a
    :next
    while ($hget(TwitchChannelUsers,%i).data) {
      if ($v1 >= %tempWinnerAmount) { %a = %a $hget(TwitchChannelUsers,%i).item }
      inc %i
    }
    if ($numtok(%a,32)) {
      set %currentgiveawaywinneris $gettok(%a,$rand(1,$v1),32)
      if (%currentgiveawaywinneris ison %giveawayautotokenschannel) {
        if ($hget(KeywordList,%currentgiveawaywinneris) == %CurrentKeywordIS) {
          .timerWinner 1 5 msg %giveawayautotokenschannel Winner!!!! = %currentgiveawaywinneris
          .hdec TwitchChannelUsers %currentgiveawaywinneris %tempWinnerAmount
          .timer 1 5 msg %giveawayautotokenschannel Deleted %tempWinnerAmount Tokens from %currentgiveawaywinneris
          .halt
        }
        else { goto next }
      }
      else { goto next }
    }
  }
  else { halt }
}
[code]

Last edited by DaRkCaSTLe1974; 06/06/13 02:31 AM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
%a = %a $hget(TwitchChannelUsers,%i).item

There is a limit to the length of lines and variables in mIRC and you're hitting that limit here by looping too many times. Instead of adding these values to a single variable, add them to a new hash table and change the rest of the script accordingly.

Joined: Jun 2013
Posts: 6
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: Jun 2013
Posts: 6
Can someone please help me out with this?
I'm willing to give someone 500mil or something!
I'm sitting here pulling my hair out trying to figure it out.
It wouldn't be so stressful if I had plenty of free time.
But I have a job and I try to stream 5 hours a day!
If someone could simply HELP me, I would greatly appreciate it.

I need to know what program to use, how to get it set up in the twitch channel, and then I should be able to do the rest from what's on here. If someone could please help me and give me a guiding hand I would be very grateful. ^.^

Please visit my channel as I don't check this often as I should.

twitch.tv/facepalm1785
facepalm#1785
jeezybeats - skype
essk8er8090@gmail.com - contact

Thank you!

Page 2 of 2 1 2

Link Copied to Clipboard