[Fixed]Weapon Master

07/29/2012 18:15 C#Storm#1
Hello, many people had the same problem as me, Weapon Master adds +20k attack every level.

And he keeps taking dbs even after you achieve the highest level, i tried to fix those things, i got help in the 1st problem.

I know it's very easy to fix, but i felt that it would be nice to share it on elitepvpers


This is the new Weapon Master code(if your weapon master doesn't have these problems don't use mine, it might not be compatible with your source)

Now you'll see this when you upgrade your items
[Only registered and activated users can see links. Click Here To Register...]
07/29/2012 18:31 diedwarrior#2
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;
                                                }
Use something like this instead of your huge code.
07/29/2012 18:35 I don't have a username#3
Stop hardcoding the ID and use a correct algorithm.
07/29/2012 20:22 _DreadNought_#4
Why so much work?

Custom source ftw.
PHP Code:
if (!item.HasParent())
{
         
Say("Item is fully upgraded");
         
Link("Okay"Options.End);
         
Finish();

07/29/2012 21:40 KraHen#5
@DreadNought : Shouldn`t the lowest level item be the root item and the higher ones childs instead of parents? Just asking.
07/29/2012 22:13 .Kinshi#6
Quote:
Originally Posted by KraHen View Post
@DreadNought : Shouldn`t the lowest level item be the root item and the higher ones childs instead of parents? Just asking.
Exactly what I was thinking haha.


No one use this, its complete and utter crap.
There's plenty of examples of better ways to code this in many public sources.
07/29/2012 22:40 _DreadNought_#7
Quote:
Originally Posted by KraHen View Post
@DreadNought : Shouldn`t the lowest level item be the root item and the higher ones childs instead of parents? Just asking.
Most probably, My logic was real life, Lower Level items as childs and higher level items as parents.