Jump to content
  • 0

.xprate for Mangos Zero


nvrsbr

Question

11 answers to this question

Recommended Posts

Anyone know how to add or where to get a script that will allow my players to use the .xprate command ?

I set up a few commands dealing to custom exp rates on my git branch. It's for mangos-one rather than zero but I bet it will work on zero if you can do some basic copy pasting from the one or two commits related to ".exprate"

You can find it here: https://github.com/LeFroid/mangos-one

Look at the last two commits (There are a few other goodies in my branch as well).

Link to comment
Share on other sites

Anyone know how to add or where to get a script that will allow my players to use the .xprate command ?

I set up a few commands dealing to custom exp rates on my git branch. It's for mangos-one rather than zero but I bet it will work on zero if you can do some basic copy pasting from the one or two commits related to ".exprate"

You can find it here: https://github.com/LeFroid/mangos-one

Look at the last two commits (There are a few other goodies in my branch as well).

Sounds easy enough... but I am new to this so it seems a bit confusing to me :D

Anyone have some advice ?

Does not look like its the same?

Trying to copy paste to correct locations but not find the text that needs to be replaced :(

Link to comment
Share on other sites

Anyone know how to add or where to get a script that will allow my players to use the .xprate command ?

I set up a few commands dealing to custom exp rates on my git branch. It's for mangos-one rather than zero but I bet it will work on zero if you can do some basic copy pasting from the one or two commits related to ".exprate"

You can find it here: https://github.com/LeFroid/mangos-one

Look at the last two commits (There are a few other goodies in my branch as well).

Sounds easy enough... but I am new to this so it seems a bit confusing to me :D

Anyone have some advice ?

Does not look like its the same?

Trying to copy paste to correct locations but not find the text that needs to be replaced :(

Well first of all I hope you didn't copy/paste any of the gameobject or playerbot code!

I could see how this would be confusing with someone not acquainted to mangos or programming in general.

I don't have the time right now to explain everything, but if you don't get it after my advice I'll be more specific.

All you have to do is go through the last two commits in my repository ( https://github.com/LeFroid/mangos-one/commit/fcc70b09c709497e6a6280f3e990a1c9d3bba14a ; https://github.com/LeFroid/mangos-one/commit/85f94dc5d9aabd829b8d42b62a41e6e9b71888ef ) and find any text pertaining to "exprate" or experience.

Exact line numbers are irrelevant because of the potential differences between mangos zero and one. All that matters is putting the code

in the correct function with the correct syntax.

To do this, look at the grey lines from the github commit. For example:

@@ -243,7 +243,7 @@ ChatCommand* ChatHandler::getCommandTable()

All of the code that should be "copy pasted" from that section in github (up to the next gray line) should be placed in the function ChatHandler::getCommandTable() { }

From there you just see any similarities in code or get a general idea of where my code went, and that's where you should paste it.

You won''t have to copy anything that isn't obviously related to the experience system, by the way. The command "alar," for instance, is irrelevant to the command table "exprate," and anything in the gameobject files or playerbot folder is not needed.

I hope that helps some.

Link to comment
Share on other sites

I sent you a PM on how to fix that nvrsbr.

I had done everything you wrote in the PM already.

No matter what I set PlayerXP.MaxRate to its always 60X max on the server.

That's odd...

I am unable to properly edit my mangos branch right now, but if you want to try something real quick (with no guarantees of working) I have some advice.

My first tip would be to find eConfigInt32Values In 'world.h', and then find CONFIG_INT32_PLAYER_MAX_XP_RATE which you should have placed there.

Try cutting that string and pasting it at the end of eConfigFloatValues (second to last).

I am recommending this because there may be a data type issue I'm not aware of.

My other tip, from only glancing at the code for less than a minute, is to go to ChatHandler::HandleXPRateCommand(char* args) in 'Level0.cpp' and look for this line of code:

if(xpRate > (CONFIG_INT32_PLAYER_MAX_XP_RATE-1))

Try changing it to

if(xpRate > (CONFIG_INT32_PLAYER_MAX_XP_RATE))

and see if that works.

If both of these tips fail, I can examine the problem in greater depth when I have the time. The best way for me to help would be for you to send me a copy of your source code along with a patch or diff file.

Link to comment
Share on other sites

:(

What operating system are you running your mangos server on?

For me it is a FreeBSD system, and that is the only OS I've tested my mod on. I guess if you are using something like windows there could be a difference in code interpretation.

I also have to ask what compiler it is you are using. Visual C++, gcc, icc ? This kind of information may be useful

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use