|
You last visited: Today at 10:51
Advertisement
Mana Trouble
Discussion on Mana Trouble within the CO2 Private Server forum part of the Conquer Online 2 category.
11/11/2008, 02:06
|
#31
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by Incariuz
Ok, well I'm back at it now, so I'll look through and see what I can find.
Edit: I have noticed one thing though. A large variety of area's in the character.cs dealing with stamina involve SkillAttributes[4]. Would I perhaps need to make a #region SkillAttribute dealing with mana or something?
|
The #regions for skillattributes refer to the type of skill or the FIRST number in the array(IE: 2 for thunder etc).
|
|
|
11/11/2008, 02:09
|
#32
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
lol, I was just looking in Emme's thread and came upon you saying that and it triggered.
I'm reading through that section carefully right now, *** I hope I get this. I have a feeling it's so simple, and my mind just isn't clueing into it.
|
|
|
11/11/2008, 02:53
|
#33
|
elite*gold: 0
Join Date: Aug 2006
Posts: 93
Received Thanks: 9
|
I have a feeling it is simple but, we just aren't doing some step right or leaving out 1 thing or something small.
|
|
|
11/11/2008, 03:26
|
#34
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Well... I ran off to eat, back at it now. I'm gonna look through #region SkillAttributes2n6n12 now, hopefully something will come to me.
|
|
|
11/11/2008, 03:44
|
#35
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Progress... Finally... Ok, sorry for double post, but figured this is important.
At #region SkillAttributes2n6n12
Code:
Stamina -= (byte)SkillAttributes[4];
MyClient.SendPacket(General.MyPackets.Vital(UID, 9, Stamina));
below it I added
Code:
CurMP -= (byte)SkillAttributes[2];
MyClient.SendPacket(General.MyPackets.Vital(UID, 2, CurMP));
it's draining mp for magic now. Only one small issue, when I cast the spell I have 7000/7000 MP but it jumped to like 66000/7000 after casting, then started removing off that new amount each attack. Going to see if I can work this out. If you figure anything out, lemme know.
Edit: And on a side note, you were originally right when setting up the mana usage for spells. So don't attempt with the way I stated before, it just results in mana usage.
|
|
|
11/11/2008, 03:58
|
#36
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Not going to quote that post but heres your error
(ushort.Maxvalue = AROUND 65534 or something)
You have CurMP at 0 right now, when you subtract an unsigned int, and it goes below zero, you get Type.MaxValue - the value you subtract. Here's your "like 66000/7000".
Fix: On login set CurMP to MaxMana() OR load CurMP from mysql(real way).
And don't typecast it to a byte, some mana useage is over 255.
Code:
CurMP -= [Color="Green"]/*(byte)*/[/Color]SkillAttributes[2];//Leave it as ushort.
|
|
|
11/11/2008, 03:58
|
#37
|
elite*gold: 0
Join Date: Aug 2006
Posts: 93
Received Thanks: 9
|
Thanks for the update I will be seeing what i can make happen, We will figure this out =)
|
|
|
11/11/2008, 04:10
|
#38
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Ya, I wasn't thinking about the byte, was just happy it worked, lol. It's changed now, but still giving the same effect.
I'm not really sure what you meant by the rest, sorry. Brain is shutting down on me while lost in thought.
|
|
|
11/11/2008, 04:24
|
#39
|
elite*gold: 0
Join Date: Aug 2006
Posts: 93
Received Thanks: 9
|
Ok what he is saying (I think) Is we need to make it so max mana starts when you log in, so you do not get the error of 66000/700 (w/e). And to change byte to ushort? I might be wrong but I will miss with it and see =)
|
|
|
11/11/2008, 04:29
|
#40
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Ya, change byte to ushort in the code I gave. For when we get to spells using more mana then 255 to avoid errors. And I just figured out the rest he said after I sent my message, lol. Had a blonde moment. But now I'm trying to find where to setup the mana on login. I'm guessing we also need to do something in the public void Revive script aswell for when we revive after death to avoid the error, but I'm not gonna mess with that till I get the login mana fixed.
Edit: Sorry to be a pest tao, but how would you load from MySQL? I'm assuming it means loading the last recorded amount of mp the player had, to avoid people logging on and off to receive maxmana. But I have no clue how I'd go about that.
|
|
|
11/11/2008, 04:43
|
#41
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by Incariuz
Ya, change byte to ushort in the code I gave. For when we get to spells using more mana then 255 to avoid errors. And I just figured out the rest he said after I sent my message, lol. Had a blonde moment. But now I'm trying to find where to setup the mana on login. I'm guessing we also need to do something in the public void Revive script aswell for when we revive after death to avoid the error, but I'm not gonna mess with that till I get the login mana fixed.
Edit: Sorry to be a pest tao, but how would you load from MySQL? I'm assuming it means loading the last recorded amount of mp the player had, to avoid people logging on and off to receive maxmana. But I have no clue how I'd go about that.
|
Search the entire solution for your login message
It's Client.cs
Packet type 1010(DataPacket/GeneralData/0x3F2 whatever the fk you wanna call it)
Subcase 74 I beleive.
|
|
|
11/11/2008, 04:45
|
#42
|
elite*gold: 0
Join Date: Aug 2006
Posts: 93
Received Thanks: 9
|
I think I see what you are saying I will toy with it and cross my fingers =)
Thanks again all that are helping
|
|
|
11/11/2008, 04:53
|
#43
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Ok, client.cs it is. Wish me luck
|
|
|
11/11/2008, 04:57
|
#44
|
elite*gold: 0
Join Date: Aug 2006
Posts: 93
Received Thanks: 9
|
Ok I went to Case 74 and I added
Code:
MyChar.MaxMana();
SendPacket(General.MyPackets.Vital(MyChar.UID, 2, MyChar.MaxMP));
Still getting same problem (is this correct ?)
|
|
|
11/11/2008, 05:08
|
#45
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
I don't think it's case 74 we need to work with tbh. Not sure which case it is yet, still searching through. But when I jumped to case 74, I didnt see anything about hp, so I left it alone.
|
|
|
 |
|
Similar Threads
|
Pets mana recovering from Mana tunnel
02/23/2010 - Mabinogi - 28 Replies
So, Anybody have any idea how to start with this? It'd be one awesome thing to have pets recover Mana by mana tunnels.
You could sit there gathering herbs all day from your gnu or whatever pet:handsdown:
Golem unlimited range mod might be nice too.
Both very possible... IDAPRO+OllyDBG .dll edits maybe?
|
TROUBLE!!
01/27/2010 - Dekaron Private Server - 10 Replies
im having trouble with df start times, i made times all right and used search but it still didnt help...the problem is when i start the df in the db at 15:00 and then wait until 14:59 to 15:00 the event dosen't start and when i talk to the NPC it says something like "It is not time for the application period", any1 know why its doing that?
EDIT; df works ok when i use the gm command for it but not for the times...
|
trouble
06/20/2008 - Eudemons Online - 2 Replies
when i start my client for the private server its all black like the world biggest lag ever, but when i start the orginal eudemons there is no problem at all, can any1 help me out?????
|
All times are GMT +1. The time now is 10:52.
|
|