EXP Problem & Tag

Socius Decennalis
Decennium
Joined
Nov 26, 2012
Messages
156
Reaction score
35
Hi everyone, I just have two questions to ask.

One is;
The mob Bigfoot gives the correct amount of exp which i want it to give however does not go through.Also, if you attack bigfoots too fast, it does not do damage at times. LIke I use 2 gm roars and it will count as only being hit Once rather than twice. The damage still appears, but it does not deal damage.

Secondly for an event.. "tag"
There is a command currently "killnear" ..and now..that will kill the players near me so is it possible that the players who get killed.. i can then use a command called !givetag <playername> which will allow them to use the command TaG to do the same affect as killnear, but only can use the command if the !givetag has been used?

Thank you.
 
I didn't fully understand what you want to do with the command thing, but just add tag as a regular player command, and make a boolean which equals false. add the giveTag command to your GM's, which enables this boolean. then the tag command just checks if its true before doing what you want it to do.

about bigfoot. what do you mean the exp doesn't go through? does your EXP bar glitch after killing it or something?
and I'm not sure about the attack thing, does it happen to other monsters too?
in v88 if a night lord attacked bigfoot consecutively, some attacks would pass through
 
Upvote 0
I didn't fully understand what you want to do with the command thing, but just add tag as a regular player command, and make a boolean which equals false. add the giveTag command to your GM's, which enables this boolean. then the tag command just checks if its true before doing what you want it to do.

about bigfoot. what do you mean the exp doesn't go through? does your EXP bar glitch after killing it or something?
and I'm not sure about the attack thing, does it happen to other monsters too?
in v88 if a night lord attacked bigfoot consecutively, some attacks would pass through

I see, well the command method u said makes sense, ill try it.

The big foot is the exp bar glitches after killing it..although if u just kill more and level up it goes, but comes back again after etc.. is there a way of this not happening?
 
Upvote 0
I see, well the command method u said makes sense, ill try it.

The big foot is the exp bar glitches after killing it..although if u just kill more and level up it goes, but comes back again after etc.. is there a way of this not happening?

thats because big foot has a lot of exp and killing it will overflow your xp
 
Upvote 0
add a boolean in MapleCharacter that is false by default. Then add a TaG command that is identical to the one you use for GMs but add a check for the boolean. Toggle the boolean with !enabletag/!disabletag or w/e.

also unban sayonarabye on ur server gosu banned me for no reason
 
Upvote 0
I didn't fully understand what you want to do with the command thing, but just add tag as a regular player command, and make a boolean which equals false. add the giveTag command to your GM's, which enables this boolean. then the tag command just checks if its true before doing what you want it to do.

about bigfoot. what do you mean the exp doesn't go through? does your EXP bar glitch after killing it or something?
and I'm not sure about the attack thing, does it happen to other monsters too?
in v88 if a night lord attacked bigfoot consecutively, some attacks would pass through

Right. So I have a boolean in MapleCharacter ; public boolean tag = false;

And now there is a player command called TaG

Code:
} else if (splitted[0].equals("tag")) {
                 if(player.tag = true); 
         player.dropMessage("Tag is on!"); 
         player.dropMessage("Use [USER=508752]TaG[/USER] to tag someone within the range");
            MapleMap map = player.getMap();
            List<MapleMapObject> players = map.getMapObjectsInRange(player.getPosition(), (double) 25000, Arrays.asList(MapleMapObjectType.PLAYER));
            for (MapleMapObject closeplayers : players) {
                MapleCharacter playernear = (MapleCharacter) closeplayers;
            if (playernear.isAlive() && playernear != player);
                if(!playernear.isGM()){
                playernear.setHp(0);
                playernear.updateSingleStat(MapleStat.HP, 0);
                }
                playernear.dropMessage(6, "You were too close to a GM.");
            }

Im not sure if that is correct? Is that saying that if player tag is true, then allow them to use the command? Or should it just be player.tag == true;


As for the GM command for example !enabletag <username>

Im not really sure on how to do this part. How can i make it enable tag for a specified user which enables the boolean only for them?

Thank you
 
Upvote 0
the tag boolean in MapleCharacter should be private, and accessed by getTag() method.
your syntax is incorrect. no ; after if, and use brackets {}.
also, in programming. "=" means assign a value, while "==" means comparison.
which means you have to do:
if(player.getTag() == true) {
command code
} else {
you cant use it right now message
}

another thing which you don't have to use but good to know, is when comparing booleans, you don't have to do "== true".
you can just type if(player.getTag())

as for your last question, yes. add another method in MapleCharacter called setTag that gets a boolean argument(call it newTag or something).
the method just sets your tag variable to the boolean you received like so:
tag = newTag;

next, make the gm command target a player, and invoke setTag method.
the algorithm should be:
search for the player the GM entered in map/world, if found -> player.setTag(true);
this way youll have to add a disable method, or alternatively, change the methods name to toggleTag or something and after finding the player do -> player.setTag(!player.getTag());
this reverses the value(if it was true, becomes false. and vise versa)
 
Upvote 0
the tag boolean in MapleCharacter should be private, and accessed by getTag() method.
your syntax is incorrect. no ; after if, and use brackets {}.
also, in programming. "=" means assign a value, while "==" means comparison.
which means you have to do:
if(player.getTag() == true) {
command code
} else {
you cant use it right now message
}

another thing which you don't have to use but good to know, is when comparing booleans, you don't have to do "== true".
you can just type if(player.getTag())

as for your last question, yes. add another method in MapleCharacter called setTag that gets a boolean argument(call it newTag or something).
the method just sets your tag variable to the boolean you received like so:
tag = newTag;

next, make the gm command target a player, and invoke setTag method

I appreciate it. I'll try to follow this sensibly a little later xD
 
Upvote 0
Back