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

TFS 1.X+ Loot Channel TFS 1.4 downgraded 8.60

rexgandi

Member
Joined
Oct 22, 2011
Messages
189
Reaction score
9
Hello.
Whoe's Can help me, and talk how i Can add Loot Channel to TFS 1.4 downgraded (version 8.60)?
 
It is actually pretty simple.

What you need to do is to change those lines where loot is sent, mostly at default_onDropLoot.lua, and specify it to be sent to your desired channel. Like Sarah said here C++ - Loot Channel System (https://otland.net/threads/loot-channel-system.254816/#post-2679854), is just changing this player:sendTextMessage function from loot related scripts.
 
someone hava a solution?

data/chatchannels
in XML
XML:
<channel id="11" name="Loot" public="1" script="loot.lua" />
in LUA
LUA:
function onSpeak(player, type, message)
    local playerAccountType = player:getAccountType()
    if playerAccountType == ACCOUNT_TYPE_NORMAL then
        player:sendCancelMessage("You can not speak here.")
        return false
    end
    return type
end

and then you go to data/scripts/eventscallbacks/monster/default_onDropLoot.lua
then you must edit those two lines
1732307396281.webp
LUA:
player:sendTextMessage(MESSAGE_INFO_DESCR, text)
to
LUA:
player:sendChannelMessage("", text, TALKTYPE_CHANNEL_O, 11)

and if you want to open the loot channel always as default:
data/creaturescripts/login
add:
LUA:
player:openChannel(11)
Post automatically merged:

It is actually pretty simple.

What you need to do is to change those lines where loot is sent, mostly at default_onDropLoot.lua, and specify it to be sent to your desired channel. Like Sarah said here C++ - Loot Channel System (https://otland.net/threads/loot-channel-system.254816/#post-2679854), is just changing this player:sendTextMessage function from loot related scripts.

Oh u were faster by few seconds :D
 
Back
Top