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

Daily reward system message origin

Pavinski

Member
Joined
May 28, 2020
Messages
30
Reaction score
5
Hello!

Does anyone know where the message below is generated? I have looked around, but have not been able to find it. I want to find it so I can modify the message and play around with it. I may also just delete it.

I have client 12 and I am using OTServ-BR global

Thank you for the help

Daily Reward.PNG
 
as you can see there is nothing related to this here:

so this message might be hardcoded into the client and to modify it you would have to hex edit it

Thank you for your answer. Yes, that's the file I was looking at and was not able to find the message itself. I think you are right and it's part of the client. Do you know the hex code for that piece by any chance? Is it a simple ASCII to Hex conversion or is there some cryptography involved?

Also I was thinking that maybe there is a line in that file that tells the client to pop the message (not necessarily what the message should say, but just a signal to display it), but again I did not find anything to support that. I think if I am not able to find the hex code and modify it there my best bet would be to make it so you permanently have at least 2 "Instant Reward Access" so the message does not appear. This is not the best practice, but do you see any problem with that or have any suggestions?
 
i guess you can remove it by editing the shrine part
edit this.
Lua:
player:sendOpenRewardWall(source)
change source to 1 and test

Thank you for the reply. Unfortunately that did not disable the message. I find this file a bit strange because it keeps changing the definition of "Shrine" from 1 to 0 and same with "Panel". In some functions Panel is 1 and Shrine is 0 and in others it's the other way around.

I did however find a work around to disable the message by doing the following. Originally it said "REWARD_FROM_PANEL":
Lua:
function onRecvbyte(player, msg, byte)
    if (byte == ClientPackets.OpenRewardWall) then
        DailyReward.loadDailyReward(player:getId(), REWARD_FROM_SHRINE)

I think this will be fine as a temporary solution, but I would like to know more about how to do a permanent one by modifying the message or actually disabling it. If someone has knowledge about this I would love to learn more.
 
Thank you for the reply. Unfortunately that did not disable the message. I find this file a bit strange because it keeps changing the definition of "Shrine" from 1 to 0 and same with "Panel". In some functions Panel is 1 and Shrine is 0 and in others it's the other way around.

I did however find a work around to disable the message by doing the following. Originally it said "REWARD_FROM_PANEL":
Lua:
function onRecvbyte(player, msg, byte)
    if (byte == ClientPackets.OpenRewardWall) then
        DailyReward.loadDailyReward(player:getId(), REWARD_FROM_SHRINE)

I think this will be fine as a temporary solution, but I would like to know more about how to do a permanent one by modifying the message or actually disabling it. If someone has knowledge about this I would love to learn more.
Lua:
function Player.sendOpenRewardWall(self, shrine)
    local msg = NetworkMessage()
    msg:addByte(ServerPackets.OpenRewardWall) -- initial packet
    msg:addByte(1) -- isPlayer taking bonus from reward shrine (1) - taking it from a instant bonus reward (0)
    if DailyReward.testMode then
        msg:addU32(0)
    else
        msg:addU32(self:getNextRewardTime())
    end
    msg:addByte(self:getDayStreak()) -- current reward? day = 0, day 1, ... this should be resetted to 0 every week imo
    local dailyReward_taken = 0 -- 0 / 1 / 2
    msg:addByte(dailyReward_taken) -- state (player already took reward? but just make sure noone wpe)
    if dailyReward_taken ~= 0 then
        msg:addString("Sorry, you have already taken your daily reward or you are unable to collect it.")
    end
    msg:addU32(0) --timeLeft to pickUp reward without loosing streak//this should be 0 if reward has been already picked
    msg:addU16(self:getStreakLevel()) -- day strike
    msg:addU16(24) -- unknown
    msg:sendToPlayer(self)
end

Put a value of 1 here and there won't be instant reward popup:
Lua:
msg:addByte(1) -- isPlayer taking bonus from reward shrine (1) - taking it from a instant bonus reward (0)
 
Put a value of 1 here and there won't be instant reward popup:
Lua:
msg:addByte(1) -- isPlayer taking bonus from reward shrine (1) - taking it from a instant bonus reward (0)

Thank you! I will try that alternative. It's similar to my solution it seems like
 
Back
Top