• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Offline Training, SKILL_MAGLEVEL not working

Caduceus

Unknown Member
Joined
May 10, 2010
Messages
321
Solutions
2
Reaction score
24
Is there something I can change or do with the offline training system to make Magic training work? the statues are all correct, Shielding skills still advance on the skill trainer. (You see a skill trainer.
Use this statue to train your magic level and shielding skill offline.) However when you use (During your absence you trained for 5 hours and 49 minutes.) nothing happens at all for ML.

LUA:
local statue = {
	[18488] = SKILL_SWORD,
	[18489] = SKILL_AXE,
	[18490] = SKILL_CLUB,
	[18491] = SKILL_DISTANCE,
	[18492] = SKILL_MAGLEVEL
	}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
local premiumDays = getPlayerPremiumDays(cid)
 
	if premiumDays > 0 then
		doPlayerSetOfflineTrainingSkill(cid, statue[item.itemid])
		doRemoveCreature(cid)
	else
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
	end
	return true
end

XML:
<action fromid="18488" toid="18492" script="offlinetraining.lua"/>

Global
LUA:
SKILL_FIST = 0
SKILL_CLUB = 1
SKILL_SWORD = 2
SKILL_AXE = 3
SKILL_DISTANCE = 4
SKILL_SHIELD = 5
SKILL_FISHING = 6
SKILL_MAGLEVEL = 7
SKILL_LEVEL = 8
 
Last edited:
Talaturen said:
Decapitated Sou said:
http://otland.net/f16/offline-training-skill_maglevel-not-working-191316/ is there something internal with the SKILL_MAGLEVEL that may cause it to not work? I am trying to use offline training & all of them work but ML.

doPlayerSetOfflineTrainingSkill(cid, SKILL_MAGLEVEL) should work, if it doesn't, it could be something wrong with your magic/mana rates.

altered offline train script, did not work either.
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local premiumDays = getPlayerPremiumDays(cid)
 
	if premiumDays > 0 then
		doPlayerSetOfflineTrainingSkill(cid, SKILL_MAGLEVEL)
		doRemoveCreature(cid)
	else
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUNEEDPREMIUMACCOUNT)
	end
	return true
end

What can cause an issue with magic/mana rates?
 
Last edited:
Back
Top