• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

can any one help me to make script!t1 and !t2

starahmed57

Banned User
Joined
Aug 6, 2015
Messages
41
Reaction score
3
can any one help me to make script!t1 and !t2 and want it when my at pz or monster attack me cant make it
i want for players to go other town and my sorry for my bad english

no one will help me? i want this script pliz
 
Last edited by a moderator:
can any one help me to make script!t1 and !t2 and want it when my at pz or monster attack me cant make it
i want for players to go other town and my sorry for my bad english

no one will help me? i want this script pliz

Sorry, can try to explain better?
 
i have scrip t!t1 but when my pz or attack monster i can go to temple by !t1 i want !t1 no go me to temple when my pz or attack monster
or any one give me new script
 
My understanding is he basically wants a /t talkaction that can't be used when you're in combat or a pz.
 
untested:

talkactions.xml

Code:
<talkaction words="!flee" script="flee.lua" />

flee.lua
Code:
function onSay(player, words, param)
    if player:getCondition(CONDITION_INFIGHT) then
        player:sendTextMessage(MESSAGE_STATUS_WARNING, "You cannot flee while in battle!")
        return false
    end
    if Tile(player:getPosition()):hasFlag(TILESTATE_PROTECTIONZONE) then
        player:sendTextMessage(MESSAGE_STATUS_WARNING, "You cannot flee while in a protection zone!")
        return false
    end
    player:teleportTo(player:getTown():getTemplePosition())
    return true
end
 
Last edited:
i make it the same you and use !flee and got this
[12/10/2015 09:23:18] [Error - TalkAction Interface]
[12/10/2015 09:23:18] data/talkactions/scripts/flee.lua:onSay
[12/10/2015 09:23:18] Description:
[12/10/2015 09:23:18] data/talkactions/scripts/flee.lua:2: attempt to index local 'player' (a number value)
[12/10/2015 09:23:18] stack traceback:
[12/10/2015 09:23:18] data/talkactions/scripts/flee.lua:2: in function <data/talkactions/scripts/flee.lua:1>
 
Don't be lazy always post the server version, although I already I know what version your using the rest of the people who may be willing to write a script for you don't.
 
i make it the same you and use !flee and got this
[12/10/2015 09:23:18] [Error - TalkAction Interface]
[12/10/2015 09:23:18] data/talkactions/scripts/flee.lua:eek:nSay
[12/10/2015 09:23:18] Description:
[12/10/2015 09:23:18] data/talkactions/scripts/flee.lua:2: attempt to index local 'player' (a number value)
[12/10/2015 09:23:18] stack traceback:
[12/10/2015 09:23:18] data/talkactions/scripts/flee.lua:2: in function <data/talkactions/scripts/flee.lua:1>

This is because you're not using TFS 1.x
Can't help you out with older scripts, sorry.
 
Back
Top