• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Temple Rune Help

Blackcody

RiseOfTibia Owner
Joined
Aug 31, 2008
Messages
136
Reaction score
1
Code:
function onUse(cid, item, frompos, item2, topos)

local tid = cid
local pos = getPlayerTown(tid)
local tmp = getTownName(pos)

tmp = getCreaturePosition(tid)
        if item.id==2314 then
           getTownTemplePosition(pos) then
	   doTeleportThing(tid, pos, true)
	end

	return true
end

i need somthing with pz so if your in battle you cant tp
i am failing i was trying to put scripts together i have no clue what i am doing
 
Lua:
 function onUse(cid, item, frompos, item2, topos)
local pos = getPlayerTown(cid)
local town = getTownTemplePosition(pos)
      if(getTilePzInfo(getCreaturePosition(cid)) == false) and item.id==2314 then
      doTeleportThing(cid, town, true)
      else
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You may not teleport to your towns temple while you are pzed!"
	end
	return true
end

try that ^^

edit: nvm try that didnt notice how far off your script was...
 
Last edited:
Lua:
function onUse(cid, item, frompos, item2, topos)
local pos = getPlayerTown(cid)
local town = getTownTemplePosition(pos)
      if(getTilePzInfo(getCreaturePosition(cid)) == false) and item.id==2314 then
      doTeleportThing(cid, town, true)
      else
      doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You may not teleport to your towns temple while you are pzed!")
	end
	return true
end

that doesnt work it says doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You may not teleport to your towns temple while you are pzed!")

when im on a god
no pzed
 
Lua:
function onUse(cid, item, frompos, item2, topos)
	if hasCondition(cid, CONDITION_INFIGHT) == TRUE then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		doPlayerSendCancel(cid, "You may not use this scroll while in-fight!")
		return FALSE
	end
	
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), FALSE)
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	return TRUE
end
 
There can be time?
What I say is if someone can make it with timer. Example: you press that item and then if u lost pz whait like 1 minute before going?
 
Back
Top Bottom