Yo, this is a script that is made by KuGaSh1rA!!
Only for TFS 0.3.4
1.Create a file in talkactions\scripts and name it temple.lua
2.Open talkactions\talkactions.xml and add this:
A big thanks to KuGaSh1rA
Only for TFS 0.3.4
1.Create a file in talkactions\scripts and name it temple.lua
Lua:
local templePos = {x = 1000, y = 1000, z = 7}
function onSay(cid, words, param, channel)
if param == nil then
doWarnPlayer(cid, 'Command requires a param.')
return TRUE
end
local target = nil
if isPlayer(getPlayerByName(param)) then
local target = getPlayerByName(param)
else
doWarnPlayer(cid, 'The target you specified is either a creature or an NPC or is not logged.')
return TRUE
end
if getPlayerGroup(cid) >= 3 then
local tmp = getPlayerPosition(target)
if(target ~= nil and doTeleportThing(target, templePos)) then
doSendMagicEffect(tmp, CONST_ME_POFF)
doSendMagicEffect(templePos, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid, 'description', 'You have sent "'..param..'" to temple.')
doPlayerSendTextMessage(target, 'description', 'You have been teleported to temple.')
else
warnPlayer(cid, 'Could not teleport player "'..param..'" to temple.')
end
else
doWarnPlayer(cid, 'You may not execute this command.')
return TRUE
end
return TRUE
end
function doWarnPlayer(cid, message)
doPlayerSendCancel(cid, message)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
PHP:
<talkaction log="yes" access="4" words="/temple" event="script" value="templelua"/>
Last edited by a moderator: