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

Say in NPC Channel

447557

Member
Joined
Sep 17, 2011
Messages
32
Solutions
1
Reaction score
10
I've been looking a way to say something in the NPC channel, but I couldn't find any way to do so.

I've found this, though:

I thought this function could return all the channels and their IDs:
Code:
processChannelList(const std::vector<std::tuple<int, std::string> >& channelList)

And I also found this two functions that probably send message to a channel:
Code:
processTalk(const std::string& name, int level, Otc::MessageMode mode, const std::string& text, int channelId, const Position& pos)
talkChannel(Otc::MessageMode mode, int channelId, const std::string& message)

But I might be dumb, cus I've got no idea how to apply this.

Any ideas? please @_@



@@@
I managed to make it say something with this:
g_game.talkChannel(7, 3, "text")
But it says in the default channel.
Don't ask me how the fuck I'm using 7 or 3, it simply worked and I got no idea why.
But It's not going to the NPC channel :(


@@@@
I managed to find this info:
Code:
SpeakTypes = {
[MessageModes.Say] = SpeakTypesSettings.say,
[MessageModes.Whisper] = SpeakTypesSettings.whisper,
[MessageModes.Yell] = SpeakTypesSettings.yell,
[MessageModes.GamemasterBroadcast] = SpeakTypesSettings.broadcast,
[MessageModes.PrivateFrom] = SpeakTypesSettings.private,
[MessageModes.GamemasterPrivateFrom] = SpeakTypesSettings.privateRed,
[MessageModes.NpcTo] = SpeakTypesSettings.privatePlayerToNpc,
[MessageModes.NpcFrom] = SpeakTypesSettings.privateNpcToPlayer,
[MessageModes.Channel] = SpeakTypesSettings.channelYellow,
[MessageModes.ChannelManagement] = SpeakTypesSettings.channelWhite,
[MessageModes.GamemasterChannel] = SpeakTypesSettings.channelRed,
[MessageModes.ChannelHighlight] = SpeakTypesSettings.channelOrange,
[MessageModes.MonsterSay] = SpeakTypesSettings.monsterSay,
[MessageModes.MonsterYell] = SpeakTypesSettings.monsterYell,
[MessageModes.RVRChannel] = SpeakTypesSettings.channelWhite,
[MessageModes.RVRContinue] = SpeakTypesSettings.rvrContinue,
[MessageModes.RVRAnswer] = SpeakTypesSettings.rvrAnswerFrom,
[MessageModes.NpcFromStartBlock] = SpeakTypesSettings.privateNpcToPlayer,
-- ignored types
[MessageModes.Spell] = SpeakTypesSettings.none,
[MessageModes.BarkLow] = SpeakTypesSettings.none,
[MessageModes.BarkLoud] = SpeakTypesSettings.none,
}

Which is something. So I ran:

Code:
for v = 0, 30 do
    g_game.talkChannel(MessageModes.RVRChannel, v, "N: ".. v)
end

(not only RVRChannel but also Channel and NpcTo)
And nothing worked.
So I tried opening every channel, and it did, besides NPCs. So my theory is that NPCs isn't actually a channel, so I gotta find a way to find it's tab and say something in there.

Any ideas? t_T
 
Last edited:
Back
Top