#cap levels for quest sytem

1 messages · Page 1 of 1 (latest)

dire drum
#

hi i need some help with capping levels for my quest menu

#

now when you reach rank 20 (max rank is 1000) it will be going to 1000/20

#

but i don't want that

#

i just want it to be 20/20 when reached

#

so is there a way to cap placeholders?

snow pebble
#

Change output

#

-papi changeoutput

#

If the placeholder is greater than or equal to 20, return 20

deep anvilBOT
#
Placeholderapi
Useful Links & Information:

A resource that allows information from your favorite plugins be shown practically anywhere!
Spigot
Wiki
Placeholder-List
GitHub
eCloud

snow pebble
#

%changeoutput_>=_input:{your_placeholder}_matcher:20_ifmatch:20_else:{your_placeholder}%

dire drum
snow pebble
#

not automatically, but you can have them click on it to claim the reward

#

most likely, you'd want another item with view requirements for all 6 tasks (and an exact duplicate of these in your click requirement to avoid any bugs)

#

once all 6 are completed, show the "claimreward" item

#

you could also have a "questclaimed" item if you wanted that shows once they claim it

dire drum
#

But i have tryed it but then you can´t set 6 req on a menu

snow pebble
#

you can

#

?dm-multireq

deep anvilBOT
#
FAQ Answer:
click_requirement:
  requirements:
    requirement1:
      type: TYPE
    requirement2:
      type: TYPE
    requirement3:
      type: TYPE
    requirement4:
      type: TYPE

More info on the Wiki

dire drum
#

o thx

dire drum
#

my quest stays 0

#

but i mined 2K blocks

snow pebble
#

Can you send the placeholder you want to use and also the changeoutput placeholder you are using in escaped/codeblock format?

#

Surround with `` to escape formatting

#

It looks like you might be nesting placeholders, which means you need the Utils expansion

#

If you want to try it, download it and just add utils_parse_ to the front of your placeholder

%utils_parse_changeoutput_…%

dire drum
#

%changeoutput_>=_input:{edprison_notation_{edprison_currency_blocks}}_matcher:10000_ifmatch:10000_else:{edprison_notation_{edprison_currency_blocks}%

dire drum
gusty sparrow
#

its should number value 2860, not the formatted 2.86k

snow pebble
#

you're missing a } near the very end

#

but I don't think it will work either way without utils

#

and as Anh said, make sure {edprison_notation_{edprison_currency_blocks}} is returning a RAW number, not a formatted number

dire drum
#

Like after quest 1 i dont want to have 100.000.000 but just 100mil

snow pebble
#

ok, but you have to format it AFTER the changeoutput

#

not before

#

is {edprison_notation_<placeholder>} the one doing the formatting?

#

%utils_parse_edprison_notation_{changeoutput_>=_input:{edprison_currency_blocks}_matcher:10000_ifmatch:10000_else:{edprison_currency_blocks}}%

dire drum
snow pebble
#

nice, glad to hear it 😊

dire drum
# snow pebble nice, glad to hear it 😊

oops 1 more thing

  material: WRITABLE_BOOK
  slot: 0
  priority: 1
  display_name: '&e&lMine Quest I'
  lore:
  - 'complete'
  view_requirement:
   minimum_requirements: 1
   stop_at_success: true
   deny_commands:
   - "[message] &7You don't have 1 of the 2 permissions required."
    requirements:
      task1:
        type: javascript
        expression: '%edprison_currency_blocks%>= 1000'
      task2:
        type: javascript
        expression: '%edprison_level_pickaxe%>= 10'```
#

i'm trying now the view req

#

but this don't seem te work xd

#

NVM forget it