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

Store problem - Invalid http status code (403)

Wilku93

New Member
Joined
Jul 7, 2024
Messages
9
Reaction score
3
GitHub
Wilku93
Hi :)

Yesterday evening I was cleaning up the shop on OTCv8 (Tfs 1.4.2), I added new items, category etc. and everything was working fine. I wrote down everything, turned off the computer and today I wanted to get back to work. Suddenly, I want to run the shop and it doesn't work (screenshot). In otclientv8.log every time I run it I get an error:

"WARNING: HTTP error for http://************/api/status.php: Invalid http status code (403)"

I reinstalled the entire shopp again and it didn't help. Any idea what's going on?
 

Attachments

Read logs
creaturescripts/creaturescripts.xml

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="login" name="PlayerLogin" script="login.lua" />
<event type="logout" name="PlayerLogout" script="logout.lua" />
<event type="login" name="FirstItems" script="firstitems.lua" />
<event type="login" name="OfflineTraining" script="offlinetraining.lua" />
<event type="login" name="RegenerateStamina" script="regeneratestamina.lua" />
<event type="death" name="PlayerDeath" script="playerdeath.lua" />
<event type="death" name="DropLoot" script="droploot.lua" />
<event type="extendedopcode" name="ExtendedOpcode" script="extendedopcode.lua" />
<event type="extendedopcode" name="Shop" script="shop.lua" />
</creaturescripts>

creaturescripts/scripts/login.lua

function onLogin(player)
local serverName = configManager.getString(configKeys.SERVER_NAME)
local loginStr = "Welcome to " .. serverName .. "!"
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. " Please choose your outfit."
player:sendOutfitWindow()
else
if loginStr ~= "" then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end
loginStr = string.format("Your last visit in %s: %s.", serverName, os.date("%d %b %Y %X", player:getLastLoginSaved()))
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
-- Promotion
local vocation = player:getVocation()
local promotion = vocation:getPromotion()
if player:isPremium() then
local value = player:getStorageValue(PlayerStorageKeys.promotion)
if value == 1 then
player:setVocation(promotion)
end
elseif not promotion then
player:setVocation(vocation:getDemotion())
end
-- Events
player:registerEvent("PlayerDeath")
player:registerEvent("DropLoot")
player:openChannel(9)
player:registerEvent("Shop")
return true
end

In forgottenserver-1.4.2\data\creaturescripts\scripts
i have shop.lua

forgottenserver-1.4.2\data\lib\lib.lua:
-- Core API functions implemented in Lua
dofile('data/lib/core/core.lua')
-- Compatibility library for our old Lua API
dofile('data/lib/compat/compat.lua')
-- Debugging helper function for Lua developers
dofile('data/lib/debugging/dump.lua')
dofile('data/lib/debugging/lua_version.lua')
dofile('data/lib/core/json.lua')

i have json.lua in forgottenserver-1.4.2\data\lib\core
otclient/modules/game_features/features.lua


if(version >= 770) then
g_game.enableFeature(GameLooktypeU16)
g_game.enableFeature(GameMessageStatements)
g_game.enableFeature(GameLoginPacketEncryption)
g_game.enableFeature(GameExtendedOpcode)
end


OTC\modules\game_store i have:
Shop.lua
shop.otmod
shop.otui
transfer.otui

database :

CREATE TABLE shop_history (
id int(11) NOT NULL,
account int(11) NOT NULL,
player int(11) NOT NULL,
date datetime NOT NULL,
title varchar(100) NOT NULL,
cost int(11) NOT NULL,
details varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE shop_history
ADD PRIMARY KEY (id);
ALTER TABLE shop_history
MODIFY id int(11) NOT NULL AUTO_INCREMENT;

I've already made several tutorials that I probably messed something up. Either I don't have something or I have too much of something😅

otclientv8.log are clear (now)

I checked this, among other things:
Post automatically merged:

i have 10.98 TFC 1.4.2 OTC800
 
Last edited:
Back
Top