mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2013
Posts: 9
N
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Nov 2013
Posts: 9
Hey guys,

you helped me a lot in the past thanks again but now i'm looking for a solution again.
I'm trying to write a littel Game for my channel where people can slap eachother and different things happen. They could loose some Coins for example nad now i gave them the option to buy a shield for 1 hour.
I do it like this :

I created an ini file and when they type !shield this is what i do :
Code:
writeini -n Schild.ini Schilde $nick 1
$+(timerschild.,$nick) 1 %zeit remini Schild.ini Schilde $nick

So i create an entry and when the timer reached 3600s i remove the entry. When they try to slap someone it will check if there is an entry.
Could you tell me another way how to do this ? I could imagine that my solution isn't a good one.

Thanks.

Greetings, Nut

Last edited by NuthouseOfGaming; 27/11/13 01:01 PM.
Joined: Nov 2013
Posts: 49
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Nov 2013
Posts: 49
Hi,

I'm no expert (By far) but if they're buying a shield for an x amount of seconds, couldn't you just do a global var called shield.$nick and set it to countdown the x amount of seconds using -uXXXX ?

Edit:
Code:
on *:TEXT:!shield:#: {
  set -u3600 %shield. $+ $chan $+ . $+ $nick on
}


And then check if %shield. $+ $chan $+ . $ + $chan when attacking? Hope you find a solution!

Last edited by lindenkron; 27/11/13 12:31 PM.
Joined: Nov 2013
Posts: 9
N
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Nov 2013
Posts: 9
Hey lindenkron,

thanks for your reply i think that's it.
I absolutely forgot the -u countdown. Can't test it now but you understood my problem and the solutions sounds correct.
Thank you very much!

Joined: Nov 2013
Posts: 49
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Nov 2013
Posts: 49
I should mention when you check, to check for a dynamic variable you need to use [ $+ [ $chan ] ], you can't use $+ $chan like you do when you set it.

so it'll be %shield. [ $+ [ $chan ] ] $+ . [ $+ [ $nick ] ] (I believe, not 100% sure :P)

GL!

Last edited by lindenkron; 27/11/13 01:28 PM.

Link Copied to Clipboard