SHOW:
|
|
- or go back to the newest paste.
| 1 | function onStepIn(cid, item, pos) | |
| 2 | ||
| 3 | local times = 18 -- Não mexa, = equação (TOTAL MINUTES/IDLE MINUTES) | |
| 4 | ||
| 5 | if not isPlayer(cid) then return true end | |
| 6 | if getPlayerStorageValue(cid, 1437) > -1 then return true end | |
| 7 | ||
| 8 | for i = 1, times do | |
| 9 | addEvent(doPlayerResetIdleTime, 10*60*1000, cid, true) | |
| 10 | setPlayerStorageValue(cid, 1437, -1) | |
| 11 | end | |
| 12 | doPlayerSendTextMessage(cid, 28, "O seu character ficará treinando por 3 horas após o Exit!") | |
| 13 | return true | |
| 14 | end | |
| 15 | ||
| 16 | function onStepOut(cid, item, pos) | |
| 17 | ||
| 18 | if isPlayer(cid) then | |
| 19 | setPlayerStorageValue(cid, 1437, 1) | |
| 20 | end | |
| 21 | return true | |
| 22 | end |