Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- item script AnyCounterPotion
- {
- void run(int ctr, int increment, int delay)
- {
- int clk = 0;
- while ( Game->Counter[ctr] < Game->MCounter[ctr] )
- {
- if ( clk <= 0 )
- {
- Audio->PlaySound(this->UseSound);
- Game->Counter[ctr] += Min(increment, (Game->MCounter[ctr]-Game->Counter[ctr]));
- clk = delay;
- }
- else { --clk; }
- Waitframe();
- }
- Quit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement