mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2014
Posts: 3
T
Tsurata Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Jun 2014
Posts: 3
So I found a heist script around here and for the love of god... I cant show the names on the winnings (the random things that could happen) I tried to make a variable with
$+(#,.,$nick) and $+ $nick and $nick ... I just can't see why it doesnt want to work. Oh and btw, how to disable the command so people cant abuse it and the bot could just open the heists on set times(I could do it with variables but thats probably not the best solution) Can someone help me with this?

I really wanna learn how to do things in mIRC, I want to make a heist script where the bot starts the script automatically at set times and people can enter in it with their own bets and then a random winner will get a multiplied amount of points and some will lose points.

This is what I have at the moment(sorry for the hungarian messages in it):
Code:
on *:TEXT:!rablas-teszt2:#: {
  if ((%floodheist) || ($($+(%,floodheist.,$nick),2))) {
    return 
  }
  set -u15 %floodheist On
  set -u30 %floodheist. $+ $nick On
  var %topic $+($chan,.,$nick)
  var %nev $+(#,.,$nick)
  var %rng $rand(1,10)
  var %points $iif($readini(Points.ini,%topic,Points) == $null,0,$v1)
  if (%points < 50) { msg $chan  [ $nick ]: nincs elég pontod rablóakciót indítani, legalább 50 pontodnak kell lenni és 10-be kerül egy próbálkozás. | return }
  %points = $calc(%points - 10)
  msg $chan [ $nick ]: bankrablást indított, 15 másodperc van rá. Elvettem t&#337;led 10 pontot a költésgekre!
  writeini -n Points.ini %topic Points %points
  if (%rng == 1) { 
    /timer1 1 15 msg # %nev, szép és tiszta munka, +30 pont!
    %points = $calc(%points + 30)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 2) { 
    /timer 1 15 msg # %nev hát ez nem úgy sikerült ahogy elképzeltük.. -5 pont!
    %points = $calc(%points - 5)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 3) { 
    /timer 1 15 msg # %nev, jó menet volt, +50 pont!
    %points = $calc(%points + 50)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 4) { 
    /timer 1 15 msg # %nev, valaki nem bírta tartani a száját... -10 pont!
    %points = $calc(%points - 10)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 5) {
    /timer 1 15 msg # %nev, megütötted a jackpotot!!! +100 pont!
    %points = $calc(%points + 100)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 6) {
    /timer 1 15 msg # %nev, elkaptak minket, de kijutottunk a sittr&#337;l. -50 pont! 
    %points = $calc(%points - 50)
    if (%points < 0) {
      %points = 0
      writeini -n Points.ini %topic Points %points
      return %points;
      } else {
      writeini -n Points.ini %topic Points %points
      return %points
    }
  }
  if (%rng == 7) { 
    /timer 1 15 msg # %nev, lesz ez még jobb is. +5pont!
    %points = $calc(%points + 5)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 8) { 
    /timer 1 15 msg # %nev, huh.. épp hogy megúsztuk. +15 pont!
    %points = $calc(%points + 15)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 9) { 
    /timer 1 15 msg # %nev, megsebesültél, kórházi díjak -3 pont!
    %points = $calc(%points - 3)
    writeini -n Points.ini %topic Points %points
    return %points
  }
  if (%rng == 10) { 
    /timer 1 15 msg # %nev, már az utcán észrevettek minket, akció lefújva.
    %points = $calc(%points + 10)
    writeini -n Points.ini %topic Points %points
    return %points
  }
}

Joined: Jul 2014
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2014
Posts: 8
i am looking for this answer too, because if more people use !heist command together, they dont know who win and who loose laugh

Joined: Jun 2014
Posts: 3
T
Tsurata Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: Jun 2014
Posts: 3
Requesting a thread closure. (I can't believe I was so stupid)

Joined: Jul 2014
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2014
Posts: 8
can u give me a tip? Before closing thread? (i feel stupid) laugh

Joined: May 2014
Posts: 6
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: May 2014
Posts: 6
if you find the answer please always update with what the solution to the problem was! it'll help a lot of people years into the future!

Joined: Jul 2014
Posts: 8
A
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2014
Posts: 8
that was really dumb.. problem was here

Wrong
Code:
/timer1 1 15 msg $chan $nick, heist was successful you have won 5 points


Right
Code:
/timer1 1 15 msg $chan $nick , heist was successful you have won 5 points


there must be space between $nick, > $nick ,

Last edited by AcerCZ; 07/07/14 11:26 AM.
Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Originally Posted By: AcerCZ
that was really dumb.. problem was here

Wrong
Code:
/timer1 1 15 msg $chan $nick, heist was successful you have won 5 points


Right
Code:
/timer1 1 15 msg $chan $nick , heist was successful you have won 5 points


there must be space between $nick, > $nick ,


or "$nick $+ ,"


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball

Link Copied to Clipboard