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

Lua Effect VIP

Adonis122

Member
Joined
Oct 2, 2012
Messages
21
Reaction score
9
Good night
I need help on the following little problem
I am using the premium account as a vip system
I'm looking for a script for a long time that only players with premium account get a "VIP" EFFECT


I'm tired of searching all over otland and I can't find anything, just a messed up script

thank you
 
first you should tell us what tfs are you using, but I'll assume 1.x


have you tried this script? if yes, what is wrong with it?
 
first you should tell us what tfs are you using, but I'll assume 1.x


have you tried this script? if yes, what is wrong with it?
If I include I tried that and some others but I couldn't solve any of the errors

For example, look at what error it throws me
Screenshot_1.png
Screenshot (https://prnt.sc/I-tbbQeVz0kN) ---- I'm using
 
Code:
<globalevent name="premiumeffect" interval="1000" script="premiumeffect.lua" />
Lua:
local effect = 1

function onThink(interval)
    for _, player in ipairs(Game.getPlayers()) do
        if player:isPremium() then
            local position = player:getPosition()
            player:say("Premium Effect!", TALKTYPE_MONSTER_SAY)
            position:sendMagicEffect(effect)
        end
    end
    return true
end
 
Code:
<globalevent name="premiumeffect" interval="1000" script="premiumeffect.lua" />
Lua:
local effect = 1

function onThink(interval)
    for _, player in ipairs(Game.getPlayers()) do
        if player:isPremium() then
            local position = player:getPosition()
            player:say("Premium Effect!", TALKTYPE_MONSTER_SAY)
            position:sendMagicEffect(effect)
        end
    end
    return true
end
2.png
this pops up
 
What server are you running?
The server opens perfectly without any problem, the only details are the errors in the console

I don't think it's that hard to get a vip effect script for premium account players

I have been searching for 3 days and trying to solve it and I did not arrive at the solution
 
The server opens perfectly without any problem, the only details are the errors in the console

I don't think it's that hard to get a vip effect script for premium account players

I have been searching for 3 days and trying to solve it and I did not arrive at the solution
No.. lol

When you open your server, the very first line in the console.. What server does it say you're using?
 
Alright. Well good job finding the most niche server I've ever seen.

When you're looking for scripts in the future, look for TFS 0.4 style scripts.
TFS 1.0+ scripts will not work for you.


XML:
<globalevent name="premiumEffect" interval="1000" event="script" value="premiumEffect.lua"/>
Lua:
local premiumEffect = CONST_ME_HEARTS

function onThink(cid, interval, lastExecution)
    for _, pid in ipairs(getPlayersOnline()) do
        if isPremium(pid) then
            doSendMagicEffect(getCreaturePosition(pid), premiumEffect)
        end
    end
    return true
end
 
Alright. Well good job finding the most niche server I've ever seen.

When you're looking for scripts in the future, look for TFS 0.4 style scripts.
TFS 1.0+ scripts will not work for you.


XML:
<globalevent name="premiumEffect" interval="1000" event="script" value="premiumEffect.lua"/>
Lua:
local premiumEffect = CONST_ME_HEARTS

function onThink(cid, interval, lastExecution)
    for _, pid in ipairs(getPlayersOnline()) do
        if isPremium(pid) then
            doSendMagicEffect(getCreaturePosition(pid), premiumEffect)
        end
    end
    return true
end
4.png
Perfect now if it worked the only problem is that the V.I.P text does not appear
 
Lua:
doCreatureSay(pid, "V.I.P", TALKTYPE_MONSTER)
5.png
Well you already got the solution to my problem and thank you very much you are a good person

One last curiosity and how do I make the V.I.P text come out as an animated text and not as a monster text?
 
View attachment 76168
Well you already got the solution to my problem and thank you very much you are a good person

One last curiosity and how do I make the V.I.P text come out as an animated text and not as a monster text?
If your server has it..
Lua:
doSendAnimatedText(getCreaturePosition(pid), "V.I.P", color)

and your color choices are
Lua:
COLOR_BLACK = 0
COLOR_BLUE = 5
COLOR_GREEN = 18
COLOR_LIGHTGREEN = 66
COLOR_DARKBROWN = 78
COLOR_LIGHTBLUE = 89
COLOR_MAYABLUE = 95
COLOR_DARKRED = 108
COLOR_DARKPURPLE = 112
COLOR_BROWN = 120
COLOR_GREY = 129
COLOR_TEAL = 143
COLOR_DARKPINK = 152
COLOR_PURPLE = 154
COLOR_DARKORANGE = 156
COLOR_RED = 180
COLOR_PINK = 190
COLOR_ORANGE = 192
COLOR_DARKYELLOW = 205
COLOR_YELLOW = 210
COLOR_WHITE = 215
 
you are a genius thank you good man

So many problems for a quick solution because that's how it is, you just have to be patient and when you can't seek help xD

I will continue fixing more things since there is a long way to go, it is a server that started from 0 and I am currently fixing the vip system and the cities

Solved
 
Back
Top