[Weapon Master] he's gonna fail at Maths!!

07/28/2012 20:46 C#Storm#1
[Only registered and activated users can see links. Click Here To Register...]

the first thing you can see is a blade with +100k attack, impossible, well this started with less than 8k, after upgrading it from 135 to 140, weapon master is adding +20k attack every level, i know this sucks.

Here's the weapon master's code, what's wrong with that jerk? i tried to understand, tried few fixes, and then figured out that i'm like him haha
07/28/2012 20:54 devilsmum#2
Why do you have client.UnloadItemStats(item, false); commented out? I'm pretty sure this removes the stats of the existing item. Therefor when you upgrade, your stats are being added together.
07/28/2012 21:05 diedwarrior#3
You just gotta decrease the old attack/defense etc of the old item, I had this problem before, its pretty easy to fix tho, so yeah.
07/28/2012 21:40 C#Storm#4
the attack (real attack) is back after the character relogs, i mean when you ypgrade the item, you get 200k attack, relog and you'll find it back to the real amount.
07/28/2012 22:40 shadowman123#5
Quote:
Originally Posted by C#Storm View Post
the attack (real attack) is back after the character relogs, i mean when you ypgrade the item, you get 200k attack, relog and you'll find it back to the real amount.
well you should Load all item information once there is a change in status in order to avoid bugs ,, or even load the item status
07/28/2012 22:46 C#Storm#6
i fixed it, thanks guys ^^
07/29/2012 04:05 InfamousNoone#7
nice hard coded item ids
07/29/2012 09:22 ChingChong23#8
worst code ever
07/29/2012 09:32 shadowman123#9
Quote:
Originally Posted by ChingChong23 View Post
worst code ever
well i noticed its coded in too much lines .. So y do u think its badly coded ( btw iam done with this Npc in better way)
07/29/2012 10:50 -impulse-#10
Quote:
Originally Posted by shadowman123 View Post
well i noticed its coded in too much lines .. So y do u think its badly coded ( btw iam done with this Npc in better way)
The npc handler for that specific npc was done and released with the first version of my source, so you didnt do it in a 'better way'. The fact that he hard-coded the ids, and that does not mean that 'if there are lots of code then the code is bad', means he probably doesn't have any idea of how things can be done faster and nicer.
07/29/2012 12:44 shadowman123#11
Quote:
Originally Posted by -impulse- View Post
The npc handler for that specific npc was done and released with the first version of my source, so you didnt do it in a 'better way'. The fact that he hard-coded the ids, and that does not mean that 'if there are lots of code then the code is bad', means he probably doesn't have any idea of how things can be done faster and nicer.
Perfect thats Right Thx Alot for that
07/29/2012 12:53 I don't have a username#12
Quote:
Originally Posted by -impulse- View Post
The npc handler for that specific npc was done and released with the first version of my source, so you didnt do it in a 'better way'. The fact that he hard-coded the ids, and that does not mean that 'if there are lots of code then the code is bad', means he probably doesn't have any idea of how things can be done faster and nicer.
Tho you can't disagree on that it's bad coded. It's pretty ineffecient.
07/29/2012 15:39 diedwarrior#13
Code:
   if (infos.BaseInformation.Level == PacketHandler.ItemMaxLevel(PacketHandler.ItemPosition(infos.BaseInformation.ID)))
                                                {
                                                    dialog.Text("This item is already at maximum level!");
                                                    dialog.Link("Alright", 255);
                                                    dialog.Avatar(50);
                                                    dialog.Send();
                                                    return;
                                                }
07/29/2012 20:26 _DreadNought_#14
Quote:
Originally Posted by -impulse- View Post
The npc handler for that specific npc was done and released with the first version of my source, so you didnt do it in a 'better way'. The fact that he hard-coded the ids, and that does not mean that 'if there are lots of code then the code is bad', means he probably doesn't have any idea of how things can be done faster and nicer.
Actually, The very first version of your source didn't have any npcs coded. :p
Quote:
Originally Posted by ChingChong23 View Post
worst code ever
That's a face I haven't seen in awhile.
07/29/2012 21:01 -impulse-#15
[QUOTE=_DreadNought_;17927756]Actually, The very first version of your source didn't have any npcs coded. :p/QUOTE]

Well, obviously the first didnt, but the 5165 I released a while ago, which is the base of Trinity's source, had npcs - that's the source I was talking about.