You last visited: Today at 18:01
Advertisement
[SimpleRelease]RebornWeapons
Discussion on [SimpleRelease]RebornWeapons within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
02/20/2010, 21:56
#1
elite*gold: 0
Join Date: Oct 2009
Posts: 8,791
Received Thanks: 5,310
[SimpleRelease]RebornWeapons
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
#2
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
nice arco can you make flower system
02/20/2010, 22:48
#3
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
Quote:
Originally Posted by
koko425
nice arco can you make flower system
delete your post and send a PM ffs
02/20/2010, 22:59
#4
elite*gold: 0
Join Date: Oct 2009
Posts: 8,791
Received Thanks: 5,310
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
#5
elite*gold: 0
Join Date: Feb 2010
Posts: 480
Received Thanks: 207
What does this code do :S ??
02/20/2010, 23:15
#6
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Good job Arco, but we need to check RightHand not LeftHand Arco.
Taoist equip weapon on RightHand same in global conquer
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
#7
elite*gold: 0
Join Date: Oct 2009
Posts: 8,791
Received Thanks: 5,310
Quote:
Originally Posted by
Decker_
What does this code do :S ??
Quote:
Originally Posted by
glover
Good job Arco, but we need to check RightHand not LeftHand Arco.
Taoist equip weapon on RightHand same in global conquer
Agh thanks, that's one thing I was wondering about.
02/20/2010, 23:20
#8
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
WOOF +KKKKKKKKK GOOD ****!
02/20/2010, 23:27
#9
elite*gold: 0
Join Date: May 2009
Posts: 480
Received Thanks: 112
wooot nice
02/20/2010, 23:28
#10
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
Quote:
Originally Posted by
Decker_
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
#11
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Arco i writen thread about add hidden attribute on item commant in chat.
02/21/2010, 00:16
#12
elite*gold: 40
Join Date: Feb 2010
Posts: 78
Received Thanks: 17
Goodjob! This is very cool .Arco
02/21/2010, 02:26
#13
elite*gold: 0
Join Date: Jul 2009
Posts: 91
Received Thanks: 28
Quote:
Originally Posted by
glover
Arco i writen thread about add hidden attribute on item commant in chat.
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
#14
elite*gold: 0
Join Date: Apr 2008
Posts: 275
Received Thanks: 43
Can you make a poison blade?
thanks in advance
02/21/2010, 07:19
#15
elite*gold: 0
Join Date: Sep 2008
Posts: 39
Received Thanks: 0
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.
Similar Threads
[SimpleRelease]NobilityChief
07/28/2010 - CO2 PServer Guides & Releases - 8 Replies
I got no serious idea, if this is released or not.
But I thought I would release it for fun lol.
#region NobilityChief
case 338547:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("So you want to upgrade your nobility fast?. Well I can charge CPs to increas it."));
...
All times are GMT +1. The time now is 18:01 .