• 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!

Train Tile script need to modify

Adiko

GetOnMyHorse
Joined
Apr 25, 2009
Messages
177
Reaction score
0
Location
Poland \ Wodzisław
there is some bug need to be fixed. Look at this video:

Here is script"
PHP:
-- 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, 10 * 1000, 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, 10 * 1000, 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, 10 * 1000, 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 * 1000, 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
 
Last edited:
Thats most likely because your sword skill was out of normal value from the beginning, Or it might be because of your skill settings in vocations.xml

I didn't check the script tho...

//Massen
 
Back
Top Bottom