Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Command help and Buffstat question.

Newbie Spellweaver
Joined
Aug 17, 2016
Messages
36
Reaction score
0
Hey again. I'm a total noob and dont understand whats wrong with my str/dex/int/luk command.

I think it may because I named it case stat? that it only recongizes the command by @stat only and not @str/dex/etc.
my code is here .


Also, could I get a general direction where I should change for buffs not fully canceling each other out in Solaxia?
I figured it has something to do in Maplecharacter and in Buffstats? Please forgive me if I'm wrong but I could really use some help right now..
 
Newbie Spellweaver
Joined
Jun 19, 2016
Messages
66
Reaction score
5
It's impossible

switch/case satetments work as following

for example

int i = 0;
switch(i) {
case 0: // if i == 0
// do
case 1:
}

etc etc

it must receive some kind of argument if you use case.
 
Upvote 0
Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,139
I dont think they receive anything? correct me if I'm wrong

You can't switch-case nothing. Your argument in the switch is the first command argument (args[0]) from the command string being split. This means your switch will have cases for only the command name. ex: case "help":, case "credits":, etc. If you're doing str/dex/int, you would do case "str": case "dex": etc without breaking each time. You cannot pass case stat: because "stat" is not a string value type, it'd be referenced as nothing. If your source used enumeration types as commands, which Solaxia does not, then it would be valid.

Another thing is this won't work:
Code:
if (sub.length != 2) {
    player.message("Please use it as @str/dex/int/luk 10 for example.");
}

Where's your break or return? It just has fallthrough and will continue executing the command regardless of any of your checks. You need to return or break out of the current switch if something is wrong.
 
Upvote 0
Newbie Spellweaver
Joined
Aug 17, 2016
Messages
36
Reaction score
0
You can't switch-case nothing. Your argument in the switch is the first command argument (args[0]) from the command string being split. This means your switch will have cases for only the command name. ex: case "help":, case "credits":, etc. If you're doing str/dex/int, you would do case "str": case "dex": etc without breaking each time. You cannot pass case stat: because "stat" is not a string value type, it'd be referenced as nothing. If your source used enumeration types as commands, which Solaxia does not, then it would be valid.

Another thing is this won't work:
Code:
if (sub.length != 2) {
    player.message("Please use it as @str/dex/int/luk 10 for example.");
}

Where's your break or return? It just has fallthrough and will continue executing the command regardless of any of your checks. You need to return or break out of the current switch if something is wrong.


Ah, I see, thank you. I'll add the break/return to the command. But do you have any idea of the buffstat problem? Where buffs completely cancels the whole buff instead of just one of the stat. (Ex. Rage/Bless, bless cancels rage cause it has W.DEF)
 
Upvote 0
Custom Title Activated
Loyal Member
Joined
Jan 18, 2010
Messages
3,109
Reaction score
1,139
Ah, I see, thank you. I'll add the break/return to the command. But do you have any idea of the buffstat problem? Where buffs completely cancels the whole buff instead of just one of the stat. (Ex. Rage/Bless, bless cancels rage cause it has W.DEF)

Probably just poor implementation of buffs in Odin. The buff shouldn't ENTIRELY cancel, it should only cancel out that specific buffstat that's being overridden. Unless there's only one registered buffstat and it's being replaced, the buff should remain active. Your issue is likely in some buff function either in MapleCharacter, or in MapleStatEffect, both which should be improved.
 
Upvote 0
not a programmer
Joined
Mar 30, 2015
Messages
532
Reaction score
62
bless cancels rage
IIRC it is supposed to, though as Eric said Solaxia does it wrong so you will have to fix.
I think it's bless first then rage and you will still have an increase of M.DEF, ACC, AVOID and also ATT from rage with W.DEF nullified.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Aug 17, 2016
Messages
36
Reaction score
0
IIRC it is supposed to, though as Eric said Solaxia does it wrong so you will have to fix.
I think it's bless first then rage and you will still have an increase of M.DEF, ACC, AVOID and also ATT from rage with W.DEF nullified.

Even if you do that in Solaxia, the buffs get fully canceled instead of W.DEF being nullified.
 
Upvote 0
Back
Top