Page 1 of 1

How do you use transpoter runes

Posted: Sun May 26, 2013 2:16 am
by newton666
just wondering how do you use transpoter runes in a script?
e.g like teleporting to logar ? thx

Re: How do you use transpoter runes

Posted: Sun May 26, 2013 2:28 am
by lisa
forum search for teleport got this as first result.
http://www.solarstrike.net/phpBB3/viewt ... ort#p49960
I posted code for using the teleport to heffner, that is for using the skill.

If you mean the actual transport book, using the runes, the code looks like this.

Code: Select all

RoMScript("TB_Teleport(0,21)") --teleports to slot 21 in teleport book
wiki is here
http://runesofmagic.gamepedia.com/API:TB_Teleport

Re: How do you use transpoter runes

Posted: Sun May 26, 2013 5:31 am
by rock5
This is the code I used with my ribbons script. It allows for different index numbers.

Code: Select all

local portIndex = getPortIndex("Silverspring-Lake of Magic Mist")
if inventory:itemTotalCount("Transport Rune") > 0 and portIndex then
	RoMScript("TB_Teleport(0,"..portIndex..")")
	waitForLoadingScreen(30)
	yrest(3000)
end

Re: How do you use transpoter runes

Posted: Sun May 26, 2013 7:14 am
by lisa
couldn't find getPortIndex in the default bot, userfunction maybe?

Re: How do you use transpoter runes

Posted: Sun May 26, 2013 8:21 am
by rock5
I should really make more effort at checking my posts before I click send. :oops: Lucky, you are always there to catch my mistakes. :D

Code: Select all

	function getPortIndex(_name)
		local i = 1
		repeat
			local TB_ID,note,ZoneID,X,Y,Z,Name,icon=RoMScript("TB_GetTeleportInfo("..i..")")
			if note == _name then
				return i
			elseif TB_ID == 0 then
				return false
			else
				i = i + 1
			end
		until false
	end