Pavinski
Member
- Joined
- May 28, 2020
- Messages
- 30
- Reaction score
- 5
as you can see there is nothing related to this here:
![]()
otservbr-global/data/modules/scripts/daily_reward/daily_reward.lua at main · opentibiabr/otservbr-global
OTServBR-Global datapack was migrated to Canary repository: https://github.com/opentibiabr/canary - opentibiabr/otservbr-globalgithub.com
so this message might be hardcoded into the client and to modify it you would have to hex edit it
@Westwol might be able to help you since he was the one who designed the system![]()
player:sendOpenRewardWall(source)
i guess you can remove it by editing the shrine part
edit this.
change source to 1 and testLUA:player:sendOpenRewardWall(source)
function onRecvbyte(player, msg, byte)
if (byte == ClientPackets.OpenRewardWall) then
DailyReward.loadDailyReward(player:getId(), REWARD_FROM_SHRINE)
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.
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
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)