I mean that, player entering training room, he exit the game and after 10 minutes try to login.. what happends? Player login to training room and he can train how long he want (with bot too).
make it so the player is teleported out of the room onlog in? if player has storage value X then teleport payer to X,Y,Z and remove storage value so they can enter again
or i guess it can be made on log out to?
What if someone has a bot with an auto talk? because MANY bots come with that feature...
[25/07/2008 18:58:08] Lua Script Error: [Action Interface]
[25/07/2008 18:58:08] in a timer event called from:
[25/07/2008 18:58:08] data/actions/scripts/tools/training.luanUse
[25/07/2008 18:58:08] luaGetPlayerStorageValue(). Player not found
I cant find: functions.lua
:S:S:S
function doPlayerExtendTraining(cid)
addEvent(setPlayerTrainCode, TRAIN_TIME * 1000 * 30, cid)
addEvent(isItEndOfTraining, (TRAIN_TIME * 1000 * 30) + 20000, cid)
end
[COLOR="Red"]* 30 should be really * 60 to make it count TRAIN_TIME in minutes[/COLOR]
@Ronaldino
I'm getting the same error
@Slawkens
There's one tiny bug though.
Code:function doPlayerExtendTraining(cid) addEvent(setPlayerTrainCode, TRAIN_TIME * 1000 * 30, cid) addEvent(isItEndOfTraining, (TRAIN_TIME * 1000 * 30) + 20000, cid) end [COLOR="Red"]* 30 should be really * 60 to make it count TRAIN_TIME in minutes[/COLOR]
And another bug, quite big actually:
When a player enters the training room, then exits, let's say after 5 minutes, and goes there again he gets multiple events and that means he has to rewrite the !train codes as many times as he stopped/started trainings, during that (default) 15 mins time. There's stopEvent missing somewhere.
Oh and thanks for sharing!