zbizu
Legendary OT User
because wand usage has its limitations,
I present you more powerful version of this: Action - [TFS 1.3] TP Wand for admins (updated)
Script summary: type "/look" and you will be tped anywhere you look
talkactions.xml
tplook.lua
data/events/scripts/player.lua
below:
add:
below:
add:
I present you more powerful version of this: Action - [TFS 1.3] TP Wand for admins (updated)
Script summary: type "/look" and you will be tped anywhere you look
talkactions.xml
Code:
<talkaction words="/look" script="tplook.lua" />
tplook.lua
Code:
local storage = 400
function tpLook(player, destination)
if player:getAccountType() >= ACCOUNT_TYPE_GOD and player:getStorageValue(storage) == 1 then
player:teleportTo(destination)
end
end
function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
if player:getAccountType() < ACCOUNT_TYPE_GOD then
return false
end
if player:getStorageValue(storage) < 1 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "Look teleport enabled.")
player:setStorageValue(storage, 1)
else
player:sendTextMessage(MESSAGE_INFO_DESCR, "Look teleport disabled.")
player:setStorageValue(storage, 0)
end
return false
end
data/events/scripts/player.lua
below:
Code:
function Player:onLook(thing, position, distance)
Code:
tpLook(self, position)
below:
Code:
function Player:onLookInBattleList(creature, distance)
Code:
tpLook(self, creature:getPosition())
Last edited: