[SimpleRelease]RebornWeapons

02/20/2010 21:56 Arcо#1
Agh well it amazes me how simple this is and people continually ask for it so here it is.
Go to attack.cs and search for
Code:
if (Game.World.H_Mobs.Contains(GC.MyChar.Loc.Map))
Above it add this:
Code:
                        if (GC.MyChar.Equips.RightHand.Effect == NewestCOServer.Game.Item.RebornEffect.MP)//ManaBS
                        {
                            MyMath.ChanceSuccess(1000000);
                            GC.AddSend(Packets.String(GC.MyChar.EntityID, 10, "magicfull"));
                            GC.MyChar.CurMP += 310;
                        }
Code:
                        if (GC.MyChar.Equips.RightHand.Effect == NewestCOServer.Game.Item.RebornEffect.HP)//HpBS
                        {
                            MyMath.ChanceSuccess(1000000);
                            GC.AddSend(Packets.String(GC.MyChar.EntityID, 10, "magicfull"));
                            GC.MyChar.CurHP += 310;
                        }
Change the chancesuccess to whatever you feel is right.
will release others in a bit.
02/20/2010 22:10 koko425#2
nice arco can you make flower system
02/20/2010 22:48 ~Yuki~#3
Quote:
Originally Posted by koko425 View Post
nice arco can you make flower system
delete your post and send a PM ffs
02/20/2010 22:59 Arcо#4
And to get a effect weapon I will give you the base command for it.
Code:
if (Cmd[0] == "/rbweapon")
                        {
                            uint ID = 0;
                            foreach (DatabaseItem DI in Database.DatabaseItems.Values)
                                if (DI.Name == Cmd[1])
                                {
                                    ID = DI.ID;
                                    Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
                                    Game.Item.ItemQuality Quality = e.Quality;

                                    if (Cmd[2].ToLower() == "refined") Quality = Game.Item.ItemQuality.Refined;
                                    else if (Cmd[2].ToLower() == "unique") Quality = Game.Item.ItemQuality.Unique;
                                    else if (Cmd[2].ToLower() == "elite") Quality = Game.Item.ItemQuality.Elite;
                                    else if (Cmd[2].ToLower() == "super") Quality = Game.Item.ItemQuality.Super;
                                    else if (Cmd[2].ToLower() == "simple") Quality = Game.Item.ItemQuality.Simple;
                                    else if (Cmd[2].ToLower() == "fixed") Quality = Game.Item.ItemQuality.Fixed;
                                    else if (Cmd[2].ToLower() == "poor") Quality = Game.Item.ItemQuality.Poor;
                                    else if (Cmd[2].ToLower() == "normal") Quality = Game.Item.ItemQuality.Normal;
                                    if (e.Quality == Quality)
                                        break;
                                }
                            if (ID != 0 && GC.MyChar.Inventory.Count < 40)
                            {
                                Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
                                Game.Item.ItemQuality Quality = e.Quality;
                                bool change = true;
                                if (Cmd[2].ToLower() == "refined") Quality = Game.Item.ItemQuality.Refined;
                                else if (Cmd[2].ToLower() == "unique") Quality = Game.Item.ItemQuality.Unique;
                                else if (Cmd[2].ToLower() == "elite") Quality = Game.Item.ItemQuality.Elite;
                                else if (Cmd[2].ToLower() == "super") Quality = Game.Item.ItemQuality.Super;
                                else if (Cmd[2].ToLower() == "simple") Quality = Game.Item.ItemQuality.Simple;
                                else if (Cmd[2].ToLower() == "fixed") Quality = Game.Item.ItemQuality.Fixed;
                                else if (Cmd[2].ToLower() == "poor") Quality = Game.Item.ItemQuality.Poor;
                                else if (Cmd[2].ToLower() == "normal") Quality = Game.Item.ItemQuality.Normal;
                                else change = false;
                                if (change)
                                    e.QualityChange(Quality);
                                ID = e.ToID();
                                if (!Database.DatabaseItems.ContainsKey(ID))
                                {
                                    return;
                                }
                                Game.Item I = new NewestCOServer.Game.Item();
                                if (e.Part(0, 2) == 11 || e.Part(0, 2) == 13 || e.Part(0, 3) == 123 || e.Part(0, 3) == 141 || e.Part(0, 3) == 142)
                                    I.Color = NewestCOServer.Game.Item.ArmorColor.Orange;
                                //I.FreeItem = true;
                                I.ID = ID;
                                I.UID = (uint)Program.Rnd.Next(10000000);
                                try
                                {
                                    I.MaxDur = I.DBInfo.Durability;
                                    I.CurDur = I.MaxDur;
                                }
                                catch (Exception Exc) { Program.WriteLine(Exc); }
                                try
                                {
                                    I.Plus = byte.Parse(Cmd[3]);
                                }
                                catch { }
                                try
                                {
                                    I.Bless = byte.Parse(Cmd[4]);
                                }
                                catch { }
                                try
                                {
                                    I.Enchant = byte.Parse(Cmd[5]);
                                }
                                catch { }
                                try
                                {
                                    I.Soc1 = (Game.Item.Gem)byte.Parse(Cmd[6]);
                                }
                                catch { }
                                try
                                {
                                    I.Soc2 = (Game.Item.Gem)byte.Parse(Cmd[7]);
                                }
                                catch { }
                                I.Effect = [B]NewestCOServer.Game.Item.RebornEffect.None;[/B]

                                GC.MyChar.AddItem(I);
                            }
                        }
Change the effect to what you want it to be
02/20/2010 23:15 Decker_#5
What does this code do :S ??
02/20/2010 23:15 glover#6
Good job Arco, but we need to check RightHand not LeftHand Arco.
Taoist equip weapon on RightHand same in global conquer :D
ManaBS and HP bs must work on melee and range attack same is in global conquer.
This source do not save this effect status, after restart server you lose your hidden attribute.

Add this:
Code:
                        GC.MyChar.CurMP += 310;
                        if(GC.MyChar.CurMP > GC.MyChar.MaxMP)
                            GC.MyChar.CurMP = GC.MyChar.MaxMP;
02/20/2010 23:15 Arcо#7
Quote:
Originally Posted by Decker_ View Post
What does this code do :S ??
:facepalm:
Quote:
Originally Posted by glover View Post
Good job Arco, but we need to check RightHand not LeftHand Arco.
Taoist equip weapon on RightHand same in global conquer :D
Agh thanks, that's one thing I was wondering about.
02/20/2010 23:20 -Shunsui-#8
WOOF +KKKKKKKKK GOOD SHIT!
02/20/2010 23:27 NukingFuts#9
wooot nice
02/20/2010 23:28 -Shunsui-#10
Quote:
Originally Posted by Decker_ View Post
What does this code do :S ??
In the commad change this like to something like this
I.Effect = NewestCOServer.Game.Item.RebornEffect.None;

To

I.Effect = NewestCOServer.Game.Item.RebornEffect.MP;

And use that Command /rbweapon just like the regular Item Command, And at the end of the wepon your going to see it saying wat a mana bs would say at the end.
02/20/2010 23:31 glover#11
Arco i writen thread about add hidden attribute on item commant in chat.
[Only registered and activated users can see links. Click Here To Register...]
02/21/2010 00:16 ArtOfWar#12
Goodjob! This is very cool .Arco
02/21/2010 02:26 darkdestiny54#13
Quote:
Originally Posted by glover View Post
Arco i writen thread about add hidden attribute on item commant in chat.
[Only registered and activated users can see links. Click Here To Register...]
Well this is the problem... we have glover's release (above) and this new code from Arco. How can we connect them together so that it actually works? (and beyond that... how can we make it so the reborn NPC gives it out?

In my opinion, it shouldn't be in the item formation code. It really needs to be it's own entry in the items.txt file, that way it can be given out. Also, if we know the item codes and we put it in order, we can make it so that the hidden attribute code checks for the range of items that have it.
02/21/2010 05:16 salem rey#14
Can you make a poison blade? :D thanks in advance
02/21/2010 07:19 2087#15
It works well when you add glovers thread to the /item and paste Arco's Code for what each effect is doing in Attack.cs.