Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var id = setInterval(function () { // this code is executed every 100 milliseconds:
- var p = engine.getCurrentPayout();
- if (p >= trigger) {
- engine.cashOut(true);
- cashedOut = true;
- clearInterval(id); // ends loop after cashout attempt
- }
- if (p == null) { clearInterval(id); } // ends loop if still running when game ends
- if (cashedOut) { clearInterval(id); } // ends loop if cashed out by another method
- }, 100); // execution interval, in milliseconds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement