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

[Canary 13.21] manage_storage.lua usage doesn't seem to find proper key-values.

pepeg123

New Member
Joined
Nov 10, 2023
Messages
6
Reaction score
0
Hey there,

Info:
Canary 13.21
No general changes to code or scripts.

Sometimes I'm having some issues with quest states, which seems perfectly natural, bugs do occur. I tend to troubleshoot these in order to find what path works and what doesn't in terms of the quest and if I can fix it in the code. However, whenever I encounter these I never manage to use /getstorage or /setstorage properly ingame.
I always have to view the source code or use SQL queries to find what the value is. And even more annoying if I want to set a value since I have to do that in SQL.

The script in question is this:
https://github.com/opentibiabr/canary/blob/main/data/scripts/talkactions/god/manage_storage.lua


What I have tried:
I have attempted two things. For example, in the quest "In Service of Yalahar" at Mission 8 there's a step where you need to use a crystal on a machine. This essentially doesn't do anything and the quest progress stops there. So I look up the storageId of the quest: Storage.InServiceofYalahar.Mission08 and the actual id the aformentioned variable points to:
Code:
    InServiceofYalahar = {
         ...
        Mission08 = 51218,

Essentially I then assume I can perform the following command:
Code:
 /getstorage PLAYERNAME, [NAME | ID]
Just as is commented in the code.

Whatever I attempt in this case, returns -1, without exception.
For example:
Code:
/getstorage Somecoolplayername, 51218
or
Code:
/getstorage Somecoolplayername, Storage.InServiceofYalahar.Mission08
or
Code:
/getstorage Somecoolplayername, InServiceofYalahar.Mission08

And essentially the same issue pertains to /setstorage, if it does set something, it surely does not find and set the correct key-value rather than creating some new one that I'll never use.

Generally this obviously indicates that whatever parameters I'm putting into /getstorage doesn't exist, are incorrect or the script doesn't correctly parse the command and find the data it's supposed to.

Does anyone have experience using this script and it's commands? Is it actually functional and if so what am I doing wrong? (Cause I'm obviously doing something wrong!)
Would very much appreciate example syntax of how this is supposed to work to get any result other than -1.
I also have no issues implementing a suggested code fix but I was hoping not having to dive into that, presuming the supplied tools generally work so far with the server.


Cheers!
 
Back
Top