mIRC Home    About    Download    Register    News    Help

Print Thread
#247561 09/08/14 12:42 PM
Joined: Aug 2014
Posts: 4
R
Remco Offline OP
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Aug 2014
Posts: 4
Hi,

on this script you can 5times scratch but if you change the nickname you can do another 5times.

But that's not good if that happend.

can some tell me what i forgot on my script?

on this line if i put if (%kras. [ $+ [ $nick == ] ] < 5) || (!%kras. [ $+ [ $nick ] ]) {

the script lingers on the timer.



on *:TEXT:!kraslot:#: {
if (%kras. [ $+ [ $nick ] ] < 5) || (!%kras. [ $+ [ $nick ] ]) {
var %random = $rand(1,100)
if (%random == 1) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 5.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 2) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 5.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 3) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 10.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 4) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 50.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 5) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 200.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 6) { msg $chan 4Helaas14,3 $nick 14je hebt niets gewonnen, probeer het nog een keer! }
if (%random == 7) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 10.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 8) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 5.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 9) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 100.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 10) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 500.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 11) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 50.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 12) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 10.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 13) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 5.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random == 14) { msg $chan 10Gefeliciteerd14,3 $nick 14je wint6 $ 1.000.000 14vraag aan 7Borreltje 14om je prijs te claimen! }
if (%random >= 15) { msg $chan 4Helaas14,3 $nick 14je hebt niets gewonnen, probeer het nog een keer! }
inc -u3600 %kras. [ $+ [ $nick ] ] 1
}
else { msg $chan 4Helaas14, je kunt niet meer 10krassen! 14| over6 1uur 14kan je het weer proberen! }
}

Last edited by Remco; 09/08/14 01:52 PM.
Joined: Mar 2014
Posts: 42
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Mar 2014
Posts: 42
You cannot prohibit someone from changing their nick as far as i know? Also, you randomize between 1 and 100 but you only have 15 options? Is this intentional?

Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Last line is if (%random >= 15) laugh

Remco: you can check with the irc network you are working with if they have a channel mode to prevent nick change, which would be an easy solution for you. Otherwise, a better method is to use the hostmask/address of type 2 of the user (which is simply $wildsite inside the on text event) as the dynamic part of your local variable, instead of $nick.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #247789 26/08/14 05:09 PM
Joined: Mar 2014
Posts: 42
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Mar 2014
Posts: 42
You're right. I should stop wandering around the forums at 4 am :P


Link Copied to Clipboard