• 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 OnAdvanced Skills

darkmu

Well-Known Member
Joined
Aug 26, 2007
Messages
274
Solutions
1
Reaction score
50
Location
Paraná,Brazil
Lua:
function onAdvance(player, skill, oldLevel, newLevel)

Can I get no advanced checking skills like? In my case when the player moves up I wanted to advertise on the channel .. can someone help me?

TFS 1.3
 
sorry but I didn't understand what you wrote this time, but maybe something like this:


just remove the points part and use sendChannelMessage to send to a channel
 
sorry but I didn't understand what you wrote this time, but maybe something like this:


just remove the points part and use sendChannelMessage to send to a channel

I wanted instead of using the callbacks of the onAdvanced function (newLevel, oldLevel) if I can use an onAdvanced callback (newSkill, oldSkill) .. because when he goes up in skill You advanced sword fighting 51 to 52., he should be presented on the server channel.
 
I wanted instead of using the callbacks of the onAdvanced function (newLevel, oldLevel) if I can use an onAdvanced callback (newSkill, oldSkill) .. because when he goes up in skill You advanced sword fighting 51 to 52., he should be presented on the server channel.
just remove the points part and use sendChannelMessage to send to a channel

Find the function sendChannelMessage here:
https://github.com/otland/forgotten...e23173f6ef09a5b9730ab/src/luascript.cpp#L3687

Get channelId from here:
otland/forgottenserver (https://github.com/otland/forgottenserver/blob/master/data/chatchannels/chatchannels.xml)

Get type from here:
otland/forgottenserver (https://github.com/otland/forgottenserver/blob/a4c773d873db178fa34e23173f6ef09a5b9730ab/src/const.h#L197)

and use message like this:
"the message you are going to send"
 
Back
Top