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:
Essentially I then assume I can perform the following command:
Just as is commented in the code.
Whatever I attempt in this case, returns -1, without exception.
For example:
or
or
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!
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]
Whatever I attempt in this case, returns -1, without exception.
For example:
Code:
/getstorage Somecoolplayername, 51218
Code:
/getstorage Somecoolplayername, Storage.InServiceofYalahar.Mission08
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!