1

NEED HELP BADLY!!!!!!! FOR THE LOVE OF GOD HELP ME!!!!!

kingnicolas26's Avatar kingnicolas264/7/15 12:22 am
4/12/2015 11:00 am
BobaFett's Avatar BobaFett
So I've made an RPG machine that gives you extra health every time you level up 10 levels... my only issue is that it is constantly giving a player with the proper xp the health boost effect, making it worthless because it doesn't allow you to regen the extra hearts you've obtained when you're given the effect again.

My idea for a solution is for it to scan for a player with a certain amount of xp, and no potion effect, so that when it searches for a player again, the player WITH the potion effect will not be affected. So I tried this:
/effect @a[l=19,ml=10,effect=0] (effect here) (time here) (strength here)

My issue is that I don't know what to put after the effect=!

Please help!
Posted by kingnicolas26's Avatar
kingnicolas26
Level 30 : Artisan Miner
11

Create an account or sign in to comment.

10

1
04/12/2015 10:50 am
Level 49 : Master Engineer
hokage3211
hokage3211's Avatar
When a player has the possibility of getting more health, if you want to give it to the player only once, create a dummy objective, something like "MaxHealth".
First make the health giving command block:
/effect @a[l=19,lm=10,score_MaxHealth=0,score_MaxHealth_min=0] heath_boost 1000000 1 true
then paste this command in a command block attached to it, such that this runs directly after it:
/scoreboard players set @a[l=19,lm=10,score_MaxHealth=0,score_MaxHealth_min=0] MaxHealth 1
so this flags the player immediately and doesn't let it run it again on it. for the second level up from this it would be something like this:
/effect @a[l=29,lm=20,score_MaxHealth=1,score_MaxHealth_min=1] heath_boost 1000000 2 true
/scoreboard players set @a[l=29,lm=20,score_MaxHealth=1,score_MaxHealth_min=1] MaxHealth 2

One thing I must add as well, to make sure the game recognizes that they have a score set on them for MaxHealth, add a command block on a pretty slow clock to do this: /scoreboard players add @a MaxHealth 0
this will make sure the players have the objective in the first place, and will make sure the game keeps track of their positions.
1
04/07/2015 10:27 pm
Level 19 : Journeyman Network
forgot about you
forgot about you's Avatar
That title though.
1
04/08/2015 4:48 am
Level 32 : Artisan Architect
TheArchitect_95
TheArchitect_95's Avatar
Yes, it does sound as though someone's hired a hit on you. The police would be a better source of advice than Planet Minecraft
1
04/12/2015 11:00 am
Level 21 : Expert uwu
BobaFett
BobaFett's Avatar
Definately
1
04/07/2015 1:11 pm
Level 7 : Apprentice Modder
TenaciousEz
TenaciousEz's Avatar
Pffft, you could just make a plugin or mod to do this, much easier?
1
04/07/2015 10:24 pm
Level 30 : Artisan Miner
kingnicolas26
kingnicolas26's Avatar
Modding would be easier in some cases, but I want to try and make plugins in vanilla Minecraft.
1
04/07/2015 5:41 am
Level 32 : Artisan Architect
TheArchitect_95
TheArchitect_95's Avatar
The problem here is that there is no such thing as effect for inside the square brackets. Best off using scoreboards to track all players. Then your commands could look like this.

effect @a[score_xp_min=10] heath_boost 1000000 1 true
effect @a[score_xp_min=20] heath_boost 1000000 2 true etc...
1
04/07/2015 1:12 am
Level 1 : New Network
magicalbeakz18
magicalbeakz18's Avatar
"Every time you level up 10 levels"

Where in that code does it define 10 levels as a variable..
Do you even get an error that you can give us to help you?
1
04/07/2015 1:18 am
Level 15 : Journeyman Taco
Johnanater
Johnanater's Avatar
Idk. Is there a /testfor for xp???!?!?!
1
04/09/2015 10:37 am
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Just for the record, there is actually a testfor for xp. l= tests for a max level, and lm= tests for a min level. You don't really see it used much anymore, since scoreboard exists now. Before then though, right around the time command blocks were introduced, people used to give different amounts of level to players similar to how you would give scores to people today.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome