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

Vocation Tile

Mithaz

Nightimp Mapper/Scripter
Joined
Nov 7, 2007
Messages
120
Reaction score
1
Location
Sweden
I want to make a tile that teleport example only Druids.

It it easy to make a script for that?
 
Lua:
local config = { 
                vocation = X, --Id of the vocation to teleport
                telepos = {x= , y= , z= }, --Teleport position
                actionid = XXXX  --Action ID of the tile you step on
               }
function onStepIn(cid, item, pos, fromPos)
if (item.actionid == config.actionid) then
 if (getPlayerVocation(cid) == config.vocation) then 
  doTeleportThing(cid, config.telepos)
  doPlayerSendTextMessage(cid, 25, 'You have been teleported!')
 else
  doPlayerSendTextMessage(cid, 25, 'You have to be a Druid to step on this tile.')
 end
end
end

Make sure to use the Search Function
before you request.
 
Last edited:
Thanks man.
I have been Searching for something like this but didnt finde any.
I will try harder next time :D
Anyway thanks alot.
rep+ to you :thumbup:
 
Lua:
local config = { 
                vocation = X, --Id of the vocation to teleport
                telepos = {x= , y= , z= }, --Teleport position
                actionid = XXXX  --Action ID of the tile you step on
               }
function onStepIn(cid, item, pos, fromPos)
if (item.actionid == config.actionid) then
 if (getPlayerVocation(cid) == config.vocation) then 
  doTeleportThing(cid, config.telepos)
  doPlayerSendTextMessage(cid, 25, 'You have been teleported!')
 else
  doPlayerSendTextMessage(cid, 25, 'You have to be a Druid to step on this tile.')
 end
end
end

Make sure to use the Search Function
before you request.

Fail, use tiles.lua. :)
./data/movements/scripts/tiles.lua
 
The one who's able to read got the advantage

Part of code from tiles.lua:
Code:
	local vocation = item.actionid - 100
	if(vocation >= 0 and vocation < 50) then
		local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
		if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

Okay? :p
 
Part of code from tiles.lua:
Code:
	local vocation = item.actionid - 100
	if(vocation >= 0 and vocation < 50) then
		local playerVocationInfo = getVocationInfo(getPlayerVocation(cid))
		if(playerVocationInfo.id ~= vocation and playerVocationInfo.fromVocation ~= vocation) then
			pushBack(cid, position, fromPosition, true)
		end

		return true
	end

Okay? :p
he wanna customize :D
 
I got it to work the way i wanted to with Zyntax script and it works perfect so im happy. :peace:
Thanks Zyntax for your help.
:thumbup:

Going to bed now. Going to work full day on my server so need some sleep :p

Edit : @Chojrak if you have some brain you know not every one know how to script lua.
I havent spend the time YET to learn that because i have too mutch other programming language to learn at the moment.
And by the way arent this Requests & Support board made for asking for help with scripts that you arnt abel to do your self or am i wrong ?
 
Back
Top