#(danjoe3) Item flag expire query

36 messages · Page 1 of 1 (latest)

chrome locust
#

Hey guys,

I'm still working on an auction house system. I've tried implementing custom flag expire duration per rank for the items that they auction, but it seems to be showing only 6 hours on the item lore, but when checked, it seems to be a different hour. Could you let me know where I'm going wrong please, there is no error.

Here is the paste -
https://paste.denizenscript.com/View/121145
So I'm currently on the syfon rank which is supposed to show 18 hours

dapper prairieBOT
#

(danjoe3) Item flag expire query

dapper prairieBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

chrome locust
#

Also, is there a way to reduce the time shown in the lore? So if the duration becomes 5 hours, the item lore would change from 6h to 5h 30m and all?

chrome locust
#

I have another issue too. This is another paste for another issue within the same concept -> https://paste.denizenscript.com/View/121148
The item that has expired, doesnt seem to be going out of the server flag list. But the item that has the flag seems to go instantly, What am I doing wrong? 😬
Here is a video -> https://streamable.com/30318t

chrome locust
verbal ore
#

It seems you are expecting the item to auto update based on some data it has no idea about

#

When you set the lore.. thats all you did, made some text and told the item to display the text. It doesnt know anything about flags or time and wont just update

#

You need to do the updating manually (probably upon inventory open so you dont waste updating stuff no one sees)

verbal ore
chrome locust
chrome locust
loud aurora
#

You could use runlater.

mystic glade
#

Can you provide a

#

Oh wait.

#

The thread didn't load nevermind.

chrome locust
#

!t runlater

sturdy hingeBOT
chrome locust
#

!c runlater

sturdy hingeBOT
# chrome locust !c runlater
Group

queue

Syntax

runlater [<script>] (path:<name>) [delay:<duration>] (id:<id>) (def:<element>|.../defmap:<map>/def.<name>:<value>)

Short Description

Causes a task to run sometime in the future, even if the server restarts.

Description

Causes a task to run sometime in the future, even if the server restarts.

Script, path, and definition inputs work the exact same as with !command run.

This command will store intended script runs to a file, so that even if the server restarts, they will still run.
Script runs are guaranteed to happen after the time is up - if the server is turned off at the scheduled time, they will run at next startup.
The guarantee can be broken if the server crashes or other errors occur.

The delay...

chrome locust
#

I'm still confused about this, sorry about that 😬 !

crisp mulch
#

It really depends on how you open the inventory - from what I can see with your current setup you'd need to loop over the items and see if any already expired

#

An alternative setup would be to have the expire be on the server flag, in which case it'd probably need to be a map instead of a list? and in that case you could just loop over the items as usual and the flags would expire on their own

toxic stirrupBOT
crisp mulch
#

And either way you'll probably want a check when buying the items, to make sure they haven't already expired while the inventory was open

chrome locust
chrome locust
chrome locust
#

I’ve used a foreach to not show the expired flag, but how would I remove the item from the list/ flag entirely?

chrome locust
loud aurora
#

!mcve

sturdy hingeBOT
# loud aurora !mcve
Info: mcve

Please create a Minimal, Complete, and Verifiable Example of the problem you're reporting.
Minimal: contains nothing other than the part that's broken (and bare minimum structure).
Complete: contains everything needed to demonstrate the issue.
Verifiable: Anybody should be able to throw it on their own server and see the problem happen for themselves, without any needed tinkering.

loud aurora
#

I'm not going to search through a debug that has a lot of irrelevant actions happening. Kindly make another debug that is minimal, so we can better see what you are doing, and why you are not getting the results as expected.

chrome locust
#

It’s alright. Thank you so much, I understand