Register for your free account! | Forgot your password?

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

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

Advertisement



[Help] 5017 Questions.

Discussion on [Help] 5017 Questions. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
[Help] 5017 Questions.

okay so I'm going oldstyle now. back to my 5017 source I had been working on for almost a year.

I'm getting a few problems with the personal shops in the market. I would like some information on how can I show them once the player clicks "Yes" on the dialog, the actual dialog itself when clicked on the player carpet, and the implementation of items with Silvers/CPs, also the taking of away of items once the player clicks "Remove".

I also want to know why the Stylist (a.k.a. face changer) NPC in Twin City doesn't change your face and does not deduce silvers from the char.'s inventory. I would also like some professional advice for this as I have been working with newer sources lately (as you can see) and have not been working with this one in such a long time but would like to see what I can do for it.

Also, items aren't spawning, like when I buy an item it doesn't show in my inventory/it says its added it but it doesn't show up.

And one more thing, FB/SS doesn't seem to show up when I click the skill, come to think of it I've tried a lot of skills and they aren't seem to be working even though they might be coded in the source.

As long as I get "Something" as to why this is happening I'll be satisfied.

The base is from CoFuture, btw.
killersub is offline  
Old 10/12/2011, 13:10   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,381
I seem to remember cofuture being a rather **** base but can't really comment on it without having used it before.

Sounds to me like you're just dealing with features not being coded.

Market gets overhyped by people about how much work it is to code... it's REALLLLYYY simple once you realize how it works.

When you click the flag (There's a flag mesh as well as a npc subtype for shop flags!) and the user clicks ok they should walk to the location and send you a packet subtype requesting to vend (I think it was gendat subtype). You then calculate which npc they used, check if someone is vending there (requires a TINY rework of your npc system to determine if "isVending" based on the npc flag AND a source controlled variable for redundancy checks).

Assuming the shop is not in use you simply...

1: Set the npc to vending
2: Set the shop flag to market stall type vs market flag type (so no one else can get the "want to vend?" msg)
3: Add the carpet mesh with I think it was... +1 -1 offset from flag? I forget but easy to find from other sources. Make sure you give this mesh a UID that makes sense for easy removal!
4: Set up playerShop class/struct to hold any items being sold, keep track of the flag uid and carpet uid.

Now you need to handle all the other subtypes which... once you look at them are REALLY simple to do (View shop... see if they are vending, pull items from their shop if they exist and display to user!... Buy item? Check if item exists in shop and then remove from shop, add to new user, transfer currency... Even simpler then coding trade system!)


Stylist is a general data subtype which just sends the face mesh. Use some integer math to calculate the new mesh, send the mesh update subtype (there may be a face update subtype, I forget) and then save to database. DONE

Items spawning I'd just check over and possibly re-write your shop code.
pro4never is offline  
Old 10/12/2011, 13:11   #3


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Anything written on top of cofuture could very well have issues as it was the first source i ever wrote and itself is heavily based upon coemu.

Your likely having issues with the packets, be that their layout or construction.
Korvacs is offline  
Old 10/12/2011, 22:59   #4
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by pro4never View Post
I seem to remember cofuture being a rather crap base but can't really comment on it without having used it before.

Sounds to me like you're just dealing with features not being coded.

Market gets overhyped by people about how much work it is to code... it's REALLLLYYY simple once you realize how it works.

When you click the flag (There's a flag mesh as well as a npc subtype for shop flags!) and the user clicks ok they should walk to the location and send you a packet subtype requesting to vend (I think it was gendat subtype). You then calculate which npc they used, check if someone is vending there (requires a TINY rework of your npc system to determine if "isVending" based on the npc flag AND a source controlled variable for redundancy checks).

Assuming the shop is not in use you simply...

1: Set the npc to vending
2: Set the shop flag to market stall type vs market flag type (so no one else can get the "want to vend?" msg)
3: Add the carpet mesh with I think it was... +1 -1 offset from flag? I forget but easy to find from other sources. Make sure you give this mesh a UID that makes sense for easy removal!
4: Set up playerShop class/struct to hold any items being sold, keep track of the flag uid and carpet uid.

Now you need to handle all the other subtypes which... once you look at them are REALLY simple to do (View shop... see if they are vending, pull items from their shop if they exist and display to user!... Buy item? Check if item exists in shop and then remove from shop, add to new user, transfer currency... Even simpler then coding trade system!)


Stylist is a general data subtype which just sends the face mesh. Use some integer math to calculate the new mesh, send the mesh update subtype (there may be a face update subtype, I forget) and then save to database. DONE

Items spawning I'd just check over and possibly re-write your shop code.
Features ARE coded in the source, I checked.

ScentSword Calculations:
Code:
public class ScentSword
    {
        public ScentSword(int Target, int SkillID, int X, int Y, ref Connection Con)
        {
            Characters Character = Con.Client.Character;
            int CX = Character.PosX;
            int CY = Character.PosY;

            Target D = new Target();

            ArrayList MonstersInMap = MapsClass.MapContents(Character.Map, ObjectType.Monster);
            ArrayList PlayersInMap = MapsClass.MapContents(Character.Map, ObjectType.Player);
            ArrayList Target2 = new ArrayList();

            if (!Character.Skills.ContainsKey(SkillID))
                return;

            Skill TheSkill = Character.Skills[SkillID];

            int n = 0;

            if (Character.Stamina < 10)
                return;

            HeadHandler.DoGemEffect(Character);

            Character.Stamina -= 10;
            Con.Send(UpdatePacket.Character((uint)Character.PlayerID, UpdateChar.Stamina, (uint)Character.Stamina));

            while ((CX != X || CY != Y) && n < 10)
            {
                int NewX = (X) - CX;
                if (NewX >= 1) { NewX = 1; }
                else if (NewX < 0) { NewX = -1; }
                int NewY = (Y) - CY;
                if (NewY >= 1) { NewY = 1; }
                else if (NewY < 0) { NewY = -1; }

                CX += NewX;
                CY += NewY;

                for (int i = 0; i < MonstersInMap.Count; i++)
                {
                    Monster TheMonster = (Monster)MonstersInMap[i];

                    if (TheMonster.X == CX && TheMonster.Y == CY)
                    {
                        D = new Target();

                        D.ID = TheMonster.MonsterID;
                        D.Damage = Math.Max(1, RandomController.RandomGen.Next(Character.MinAttack, Character.MaxAttack) * (Character.Level - TheMonster.Level));

                        TheMonster.Death(Character.PlayerID, 300);

                        Target2.Add(D);
                    }
                }

                if (Character.PKState == PKMode.PK)
                {

                    for (int i = 0; i < PlayersInMap.Count; i++)
                    {
                        Connection CON = (Connection)PlayersInMap[i];

                        if (Database.MapInfo.ContainsKey(Character.Map))
                            if (Database.MapInfo[Character.Map].PKAllowed == false)
                            {
                                Con.SystemChat("PK is forbidden here.", ChatType.Top, 0xFF0000);
                                return;
                            }

                        if (CON.Client.Character.PosX == CX && CON.Client.Character.PosY == CY)
                        {
                            D = new Target();

                            D.ID = CON.Client.Character.PlayerID;

                            if (CON.Client.Character.HP > 0)
                            {
                                int Damage = RandomController.RandomGen.Next(Character.MinAttack, Character.MaxAttack);
                                Damage += (Damage * TheSkill.SkillLevel) / 2;
                                Damage += (Character.Level - CON.Client.Character.Level) * 20;
                                Damage -= CON.Client.Character.Defense;

                                Damage = Math.Max(1, Damage);

                                D.Damage = Damage;

                                if (CON.Client.Character.HP <= Damage)
                                {
                                    CON.Client.Character.HP = 0;
                                    CON.Client.Character.Death(Character.PlayerID, 300, ref CON);

                                    if (!CON.Client.Character.IsBlue())
                                    {
                                        Character.BlueColor(true);
                                        Character.PKPoints += 10;
                                        Con.Send(UpdatePacket.Character((uint)Character.PlayerID, UpdateChar.PKP, (uint)Character.PKPoints));
                                    }
                                }
                                else
                                {
                                    CON.Client.Character.HP -= Damage;
                                }

                                CON.Send(RefreshHP.Packet(CON.Client.Character.PlayerID, CON.Client.Character.HP));

                                Target2.Add(D);
                            }
                        }
                    }
                }
                n++;
            }
            HeadHandler.SendVisibilityfield(AttackSkillList.Packet(Character.PlayerID, SkillID, TheSkill.SkillLevel, X, Y, Target2), Character);
        }
    }
FastBlade Calculations:

Uses the same code as above.

I understand the subtype for the vending in the market, but still I'm a bit puzzled about the items taking a LONG time to load on the server once bough/spawned.

Quote:
Originally Posted by Korvacs View Post
Anything written on top of cofuture could very well have issues as it was the first source i ever wrote and itself is heavily based upon coemu.

Your likely having issues with the packets, be that their layout or construction.
what 5017 source would you recommend, then?
killersub is offline  
Old 10/12/2011, 23:25   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
I would recommend you write your own using others as references.
Korvacs is offline  
Thanks
1 User
Old 10/13/2011, 03:18   #6
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by Korvacs View Post
I would recommend you write your own using others as references.
I accidentally posted the wrong source LOL.

I still have 1 question though, whenever my character walks up to the flag to start vending it sends him to the side and says: "You must pick a valid spot for vending!"

Any ideas?
killersub is offline  
Old 10/13/2011, 03:52   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,381
two possibilities...

#1: not flagging it as market in the map info packet (shouldn't matter but possible client doesn't like it if not)

#2: Source isn't calculating flag/vending positions properly (easy to do... just search for that message to see if the problem is source side)
pro4never is offline  
Thanks
1 User
Old 10/14/2011, 02:23   #8
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by pro4never View Post
two possibilities...

#1: not flagging it as market in the map info packet (shouldn't matter but possible client doesn't like it if not)

#2: Source isn't calculating flag/vending positions properly (easy to do... just search for that message to see if the problem is source side)
I tried to check where the source gives off the error, but it doesn't find that line in the source somehow.

by the way, how can I make checks so that any character in the market can't use any of their skills?
killersub is offline  
Reply


Similar Threads Similar Threads
Questions About 5017 Lotf
03/05/2011 - CO2 Private Server - 7 Replies
Lets start off with saying, I know this is an old source people think its completely stupid now and people will probably start talking crap cause i'm using it and tell me to use another source. This is just a source i'm wanting to use to mess around with. So lets get started with questions: How much people can it hold? What is wrong with the source? What does the source need implemented? What additional things should I implement? If there is anything I should know please tell me....
[HELP]5017 questions!
08/10/2010 - CO2 Private Server - 8 Replies
Ok, so I am getting better at coding now so I started at 5017 instead of 5165 like I originally planned. My question is (and if there is already a guide on how to do this please link it to me, I've been looking everywhere and can't seem to find one) how do I upgrade my 5017 source to a newer update so I can actually play. Because my CIDLoader type client keeps getting man handled by my Norton 360. Keeps giving that False Positive Trojan virus, any help will be awesome! Thanks Zac
[Questions] Serious 5017 Project
07/06/2010 - CO2 Private Server - 11 Replies
#Close Thread
[RELEASE]Big Project..5095,5065,5017,5017 (command Server)
10/01/2009 - CO2 PServer Guides & Releases - 23 Replies
Hi, Yes i made a big project with my self by my self i host i edit i control i code. The Project contain 3 Co plvling Servers and 1 Command server the plvling servers are Snow Server and Treasure island . snow server works with 5065 client and it have alot of edits , adds , well i have made 135 gears and you can upgrade it in market from De La Vega for 250k CPS for each item also you should get 1 blessing amulet to make dmg -1 and you can get it by killing 1000 Birdman or 1000 Snake man or...



All times are GMT +1. The time now is 18:24.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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