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

GlobalEvent Talking Tp/signs/tiles for TFS 0.3+

because you're using 0.4, the interval is in milliseconds so multiply it by 1000
 
data/globalevents/scripts/effects.lua:12: '}' expected (to close '{' at line 6) near '['
[12/05/2011 17:39:17] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[12/05/2011 17:39:17] data/globalevents/scripts/effects.lua:12: '}' expected (to close '{' at line 6) near '['

wtf???
 
data/globalevents/scripts/effects.lua:12: '}' expected (to close '{' at line 6) near '['
[12/05/2011 17:39:17] [Warning - Event::loadScript] Cannot load script (data/globalevents/scripts/effects.lua)
[12/05/2011 17:39:17] data/globalevents/scripts/effects.lua:12: '}' expected (to close '{' at line 6) near '['

wtf???

You forgot a , remove on line 12
 
Rlly helpful for new comers who are new in the lua part of ot's so many people moan about people who post the same things but that is what this forum is about people making there scripts for other people to use :)

Dont Take Ot So Serious Boys and Girls :)
 
Sorry for bumping old thread but I dont have any globalevents folder im using TFS 0.2.7 Mystic Spirit
 
Forgot, but here again:

Its a talkaction Script.
Lua:
--[[
    Talking Tp/signs/tiles for TFS 0.2
    50% by Marki, 50% by Shawak
]]--

    local time = 2    -- 1 = 1 sec, 2 = 2 sec, ...

    local config = {
    --X pos,Y pos, Z pos, text
    [1] = {pos = {132,93,7}, text = {"text 1"}},
    [2] = {pos = {133,93,7}, text = {"text 2"}}
    }   
 
    local say_events = {}

local function SayText(cid)
    if isPlayer(cid) == TRUE then
         if say_events[getPlayerGUID(cid)] ~= nil then
             for _, area in pairs(config) do
                 doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
             end
             say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000 / 2, cid)    
          end                                                    
    end
    return TRUE
end

function onSay(cid, words, param, channel)
    if param == "on" then
        for _, area in pairs(config) do
            doSendAnimatedText({x=area.pos[1],y=area.pos[2],z=area.pos[3]},area.text[1], math.random(01,255))
        end
        say_events[getPlayerGUID(cid)] = addEvent(SayText, time * 1000, cid)
        doPlayerSendTextMessage(cid,19,"You set the function \"SayText\" -> ON.")
    elseif param == "off" then
        stopEvent(say_events[getPlayerGUID(cid)])
        say_events[getPlayerGUID(cid)] = nil
        doPlayerSendTextMessage(cid,19,"You set the function \"SayText\" -> OFF.")
    end
    return TRUE
end

Regards,
Shawak

Does anyone know what to put in the "talkactions.xml" for this?
example: " <talkaction words="!saytext" script="talking signs.lua"/> " <-does not work
 
That has nothing to do with talkactions, you will only have to add this to globalevents
XML:
<globalevent name="effects" interval="2" event="script" value="effects.lua"/>
 
Back
Top