Northnorial
Member
Credits:
Cykotitan
(Most is done by Cykotitan, but I've edited the script a lot.)
The script is useful for War Servers, seen on Warots.net.pl
(It's not 100% the same than it is on Warots.net.pl)
Tested and working on TFS 0.3.6pl1
Configuration:
Adding towns and the delay, like that:
(Add the towns with the TownID)
How does it work?
You have to be in a temple of the towns added in the config. Now you can cast !t 1, !t 2, etc.
Script TempleTP.xml
Please report bugs in this thread!
Cykotitan
(Most is done by Cykotitan, but I've edited the script a lot.)
The script is useful for War Servers, seen on Warots.net.pl
(It's not 100% the same than it is on Warots.net.pl)
Tested and working on TFS 0.3.6pl1
Configuration:
Adding towns and the delay, like that:
(Add the towns with the TownID)
PHP:
<config name="config"><![CDATA[
validTowns = {1,2}
time = 3
]]></config>
How does it work?
You have to be in a temple of the towns added in the config. Now you can cast !t 1, !t 2, etc.
Script TempleTP.xml
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="TempleTP" enabled="yes">
<config name="config"><![CDATA[
validTowns = {1,2}
time = 3
]]></config>
<talkaction words="!t" event="buffer"><![CDATA[
domodlib('config')
local param = tonumber(param)
local storage = 55755
function doTP()
if getTileInfo(getThingPos(cid)).protection and param and isInArray(validTowns, param) then
doTeleportThing(cid, getTownTemplePosition(param))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have been sent to " .. getTownName(param) .. ".")
doSendMagicEffect(getTownTemplePosition(param), CONST_ME_TELEPORT)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have to stay in the temple.")
end
end
if getTileInfo(getThingPos(cid)).protection and param and isInArray(validTowns, param) and (os.time() - getPlayerStorageValue(cid, storage) > time*1) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will be sent to " .. getTownName(param) .. " in " .. time .. " seconds.")
doSendMagicEffect(getThingPos(cid), CONST_ME_WATERSPLASH)
setPlayerStorageValue(cid, storage, os.time())
addEvent(doTP, time*1000, cid)
end
return true
]]></talkaction>
</mod>
Please report bugs in this thread!
Last edited: