• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need new version for training ground

pizza88

New Member
Joined
Jan 11, 2009
Messages
51
Reaction score
0
Location
Germany
hi i've found this script about training how trainer but there givent a trainer you must only stay on a ground with action id 900 but in a newer version as tfs 0.3b3 it doesent work can someone make it for the newest version ?? heres the script
-- Square Skill Trainer made by Arthur aka artofwork
-- This script will train all of a players skills indefintely
-- It has a small configuration setup where you can set the number of tries per skill
-- The time internveral in between each skill try added
-- A storage value to help prevent abuse
-- This is truely my first script, it comes without support since lua is new to me
-- You can assign any tile you wish to this script that a player can walk on with action id 900


-- Config --
local storage = 18010 -- Storage value for the player when he steps on and off the tile

local skilltries = 1 -- Number of tries per skill
local t = 4 * 1000 -- Set the time before try is added to skills

-------------------------------------------------------------------------
function trainerthree(p)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then
doPlayerSendTextMessage(p.cid,22,"Your training session will begin in 30 seconds")
addEvent(trainertwo, 1 * 10, p)
end
end
return FALSE
end
function trainertwo(p)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then
doPlayerSendTextMessage(p.cid,22,"Your training session will begin in 20 seconds")
addEvent(trainerone, 1 * 10, p)
end
end
return FALSE
end
function trainerone(p)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then
doPlayerSendTextMessage(p.cid,22,"Your training session will begin in 10 seconds")
addEvent(readyToTrain, 1 * 10, p)
end
end
return FALSE
end



function readyToTrain(p)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then
doPlayerSendTextMessage(p.cid,22,"Your training session will now begin")
addEvent(trainMeA, t, p)
end
end
return FALSE
end


function trainMeA(p)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then

for a = 1, t do
if(a == t) then
doPlayerAddSkillTry(p.cid, SKILL_FIST, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_SWORD, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_CLUB, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_AXE, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_DISTANCE, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_SHIELD, skilltries)
end
end
end
addEvent(trainMeB, t, p)
end
return FALSE
end

function trainMeB(p)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then
for b = 1, t do
if(b == t) then
doPlayerAddSkillTry(p.cid, SKILL_FIST, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_CLUB, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_SWORD, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_AXE, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_DISTANCE, skilltries)
doPlayerAddSkillTry(p.cid, SKILL_SHIELD, skilltries)

end
end
end
addEvent(trainMeA, t, p)
end
return FALSE
end



function onStepIn(cid, item)
local p = {cid = cid, item = item, pos = pos}
setPlayerStorageValue(p.cid, 18010, 1)
if isPlayer(p.cid) and getPlayerStorageValue(p.cid, 18010) == 1 then
if p.item.actionid == 900 then
addEvent(trainerthree, 1 * 10, p)
end
end
return FALSE
end


function onStepOut(cid, item)
getPlayerStorageValue(cid, 18010)
setPlayerStorageValue(cid, 18010, 0)
doPlayerSendTextMessage(cid,22,"Your training session has now ended")
end
 
Back
Top