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

Solved Effectile

jeppsonskate

Member
Joined
Apr 3, 2012
Messages
117
Reaction score
18
Location
Sweden
Hello!

I've seen on different otservers thats using "effectile" got= on one tp(mortarea) and on other tp(magic_red) ETC... i wounder how i do that.. when i use em both in my script it choose between those two both is on same tp, i want like 5 different effect on 5 different tps..

script:

Lua:
local config = {
    positions = {
        ["SHOP"] = { x = 1004, y = 998, z = 7 },
        ["QUEST"] = { x = 1004, y = 996, z = 7 },
        ["HUNT"] = { x = 1004, y = 994, z = 7 },
        ["TRAINER"] = { x = 1004, y = 1000, z = 7 },
        ["DEPOT"] = { x = 1004, y = 1002, z = 7 },
        ["CASINO"] = { x = 995, y = 994, z = 7 },
        ["OUTFIT"] = { x = 1004, y = 998, z = 6 },
        ["READ"] = { x = 1000, y = 993, z = 11 },
        ["WARZONE"] = { x = 997, y = 994, z = 7 },
        ["Enchants"] = { x = 1003, y = 996, z = 8 },
    },
 
    effects = {
        CONST_ME_MAGIC_RED
    },
 
    colors = {
        TEXTCOLOR_WHITE
    }
}
 function onThink(cid, interval, lastExecution)
    for text, pos in pairs(config.positions) do
        doSendMagicEffect(pos, config.effects[math.random(1, #config.effects)])
        doSendAnimatedText(pos, text, config.colors[math.random(1, #config.colors)])
    end
    return TRUE
end
s6oq6v.png
 
Last edited by a moderator:
Not sure if this would work or not, but you could try it. :p
Lua:
local t = {
    {"SHOP", CONST_ME_TELEPORT, TEXTCOLOR_PINK, {x=1000, y=1000, z=7}},
    {"QUEST", CONST_ME_ENERGYHIT, TEXTCOLOR_ORANGE, {x=1000, y=1000, z=7}},
    {"HUNT", CONST_ME_MORTAREA, TEXTCOLOR_DARKYELLOW, {x=1000, y=1000, z=7}},
    {"TRAINER", CONST_ME_BUBBLES, TEXTCOLOR_YELLOW, {x=1000, y=1000, z=7}},
    {"DEPOT", CONST_ME_POFF, TEXTCOLOR_WHITE, {x=1000, y=1000, z=7}},
}

function onThink(cid, interval, lastExecution)    
    for i = 1, #t do
        doSendAnimatedText(t[i][4], t[i][1], t[i][3])
        doSendMagicEffect(t[i][4], t[i][2])
    end
    return true
end
 
Back
Top