• 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 TFS 1.0.0 Vip Experience

putamerda

New Member
Joined
Jan 2, 2012
Messages
73
Reaction score
0
Guys here: i use TFS 1.0.0 and it doenst accept function doPlayerSetRate...Sem título.png
what should i do?
 
try with something like this (dunno if it exists)
Code:
local rate = Game.getExperienceStage(Player(cid):getLevel())
local newRate = rate * 2.0
Player(cid):setExperienceStage(newRate)
 
As Mark said, that function dosen't exist. If you ask me those "lists" aren't any good, use this page: https://github.com/otland/forgottenserver/blob/master/src/luascript.cpp (will always be the latest functions) and compat.lua to find functions.
Thats atleast what I use and I prefer using those if im looking for a function I can't remember the name for insted of having some text file with some of them listed as either meta or not.
 
Thanks WibbenZ, just not 100% sure how exactly to read all that, like...

Code:
int32_t LuaScriptInterface::luaPartyAddMember(lua_State* L)
{
    // party:addMember(player)
    Player* player = getPlayer(L, 2);
    Party* party = getUserdata<Party>(L, 1);
    if (party && player) {
        pushBoolean(L, party->joinParty(*player));
    } else {
        lua_pushnil(L);
    }
    return 1;
}

is that like the function Player(cid): PartyAddMember(lua_State* L) OR PartyAddMember(lua_State* L)
 
There are other functions in that file, registerMethod or registerFunction there you will find the correct function string.
As you can also see below the function name it says "party:addMember(player)".
 
Back
Top