Register for your free account! | Forgot your password?

You last visited: Today at 05:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Library]ItemCore

Discussion on [Library]ItemCore within the EO PServer Guides & Releases forum part of the EO PServer Hosting category.

Reply
 
Old   #1
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
[Library]ItemCore

I've now included some documentation for using this library. Enjoy guys and I'll update this as the DLL is updated

Use the links below to get details on each class available in the ItemCore.dll, only public fields/properties/methods/constructors etc etc are available.
Links to each datatype/class mentioned in the return types are also link to their own documentation.





Classes:


FileReader
Back To Top

Inheritance Hierarchy
  • ItemCore.FileReader

NameSpace: ItemCore

Class Deffinition:

public class FileReader : BinaryReader

Constructors
Name
Description
FileReader(Stream input)Creates a new FileReader using an existing Stream. On a supplied stream using

Methods
Return Type
Name
Description
ItemtypeReadItemtype()Reads a block of Itemtype data from the current stream and advances the current position of the stream by the size of the itemtype data.
ItemDataReadItemData()Reads a block of ItemData from the current stream and advances the current position by 244 bytes.



FileWriter
Back To Top

Inheritance Hierarchy
  • ItemCore.FileWriter

NameSpace: ItemCore

Class Deffinition:

public class FileWriter : BinaryWriter

Constructors
Name
Description
FileWriter(Stream output)Creates a new FileWriter using an existing Stream. On a supplied stream using

Methods
Return Type
Name
Description
Write(Itemtype)Writes a block of Itemtype data to the current stream and advances the current position of the stream by the size of the itemtype data.
Write(ItemData)Writes a block of ItemData to the current stream and advances the current position by 244 bytes.



Frame
Back To Top

Inheritance Hierarchy
  • ItemCore.Frame

NameSpace: ItemCore

Class Deffinition:

public class Frame

Constructors
Name
Description
Frame()Creates a frame without a file name.
Frame(string fileName)Creates a frame with the specified file name.

Methods
Return Type
Name
Description
ToString()Gets the String representation of the Frame. Can be used to get the string form saved in an INI file.

Properties
Return Type
Name
Description
FileNameGets or Sets the File Name of the Frame.
FileExistsChecks if the File of the Frame exists.



Icon
Back To Top

Inheritance Hierarchy
  • ItemCore.Icon

NameSpace: ItemCore

Class Deffinition:

public class Icon

Constructors
Name
Description
Icon()Creates a new Icon with an empty Frame set.
Icon(Frame[] frames)Creates a new Icon with an array of Frames.

Methods
Return Type
Name
Description
InsertFrame(Frame frame, int index)Inserts a new frame at the given index and push the rest forward.
ReplaceFrame(Frame frame, int index)Replace the Frame at the given Index.
AddNewFrame(Frame frame)Add a new Frame at the end of the frame set.
ToString()Gets the String representation of the Frame. Can be used to get the string form saved in an INI file.

Properties
Return Type
Name
Description
<FrameFramesGets a list of all the Frames for the Icon.
Frame[int frameIndex]Gets or Sets the frame based on the frameIndex. Use the index of a new frame to add a new frame (must be equal to Count).
FrameCurrentFrameGets the Current Frame for the Icon.
FrameNextFrameGets the Next Frame for the Icon.



ItemData
Back To Top

Inheritance Hierarchy
  • ItemCore.ItemData

NameSpace: ItemCore

Class Deffinition:

public class ItemData

Constructors
Name
Description
ItemData()Creates a new instance of ItemData, ID = 0 Name = Blank, all other values = default.
ItemData(uint id, string name)Basic Constructor. Sets all default values and uses an assigned ID/Name of the new Item.
ItemData(
uint id,
uint price,
uint id_action,
uint monster_type,
uint emoney,
uint soul_value,
int mana,
string name,
string description,
bool ident,
byte req_profession,
byte level,
byte req_level,
byte req_sex,
byte monopoly,
byte gem1,
byte gem2,
byte magic1,
byte magic2,
byte magic3,
byte able_mask,
byte exp_type,
ushort official1,
ushort official2,
ushort official3,
ushort official4,
ushort official5,
ushort official6,
ushort official7,
ushort official8,
ushort official9,
ushort official10,
ushort official11,
ushort official12,
ushort req_force,
ushort req_dex,
ushort req_health,
ushort req_soul,
ushort weight,
ushort attack_max,
ushort attack_min,
ushort magic_atk_min,
ushort amount,
ushort amount_limit,
ushort magic_atk_max,
ushort magic_def,
ushort atk_range,
ushort atk_speed,
ushort hitrate,
ushort target,
ushort defense,
short life,
short dodge)
Creates new item data based on all the passed fields.
ItemData(ItemData baseItem)Creates a new instance of ItemData using an existing item data object. (used for cloning)

Methods
Return Type
Name
Description
ToString()Gets a string representation of the ItemData. Format = "ID Name"

Properties
Return Type
Name
Description
IDGets or Sets the ID of the Item.
NameGets or Sets the Name of the Item.
RequiredProfessionGets or Sets the Required Profession of the Item.
LevelGets or Sets the Level of the Item.
RequiredLevelGets or Sets the Required Level of the Item.
RequiredSexGets or Sets the Required Sex of the Item.
RequiredForceGets or Sets the Required Force of the Item.
RequiredDexterityGets or Sets the Required Dexterity of the Item.
RequiredHealthGets or Sets the Required Health of the Item.
RequiredSoulGets or Sets the Required Soul of the Item.
MonopolyGets or Sets the Monopoly of the Item.
WeightGets or Sets the Weight of the Item.
GoldPriceGets or Sets the Gold Price of the Item.
ActionIDGets or Sets the Action ID of the Item.
PhysicalAttackMaxGets or Sets the Maximum Physical Attack of the Item.
PhysicalAttackMinGets or Sets the Minimum Physical Attack of the Item.
PhysicalDefenceGets or Sets the Physical Defence of the Item.
MagicalAttackMinGets or Sets the Minimum Physical Attack of the Item.
DodgeGets or Sets the Dodge of the Item.
LifeGets or Sets the Life of the Item.
ManaGets or Sets the Mana of the Item.
AmountGets or Sets the Minimum Amount of the Item.
AmountLimitGets or Sets the Maximum Amount of the Item.
IdentifiedGets or Sets the Identified state of the Item.
GemOneGets or Sets the Gem One value of the Item.
GemTwoGets or Sets the Gem Two value of the Item.
MagicOneGets or Sets the Magic One value of the Item.
MagicTwoGets or Sets the Magic Two value of the Item.
MagicThreeGets or Sets the Magic Three value of the Item.
MagicalAttackMaxGets or Sets the Maximum Magical Attack of the Item.
MagicalDefenceGets or Sets the Magical Defence of the Item.
AttackRangeGets or Sets the Attack Range of the Item.
AttackSpeedGets or Sets the Attack Speed of the Item.
HitrateGets or Sets the Hitrate of the Item.
MonsterTypeGets or Sets the Monster Type of the Item.
TargetGets or Sets the Target of the Item.
AbleMaskGets or Sets the Able Mask of the Item
ExperienceTypeGets or Sets the Experience Type of the Item.
EPCostGets or Sets the EP Cost of the Item.
KnightOneGets or Sets the Knight One value of the Item.
KnightTwoGets or Sets the Knight Two value of the Item.
KnightThreeGets or Sets the Knight Three value of the Item.
KnightFourGets or Sets the Knight Four value of the Item.
KnightFiveGets or Sets the Knight Five value of the Item.
KnightSixGets or Sets the Knight Six value of the Item.
KnightSevenGets or Sets the Knight Seven value of the Item.
KnightEightGets or Sets the Knight Eight value of the Item.
KnightNineGets or Sets the Knight Nine value of the Item.
KnightTenGets or Sets the Knight Ten value of the Item.
KnightElevenGets or Sets the Knight Eleven value of the Item.
KnightTwelveGets or Sets the Knight Twelve value of the Item.
SoulValueGets or Sets the Soul Value of the Item.
DescriptionGets or Sets the Description of the Item.

Constants
Type & Value
Name
Description
16NAMESTRINGSIZESize of the Name block within the ItemData.
128DESCRIPTIONSTRINGSIZESize of the Description block within the ItemData.



ItemMinIcon
Back To Top

Inheritance Hierarchy
  • ItemCore.ItemMinIcon

NameSpace: ItemCore

Class Deffinition:

public class ItemMinIcon

Constructors
Name
Description
ItemMinIcon()Sets up a blank Item Min Icon object.
ItemMinIcon(Icon defaultIcon)Sets up an Item Min Icon object with a default Icon.
ItemMinIcon( fileName)Loads an Item Min Icon object from a file.

Properties
Return Type
Name
Description
IconDefaultGets or Sets the Default Icon for the Itemtype. Used when an Icon's file is not found.
Icon[uint id]Gets or Sets the Icon given the ID.
CountGets the Count of Icons found in the Item Min Icon, the default icon is not counted.



Itemtype
Back To Top

Inheritance Hierarchy
  • ItemCore.ItemType

NameSpace: ItemCore

Class Deffinition:

public class Itemtype

Constructors
Name
Description
Itemtype()Creates a blank instance of an Itemtype object.

Properties
Return Type
Name
Description
<>IDListGets a list of all the IDs found in the Itemtype.
ItemData[uint id]Gets or Sets Item Data for the Itemtype given the ID of the Item. Suggest using "UpdateItem" method when changing data, "AddNewItem" when adding data and "DeleteItem" when removing data.
<, ItemData>ItemsGets a collection of items within the Itemtype.
Attached Files
File Type: rar ItemCore.rar (7.9 KB, 82 views)
File Type: rar ItemCore(New).rar (14.0 KB, 136 views)
funhacker is offline  
Thanks
11 Users
Old 06/04/2012, 18:45   #2
 
zombaxcrop's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 142
Received Thanks: 76
Thank you
zombaxcrop is offline  
Old 06/05/2012, 13:20   #3
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
Included documentation for the following:


Classes:
funhacker is offline  
Old 06/06/2012, 11:07   #4
 
javairc's Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 559
Received Thanks: 183
very nice funhacker.. thx for this..
javairc is offline  
Old 06/06/2012, 16:44   #5
 
funhacker's Avatar
 
elite*gold: 20
Join Date: Sep 2007
Posts: 1,767
Received Thanks: 1,741
Quote:
Originally Posted by javairc View Post
very nice funhacker.. thx for this..
You're welcome


Here's a bit of a code snippet for those that need a little helping nudge in using this:


Loading the itemtype into memory:
Code:
//Declare variables
FileReader fileReader;
Itemtype itemtype;

//Setup the fileReader
fileReader = new FileReader(new FileStream("itemtype.dat",FileMode.Open,FileAccess.Read));

//Load the itemtype
itemtype = fileReader.ReadItemtype();

//Close the itemtype file
fileReader.Close();
Displaying all the items in a list box (named "lbItems")
Code:
//Clear the list box
lbItems.Items.Clear();

//Add all the items
lbItems.Items.AddRange(itemtype.Items.Values.ToArray());

Enjoy!
funhacker is offline  
Old 02/23/2016, 20:41   #6
 
Khalidmadkour's Avatar
 
elite*gold: 0
Join Date: Jan 2014
Posts: 184
Received Thanks: 106
Exclamation

Quote:
Originally Posted by funhacker View Post
You're welcome


Here's a bit of a code snippet for those that need a little helping nudge in using this:


Loading the itemtype into memory:
Code:
//Declare variables
FileReader fileReader;
Itemtype itemtype;

//Setup the fileReader
fileReader = new FileReader(new FileStream("itemtype.dat",FileMode.Open,FileAccess.Read));

//Load the itemtype
itemtype = fileReader.ReadItemtype();

//Close the itemtype file
fileReader.Close();
Displaying all the items in a list box (named "lbItems")
Code:
//Clear the list box
lbItems.Items.Clear();

//Add all the items
lbItems.Items.AddRange(itemtype.Items.Values.ToArray());

Enjoy!

If anyone still here Can you help ?

I tried to use this code
FileReader fileReader; << depend on itemcore so I have to import it first
Itemtype itemtype; << what I have to import to use this ?
my error when I try to dim itemtype as itemtype is " type itemtype is not defined "
Khalidmadkour is offline  
Reply


Similar Threads Similar Threads
CO2_CORE_DLL (C# Library)
07/08/2014 - CO2 PServer Guides & Releases - 32 Replies
I decided to implement a big part of my knowledge in a library. At the start, I wanted to make a C library, but as mostly all the server use C# and because I don't want to work too much on it, I decided to make it in C#. The library is constructed like the .net framework. Often, you'll just have to change System to CO2_CORE_DLL to get some similar class/goal. The library is based on the version 5017 of CO2, but it may work on older or newer client. It also use a lot of pointer, but there...
MSDN Library
01/17/2011 - Flyff Private Server - 4 Replies
Also gut, da ich die Src nicht mehr compiled bekomme, warum auch immer wollt ich fragen ob es wichtig ist das die MSDN Library mitinstalliert worden ist, da ich es bei meiner jetztigen Version nicht hinbekomme diese zu installieren. Permanent kommt die Meldung, Insert Disc 1 ^^ Darum wollt ich fragen ob die Library wichtig sei, und wenn ja ob man diese auch manuell installieren kann. Mfg
[How to] ADD Library to C++ 2010
11/20/2010 - WarRock - 3 Replies
I am Sorry for Spam :( ... __ QUESTION: How to ADD Library(Direction) Direct Summer 2004 to Visual C++ 2010 ? Please :(
Library Files ?
08/06/2008 - Silkroad Online - 2 Replies
Hi, I bought me a new pc and I want to install agbot but the link to the library files on rev6 is dead ? Does anybody have a other link ? I couldn't find it :( thx
.NET 2.0/c# - CO2 Proxy Library
08/12/2006 - CO2 Exploits, Hacks & Tools - 29 Replies
Hi, As I spent a good days work writing this, and I got a lot of help from reading through posts from this forum to get it going I feel I should contribute something back! Maybe some of you could help me expand this code by sharing some your knowledge of the structure of the packets. I will cover the following in this post: 1) What this code does, and how to use it 2) What I know about different packets types (and what I'm assuming, I may be wrong!) 3) What I want to know! If anyone...



All times are GMT +2. The time now is 05:13.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.