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

Slawken's Training system

You'd better make travel NPC to training islands and put just one script. For making it work for many cities, you have to modify it, and I don't think it will be that easy as making separate island for trainers.
 
PHP:
local config = {
storage =  76447,
trainPosition = {x = 1111, y = 1111, z = 7}
}

function onStepIn(cid, item, position, fromPosition)
	if item.uniqueid ~= 0 then
		setPlayerStorageValue(cid, config.storage, (item.uniqueid - 20000))
		doTeleportThing(cid, config.trainPosition, FALSE)
	else
		doTeleportThing(cid, getTownTemplePosition(getPlayerStorageValue(cid, config.storage)), FALSE)
	end
return TRUE
end

Code:
<movevent event="StepIn" actionid="7468" script="trainTeleport.lua"/>

Now you set teleports with action id equal 7468. If teleport should move players to trains don't set uniqueid (must be 0), else set it for (town id + 20000).
 
Last edited:
Back
Top