Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 02:33

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

Advertisement



Purification coding for refinery

Discussion on Purification coding for refinery within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
Purification coding for refinery

i have proplem in appling purification i have coded but didnt work
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Hellmouth
{
public partial class Handler
{
public static void Refinery(byte[] Packet, Client Client)
{
uint MainUID = BitConverter.ToUInt32(Packet, 8),//Gets MainItem UID
MinorUID = BitConverter.ToUInt32(Packet, 12);//Gets Contribution UID
Struct.ItemInfo MainItem = Client.InventoryItem(MainUID),//Retrieves iteminfo from Client of MainUID
MinorItem = Client.InventoryItem(MinorUID);//Retrieves iteminfo from Client of MinorUID
ushort Points = 0;
switch (MinorItem.Refinery.Type)//Converts the MinorItems plus value into composition points
{
case 1: Points = 312; break;
case 2: Points = 301; break;
case 3: Points = 302; break;
case 4: Points = 304; break;
case 5: Points = 308; break;
}
Client.RemoveInventory(MinorUID);//Removes Contribution
if (Points > 0 && MainItem.Refinery.Type < 5)
{
MainItem.Refinery.Type += Points;
while (MainItem.Refinery.Type >= GettypeReq(MainItem.Refinery.Type))
{
// MainItem.Composition -= GettypeReq(MainItem.Plus);
MainItem.Refinery.Type++;
}
Client.Inventory[MainItem.UID] = MainItem;
Database.UpdateItem(MainItem.UID, (ushort)MainItem.Refinery.Type, "RefineryType");
Database.UpdateItem(MainItem.UID, (byte)MainItem.Refinery.Level, "RefineryLevel");
Database.UpdateItem(MainItem.UID, (byte)MainItem.Refinery.Effect, "RefineryEffects");
Database.UpdateItem(MainItem.UID, (int)MainItem.Refinery.Expires, "RefineryExpires");
Client.Send(Packets.ItemInfo(MainItem, 3));
Packets.Send(Packets.RefineryInfo(MainItem, false), Client);
}
}
private static uint GettypeReq(int p)
{
switch (p)
{
case 312:
{
return 8;
}
case 310:
{
return 8;
}
case 308:
{
return 8;
}
default:
{
return 0;
}
}
}
}
}
koko425 is offline  
Old 03/17/2011, 19:58   #2
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
does any one know
koko425 is offline  
Old 03/17/2011, 21:12   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Why are you trying to use composition code for refinery?....

What exactly is it you're trying to do here.

My main concern would be that the minor item DOES NOT have a refinery type.

Refinery type = the effect of it.. by ++ing it you are changing what the effect is in itself (penetration vs say... crit strike).

Never having used the real system, how is purification supposed to work? It raises the level/effect of the applied refinery item? or is it the one that makes the bonus permanent?

It shouldn't be very complicated to code but you'll need to go into much more detail as to what you're trying to do, where it's going wrong, etc.
pro4never is offline  
Old 03/17/2011, 23:18   #4
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
Quote:
Originally Posted by pro4never View Post
Why are you trying to use composition code for refinery?....

What exactly is it you're trying to do here.

My main concern would be that the minor item DOES NOT have a refinery type.

Refinery type = the effect of it.. by ++ing it you are changing what the effect is in itself (penetration vs say... crit strike).

Never having used the real system, how is purification supposed to work? It raises the level/effect of the applied refinery item? or is it the one that makes the bonus permanent?

It shouldn't be very complicated to code but you'll need to go into much more detail as to what you're trying to do, where it's going wrong, etc.
so give me example to start
koko425 is offline  
Old 03/17/2011, 23:23   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Ummm you're the one trying to code the system. Explain how the system is supposed to work/how you want it to work and then I can offer suggestions from there.

I have no idea what this code is even trying to do cause it appears there is NOTHING correct about it.
pro4never is offline  
Old 03/17/2011, 23:42   #6

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Well since he called it the purification system, I'm pretty sure it's the system where you make the temporary refinery permanent. I'd read the info about the new systems if I were you, might help when you try to code features.
Kiyono is offline  
Old 03/18/2011, 04:52   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
I have no intention of ever allowing them to be made permanent. My point was more that the code he posted had absolutely NOTHING to do with what he was trying to do (I did assume it had to do with using permanent stones but yet he's talking about things completely unrelated to it)
pro4never is offline  
Old 03/18/2011, 15:53   #8
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
i will explain what is system doing

1st there is 2 things of refinery
1-refine item with dragonsoul iteams like phase 1 2 3 4 5 6 === item+dragonsoulitem+some meteors == refineditem with dragonsoul like hammer phase 6
2refine item with refinery iteams like crictikal strike m-defense breakthrou ==== item+refinery item by click right and chose item to refined



2nd you can permanent iteams with stons to get it unlimited not waited 7 days to finish

mmm i will explain more
control type ArtifactPurification doing refinery item with dragon soul
control type RefineryStabalizer doing permanent items thoes refined by refinery iteams
controltype ArtifactStabilization doing permanent items thoes refined by dragonsoul itemas

thats all
we wish you code appling system of refinery
koko425 is offline  
Old 03/18/2011, 16:42   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
So all you need to do is code a variable into items (database, item structure and then the item save/loading) to hold purification points. Make a simple method to like... "GetPurificationPoints(Item);} to return the amount of points gained by using a minor item on main item (the permanent stones).

Once you do that just make an npc that opens up the purification window and accepts main item/minor stones (iirc the box holds lots of them). Now log the packet that the client sends to the server and structure it (it's most likely SUPER simple, something like uint Main ItemUID, byte/ushort/uint Count, foreach minorItem Uint UID)

Now just check the minor items for how many points they add, how many main item has and then allow it to make it permanent (IE: 0 expire time)

But yah... what you have there has no relation to what you want to do because you're modifying the wrong things, using values that have nothing to do with purification and not ever assigning a new variable for purification points... as such it makes things a bit difficult (but yes, looks like you have the pts to purify done correctly... just that you're using strange values that don't really apply)
pro4never is offline  
Reply


Similar Threads Similar Threads
Bug # 668 - Purification Pill bug -
02/13/2012 - Silkroad Online - 4 Replies
YouTube - Bugroad Bug N 668 Note : is no a random number , all info u can find in Bug database the bugs fixed continue in database , the number is the order when find the bug The video bugs are approved by Joymax , approved ? how? Joymax acept investigate it with the video and instructions sended on Contact Support/Bug report Joymax dont investigate the bug when think no exist problem
Coding Purification
03/10/2011 - CO2 Private Server - 3 Replies
Well, I'm in a doubt how to code the artifacts. First of all, I Don't know If It's coded in p4n's source or anyone else's and I'm not going to take example from there since I've no idea how purification works and I wanna do it by myself, by my way The Questions are, How is the system going? What it does to the item , what new function the items have, what type of packet purification uses? Thanks in advance, Stefan
Refinery Item Giveaway on Dark!
02/26/2011 - Conquer Online 2 - 0 Replies
Hello everybody. On Dark server I'll be giving away a shit ton of refinery items. http://origin.screensnapr.com/images/HlneVg.png Send a whisper to TheLastTsar asking for what you want.
Jade Dynasty/Zhu Xian/Celestial Destroyer Refinery Bot?
09/07/2010 - Foreign Games - 3 Replies
Is there a refine bot for this? Something that shows refine rate? Btw im no noob at the game, a T4 ascend already, so i know enough about the game. Just curious if there is a way to make the game a little easier :) ive tried that wanmei168.com or w.e, doesnt work for me, sites broken.
Refinery glitch?
12/29/2008 - Archlord - 15 Replies
I have heard several people talking about a 'refinery glitch', making you able to dupe elemental stones or something. Also, I have recently seen alot of level 1 toons running from the Safe Keeper to the refinery. So I assume they are all using this glitch. Does anyone know what this glitch exactly does? And how to glitch it? Thanks in advance!



All times are GMT +1. The time now is 02:33.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.