• 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!

[9.1+] Talking Signs

well i'm using a higher version, but it works it just makes the account manager spam, and when i add the script in that the guy said he fixed in an earlier post nothing happens and i don't get no errors either
 
Code:
local config = {
positions = {
{pos = {x = 851, y = 972, z = 7}, text = "Hello Sir! How are you?", effects = {CONST_ME_MAGIC_BLUE}},
{pos = {x = 855, y = 972, z = 7}, text = "How are you?"}
},
effects = {CONST_ME_POFF, CONST_ME_TELEPORT, CONST_ME_MAGIC_RED}
}

function onThink(interval)
local speaker = getCreatureByName('Speaker Monster')
for _, info in pairs(config.positions) do
doPlayerSay(speaker, info.text, TALKTYPE_MONSTER_SAY, false, 0, info.pos)
if info.effects and #info.effects > 0 then
doSendMagicEffect(info.pos, info.effects[math.random(#info.effects)])
elseif config.effects and #config.effects > 0 then
doSendMagicEffect(info.pos, config.effects[math.random(#config.effects)])
end
end
return true
end

You can try this script. Add a custom monster called "Speaker Monster" and place it in a hidden place.
 
i get this error can someone help please?

[06/07/2013 18:35:38] Lua Script Error: [GlobalEvent Interface]
[06/07/2013 18:35:38] data/globalevents/scripts/talksign.lua:eek:nThink
[06/07/2013 18:35:38] data/globalevents/scripts/talksign.lua:10: attempt to call global 'getPlayersOnline' (a nil value)
[06/07/2013 18:35:38] stack traceback:
[06/07/2013 18:35:38] [C]: in function 'getPlayersOnline'
[06/07/2013 18:35:38] data/globalevents/scripts/talksign.lua:10: in function <data/globalevents/scripts/talksign.lua:9>
[06/07/2013 18:35:38] [Error - GlobalEvents::think] Failed to execute event: talksign

Just change the 'getPlayersOnline' for 'Game.getPlayers'.
If you make a reply or post, tell first what TFS are you using!
 
I tried many variations from different posts, none of them worked :(
I'm using TFS 0.2.15 (Mystic Spirit) With client 9.86.
Any Idea how to make this work?
 
I tried many variations from different posts, none of them worked :(
I'm using TFS 0.2.15 (Mystic Spirit) With client 9.86.
Any Idea how to make this work?
This is for 1.x, totally different version, search for talking signs for 0.2.
 
I rewrote it for TFS 1.3

globalevents.xml
Code:
<globalevent name="talkingSigns" interval="2000" script="other/talkingSigns.lua"/>

talkingSigns.lua
Lua:
local talkingSigns = {
    ["Trainer"] = Position(30100, 30200, 7)
}

function onThink(interval, lastExecution)
    local people = getOnlinePlayers()
  
    if #people == 0 then
        return true
    end
  
    for message, tpPos in pairs(talkingSigns) do
        local creature = Creature(people[1])
      
        if creature then
            creature:say(message, TALKTYPE_MONSTER_SAY, false, 0, tpPos)
        end
    end
  
    return true
end
 
By RevScript Method!
directory: data/scripts/
file: talkingSigns.lua
Lua:
local talkingSigns = {
    ["Depot's"] = { Position(92, 131, 7), CONST_ME_MAGIC_BLUE },
    ["Trainer's"] = { Position(90, 133, 7), CONST_ME_MAGIC_GREEN }
}

local talkingEvent = GlobalEvent("TalkingSigns")
function talkingEvent.onThink(interval)
    local players = Game.getPlayers()
    if #players > 0 then
        for sign, info in pairs(talkingSigns) do
            players[1]:say(sign, TALKTYPE_MONSTER_YELL, false, 0, info[1])
            info[1]:sendMagicEffect(info[2])
        end
    end
    return true
end

talkingEvent:interval(4000)
talkingEvent:register()
 
By RevScript Method!
directory: data/scripts/
file: talkingSigns.lua
Lua:
local talkingSigns = {
    ["Depot's"] = { Position(92, 131, 7), CONST_ME_MAGIC_BLUE },
    ["Trainer's"] = { Position(90, 133, 7), CONST_ME_MAGIC_GREEN }
}

local talkingEvent = GlobalEvent("TalkingSigns")
function talkingEvent.onThink(interval)
    local players = Game.getPlayers()
    if #players > 0 then
        for sign, info in pairs(talkingSigns) do
            players[1]:say(sign, TALKTYPE_MONSTER_YELL, false, 0, info[1])
            info[1]:sendMagicEffect(info[2])
        end
    end
    return true
end

talkingEvent:interval(4000)
talkingEvent:register()
Beat me too it lol
 
Back
Top