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

Avesta. Another Teleport item.

Erevius

It Was A Good Day
Joined
Feb 12, 2010
Messages
157
Reaction score
7
Location
Poland/Olsztyn
I'd like to make another items work like magic forcefields (teleports).
So, I set in my items.xml the same parameters for 5068-5070 items, like in all of my "magic forcefield".
scaled.php

I use the same items.xml both for RME and OTS. In RME I set:
78076437.png

But unfortunately when I step on my portal, nothing happens.
68950606.png


No errors in console, and the magic forcefields work properly. Any ideas? (I don't want simple .lua scripts!)
 
Unnecessary long script but here you go

Lua:
function onStepIn(cid, item, pos--[[topos, frompos not working in Avesta :'/]])

	local config = {
		t = 1337, -- ITEM THAT YOU WILL WALK ON
		p = {x=1000, y=1000, z=7} -- WHERE THE HELL AM I GOING
	}

	if item.itemid == config.t then
		doTeleportThing(cid, config.p)
		doSendMagicEffect(config.p, 10)
	else
		doPlayerSendTextMessage(cid, 22, "Something is wrong :P")
	end
	
	return true
end

XML:
<!--Change to whatever action id you're using, also the name of the script-->
<movevent event="StepIn" actionid="1337" script="item_teleport.lua"/>

Tutorial:
- Set an unused action id on the item.
- Save script to data/movements/scripts
- Edit what item id and where to be teleported
- Open up movements.xml
- Paste the xml line provided above somewhere
- Run server and try
- If not working
- Come back here

I made it simple anyway <.<
 
Last edited:
I don't really know why, but when I remove the type attribute from any of magic forcefield in my items.xml. The teleport still work in-game. Why? Maybe something's wrong with items.otb?
 
How many times will you use it as a teleport anyway?

I couldn't find anything associated with ID 1387 in the sources. Maybe it's OTB related? And if you will be forced to use script, you'll have to use some kind of onAddItem script if you want it to teleport loot bags I guess...
 
][_, ([]) ][_,
I added these items to Teleport section (the same as magic forcefields) in items.otb. It still doesn't work.

#Edit
It's freaky but I had to change item propeteries as magic forcefield has ("Always on Top", "Block pathfind") in items.otb.
Thanks for your effort.
 
Last edited:
Back
Top