zbizu
Legendary OT User
Hello. I see a lot of servers gets banned due to "spoofing data info" caused by people who exit on trainers.
I don't want to spoof, I just want to let people improve their skills on training monks classic way(restricted by time limitations), but I don't want my server get banned due to "data spoofing".
I have two questions:
1. Does TFS 1.0 have necessary fixes to not count players who exit?
2. How many minutes can a player stay online after he closes the client without logging out?
I've made a system which takes 1 SP per minute(max 3h 20 min of training) and then kicks a player from the training room, but if player targets the trainer and exits, he is still online(I didn't place no-logout areas anywhere). Do I need anything else in this script to avoid getting my server banned?
I don't want to spoof, I just want to let people improve their skills on training monks classic way(restricted by time limitations), but I don't want my server get banned due to "data spoofing".
I have two questions:
1. Does TFS 1.0 have necessary fixes to not count players who exit?
2. How many minutes can a player stay online after he closes the client without logging out?
I've made a system which takes 1 SP per minute(max 3h 20 min of training) and then kicks a player from the training room, but if player targets the trainer and exits, he is still online(I didn't place no-logout areas anywhere). Do I need anything else in this script to avoid getting my server banned?
local training_exit = {
[831] = {x = 288, y = 243, z = 9},
[832] = {x = 934, y = 794, z = 4}
}
local sid = 831
function checkTrainingTile(cid, pos, nsid, actionid)
local p = Player(cid)
if getTopCreature(pos).uid == cid and p:getStorageValue(sid) == nsid then
if p:getSoul() < 1 then
p:teleportTo(training_exit[actionid], false)
Position(pos):sendMagicEffect(CONST_ME_TELEPORT)
p:sendTextMessage(MESSAGE_INFO_DESCR, "Out of SP.")
Position(p:getPosition()):sendMagicEffect(CONST_ME_TELEPORT)
return true
end
p:addSoul(-1)
addEvent(checkTrainingTile, 60000, cid, pos, nsid, actionid)
return true
end
return true
end
function onStepIn(cid, item, position, fromPosition)
local p = Player(cid)
local pos = p:getPosition()
if p:getSoul() < 1 then
p:teleportTo(training_exit[item.actionid], false)
Position(pos):sendMagicEffect(CONST_ME_POFF)
p:sendTextMessage(MESSAGE_INFO_DESCR, "You don't have enough SP.")
Position(p:getPosition()):sendMagicEffect(CONST_ME_TELEPORT)
return true
end
Position(pos):sendMagicEffect(CONST_ME_MAGIC_GREEN)
p:setStorageValue(sid, p:getStorageValue(sid) + 1)
p:sendTextMessage(MESSAGE_INFO_DESCR, "Training started.\nCost: 1 SP per minute.\nYou have " .. showTimeLeft(p:getSoul() * 60, true) .. " of training time left.")
p:addSoul(-1)
addEvent(checkTrainingTile, 60000, cid, pos, p:getStorageValue(sid), item.actionid)
return true
end
[831] = {x = 288, y = 243, z = 9},
[832] = {x = 934, y = 794, z = 4}
}
local sid = 831
function checkTrainingTile(cid, pos, nsid, actionid)
local p = Player(cid)
if getTopCreature(pos).uid == cid and p:getStorageValue(sid) == nsid then
if p:getSoul() < 1 then
p:teleportTo(training_exit[actionid], false)
Position(pos):sendMagicEffect(CONST_ME_TELEPORT)
p:sendTextMessage(MESSAGE_INFO_DESCR, "Out of SP.")
Position(p:getPosition()):sendMagicEffect(CONST_ME_TELEPORT)
return true
end
p:addSoul(-1)
addEvent(checkTrainingTile, 60000, cid, pos, nsid, actionid)
return true
end
return true
end
function onStepIn(cid, item, position, fromPosition)
local p = Player(cid)
local pos = p:getPosition()
if p:getSoul() < 1 then
p:teleportTo(training_exit[item.actionid], false)
Position(pos):sendMagicEffect(CONST_ME_POFF)
p:sendTextMessage(MESSAGE_INFO_DESCR, "You don't have enough SP.")
Position(p:getPosition()):sendMagicEffect(CONST_ME_TELEPORT)
return true
end
Position(pos):sendMagicEffect(CONST_ME_MAGIC_GREEN)
p:setStorageValue(sid, p:getStorageValue(sid) + 1)
p:sendTextMessage(MESSAGE_INFO_DESCR, "Training started.\nCost: 1 SP per minute.\nYou have " .. showTimeLeft(p:getSoul() * 60, true) .. " of training time left.")
p:addSoul(-1)
addEvent(checkTrainingTile, 60000, cid, pos, p:getStorageValue(sid), item.actionid)
return true
end