Register for your free account! | Forgot your password?

You last visited: Today at 11:48

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

Advertisement



Ethereal npc bug

Discussion on Ethereal npc bug within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 84
Received Thanks: 2
Ethereal npc bug

can someone tell me whats wrong with this npc,when I put 5 tortoise gems in the boxes it says i need 5 tortoise gems to make my item -3,but when I click Upgrade the tortoise gems wont remove / dissapear,and my - damage can be upgraded to infinity and I can get -99999.

note: i want it to remove the tortoise gems when I click Upgrade and the max - damage I want it to -7 max,i don't want it to go past -7. thanks

here is the npc: tell me what to remove / add

Code:
#region Ethereal
                case 35015:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Heya! I'm the master of blessing gears, I can bless any of your ");
                                    dialog.Text("gears, except talismans and garments, and for that i'll charge ");
                                    dialog.Text("only some super TortoiseGems.");
                                    dialog.Link("Let's begin!", 1);
                                    dialog.Link("Let me think.", 255);
                                    dialog.Avatar(104);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    GeneralData oven = new GeneralData(true);
                                    oven.UID = client.Entity.UID;
                                    oven.ID = 126;
                                    oven.dwParam = 426;
                                    oven.wParam1 = client.Entity.X;
                                    oven.wParam2 = client.Entity.Y;
                                    oven.Send(client);
                                    break;
                                }
                            default:
                                {
                                    IConquerItem Item = client.Equipment.TryGetItem(npcRequest.OptionID);
                                    if (Item != null)
                                    {
                                        if (Item.ID > 0)
                                        {
                                            byte nUmber = 0;
                                            switch (Item.Bless)
                                            {
                                                case 0: nUmber = 5; break;
                                                case 1: nUmber = 1; break;
                                                case 3: nUmber = 3; break;
                                                case 5: nUmber = 5; break;
                                                default: nUmber = 0; break;
                                            }

                                            if (nUmber == 0)
                                            {
                                                dialog.Text("I can't upgrade this gear bless, sorry.");
                                                dialog.Link("I see, thanks.", 255);
                                                dialog.Avatar(104);
                                                dialog.Send();
                                                return;
                                            }

                                            if (!client.Agreed)
                                            {
                                                dialog.Text("Your item will need some super tortoises to get better, ");
                                                dialog.Text("I'll charge some " + nUmber + " super tortoises. Are you ready?");
                                                dialog.Link("Wow, good deal!", npcRequest.OptionID);
                                                dialog.Link("Let me think.", 255);
                                                dialog.Avatar(104);
                                                dialog.Send();
                                                client.Agreed = true;
                                                return;
                                            }

                                            if (client.Inventory.Contains(700073, nUmber))
                                            {
                                                client.Entity.ClientStats.AppendRemove(Item);
                                                client.Inventory.Remove(700073, nUmber);
                                                Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                //if (Item.Bless < 7)
                                                if (Item.Bless == 0) Item.Bless = 1;
                                                else Item.Bless += 2;
                                                Item.Send(client);
                                                Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Default;
                                                ConquerItemTable.UpdateItem(Item, client);
                                                client.Entity.ClientStats.AppendAddition(Item);
                                                client.Agreed = false;
                                            }
                                            else
                                            {
                                                dialog.Text("You don't have " + nUmber + " super tortoise gems!");
                                                dialog.Link("I'll be right back!", 255);
                                                dialog.Avatar(104);
                                                dialog.Send();
                                            }
                                        }
                                        else
                                        {
                                            dialog.Text("Please wear your gear first!");
                                            dialog.Link("I'll be right back!", 255);
                                            dialog.Avatar(104);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        dialog.Text("Please wear your gear first!");
                                        dialog.Link("I'll be right back!", 255);
                                        dialog.Avatar(104);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
HerpDerpNigga is offline  
Old 05/14/2011, 14:36   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,383
//if (Item.Bless < 7)

it's commented out and not doing anything extra so I'd just do

if(Item.Bless > 6)
return;

Personally the whole thing isn't that well coded (IE: why are you switching based on bless to pull a number... and then switching based on the number pulled lol)


IE...

switch(item.Bless)
{
case 0:
if(client.Inventory.Contains(700073, 5))
item.Bless = 1;
break;
case 1:
if(client.Inventory.Contains(700073,1))
item.Bless = 3;
break;
case 3:
if(client.Inventory.Contains(700073, 3))
item.bless = 5;
break;
case 5:
if(Client.Inventory.Contains(700073, 5))
item.bless = 7;
break;
}

That's all you'd need to do for the entire cost/modification stuff... add in the actual removal code and perhaps some nice output so the client knows what has happened but yah...
pro4never is offline  
Thanks
1 User
Old 05/14/2011, 15:15   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 84
Received Thanks: 2
didn't worked,still the same thing
look this is how i put the codes

Code:
                #region Ethereal
                case 35015:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Heya! I'm the master of blessing gears, I can bless any of your ");
                                    dialog.Text("gears, except talismans and garments, and for that i'll charge ");
                                    dialog.Text("only some super TortoiseGems.");
                                    dialog.Link("Let's begin!", 1);
                                    dialog.Link("Let me think.", 255);
                                    dialog.Avatar(104);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    GeneralData oven = new GeneralData(true);
                                    oven.UID = client.Entity.UID;
                                    oven.ID = 126;
                                    oven.dwParam = 426;
                                    oven.wParam1 = client.Entity.X;
                                    oven.wParam2 = client.Entity.Y;
                                    oven.Send(client);
                                    break;
                                }
                            default:
                                {
                                    IConquerItem Item = client.Equipment.TryGetItem(npcRequest.OptionID);
                                    if (Item != null)
                                    {
                                        [COLOR="Red"]if (Item.Bless < 7)[/COLOR]
                                        if (Item.ID > 0)
                                        {
                                            byte nUmber = 0;
                                            switch (Item.Bless)
                                            [COLOR="#ff0000"]{
                                                case 0:
                                                    if (client.Inventory.Contains(700073, 5))
                                                        Item.Bless = 1;
                                                    break;
                                                case 1:
                                                    if (client.Inventory.Contains(700073, 1))
                                                        Item.Bless = 3;
                                                    break;
                                                case 3:
                                                    if (client.Inventory.Contains(700073, 3))
                                                        Item.Bless = 5;
                                                    break;
                                                case 5:
                                                    if (client.Inventory.Contains(700073, 5))
                                                        Item.Bless = 7;
                                                    break;
                                            }[/COLOR]

                                            if (nUmber == 0)
                                            {
                                                dialog.Text("I can't upgrade this gear bless, sorry.");
                                                dialog.Link("I see, thanks.", 255);
                                                dialog.Avatar(104);
                                                dialog.Send();
                                                return;
                                            }

                                            if (!client.Agreed)
                                            {
                                                dialog.Text("Your item will need some super tortoises to get better, ");
                                                dialog.Text("I'll charge some " + nUmber + " super tortoises. Are you ready?");
                                                dialog.Link("Wow, good deal!", npcRequest.OptionID);
                                                dialog.Link("Let me think.", 255);
                                                dialog.Avatar(104);
                                                dialog.Send();
                                                client.Agreed = true;
                                                return;
                                            }

                                            if (client.Inventory.Contains(700073, nUmber))
                                            {
                                                client.Entity.ClientStats.AppendRemove(Item);
                                                client.Inventory.Remove(700073, nUmber);
                                                Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
                                                //if (Item.Bless < 7)
                                                if (Item.Bless == 0) Item.Bless = 1;
                                                else Item.Bless += 2;
                                                Item.Send(client);
                                                Item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Default;
                                                ConquerItemTable.UpdateItem(Item, client);
                                                client.Entity.ClientStats.AppendAddition(Item);
                                                client.Agreed = false;
                                            }
                                            else
                                            {
                                                dialog.Text("You don't have " + nUmber + " super tortoise gems!");
                                                dialog.Link("I'll be right back!", 255);
                                                dialog.Avatar(104);
                                                dialog.Send();
                                            }
                                        }
                                        else
                                        {
                                            dialog.Text("Please wear your gear first!");
                                            dialog.Link("I'll be right back!", 255);
                                            dialog.Avatar(104);
                                            dialog.Send();
                                        }
                                    }
                                    else
                                    {
                                        dialog.Text("Please wear your gear first!");
                                        dialog.Link("I'll be right back!", 255);
                                        dialog.Avatar(104);
                                        dialog.Send();
                                    }
                                    break;
                                }
                        }
                        break;
                    }
                #endregion
HerpDerpNigga is offline  
Old 05/14/2011, 15:48   #4
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
you have touch the dialog.cs in 12tails source right? I tell you try to look at the Packethandler.cs you will see on that ...
marlyandedsel is offline  
Old 05/14/2011, 16:23   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,383
You're doing it wrong. What I was saying was just theory on how to re-write the entire npc.


The way he wrote it is just fine but personally I don't see why he splits things up so much.

The actual modifications are going on further in the actual script.
pro4never is offline  
Old 05/14/2011, 18:15   #6
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
did you check the packethandler??
tkx....

Code:
switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Heya! I'm the master of blessing gears, I can bless any of your ");
                                    dialog.Text("gears, except talismans and garments, and for that i'll charge ");
                                    dialog.Text("only some super TortoiseGems.");
                                    dialog.Link("Let's begin!", 1);
                                    dialog.Link("Let me think.", 255);
                                    dialog.Avatar(104);
                                    dialog.Send();
                                    break;
                                }
                            case 1:
                                {
                                    GeneralData oven = new GeneralData(true);
                                    oven.UID = client.Entity.UID;
                                    oven.ID = 126;
                                    oven.dwParam = 426;
                                    oven.wParam1 = client.Entity.X;
                                    oven.wParam2 = client.Entity.Y;
                                    oven.Send(client);
                                    break;
                                }
i guess the linkback is sending it to a gui .... why are you trying to use the default??
12tails is offline  
Old 05/14/2011, 18:24   #7
 
marlyandedsel's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 343
Received Thanks: 21
yes the link back sending to a gui.... thats why I tell him to check packethandler... because I that problem tooo I just put the condition if (Item.Bless < 7 ) but I know there is a good correction for that... because to take dmg -7 we should take 14 tortois but it only take 5 in mine.... 12tails/leo do you have fix for that please....
marlyandedsel is offline  
Old 09/26/2013, 12:37   #8
 
elite*gold: 0
Join Date: May 2013
Posts: 1
Received Thanks: 0
Thank Man
Max-PaYne is offline  
Reply


Similar Threads Similar Threads
i need ethereal fix npc (who make -damag)
01/01/2010 - CO2 Private Server - 5 Replies
i need ethereal fix npc (who make -damag) my npc can only make damag -2 :7 i need fix npc to make -1 and i need MoonGoddess given weps and item without ninja gear +12 -7 and npc given moonbox and pro item
help my Ethereal NPC
08/24/2009 - CO2 Private Server - 2 Replies
hi plz help my give my translate Ethereal NPC. Sorry for my English
[Request] ethereal task
05/10/2009 - CO2 Private Server - 4 Replies
Need task for ethereal because mine not work tnx



All times are GMT +2. The time now is 11:49.


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.