Register for your free account! | Forgot your password?

You last visited: Today at 21:19

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

Advertisement



Fix Auto add arrows cost!!!

Discussion on Fix Auto add arrows cost!!! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 90
Received Thanks: 17
Fix Auto add arrows cost!!!

This my second fix

thanx for conquer-sx's 5165 source

I will fix conquer-sx's another some bug!!

1. Go PacketHandling/Attack.cs
Find:
Code:
if (SU.Info.ArrowsCost > 0)
Replace behind
Code:
if (SU.Info.ArrowsCost > 0){
Code:
                                    if (GC.MyChar.Loc.Map != 1039)
                                    {
                                        if (GC.MyChar.Equips.LeftHand.ID != 0 && Game.Item.IsArrow(GC.MyChar.Equips.LeftHand.ID))
                                        {
                                            if (GC.MyChar.Equips.LeftHand.CurDur >= SU.Info.ArrowsCost)
                                            {
                                                GC.MyChar.Equips.LeftHand.CurDur -= SU.Info.ArrowsCost;
                                            }
                                            else
                                            {
                                                GC.MyChar.Equips.LeftHand.CurDur = 0;
                                            }
                                            if (GC.MyChar.Equips.LeftHand.CurDur==0)
                                            {
                                                if (GC.MyChar.InventoryContains(1050000, 1, GC))
                                                {
                                                    GC.MyChar.RemoveItem(1050000, 1, GC);
                                                    GC.MyChar.Equips.LeftHand.CurDur = 20;
                                                }
                                                else if ((GC.MyChar.InventoryContains(1050001, 1, GC)))
                                                {
                                                    GC.MyChar.RemoveItem(1050001, 1, GC);
                                                    GC.MyChar.Equips.LeftHand.CurDur = 100;
                                                }
                                                else if ((GC.MyChar.InventoryContains(1050002, 1, GC)))
                                                {
                                                    GC.MyChar.RemoveItem(1050002, 1, GC);
                                                    GC.MyChar.Equips.LeftHand.CurDur = 500;
                                                }
                                                else
                                                {
                                                    GC.MyChar.MyClient.Message(2005,NPCDialog.ChangeCode("箭支不足,请及时购买!"));
                                                }
                                            }
                                            
                                            if (GC.MyChar.Equips.LeftHand.CurDur == 0)
                                            {
                                                GC.AddSend(Packets.ItemPacket(GC.MyChar.Equips.LeftHand.UID, 5, 6));
                                                GC.AddSend(Packets.ItemPacket(GC.MyChar.Equips.LeftHand.UID, 0, 3));
                                                GC.MyChar.Equips.LeftHand = new Game.Item();
                                            }
                                            else
                                                GC.AddSend(Packets.AddItem(GC.MyChar.Equips.LeftHand, 5));
                                        }
                                        else
                                        {
                                            GC.MyChar.AtkMem.Attacking = false;
                                            EnoughArrows = false;
                                        }
                                    }
262315610 is offline  
Thanks
4 Users
Old 07/01/2010, 17:21   #2
 
elite*gold: 20
Join Date: May 2008
Posts: 1,103
Received Thanks: 254
+k but there is an error with GC.MyChar.MyClient.Message(2005,NPCDialog.ChangeCo de("箭支不足,请及时购买!"));
changecode isnt right but i got it working
Pete1990 is offline  
Old 07/01/2010, 21:06   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 90
Received Thanks: 17
Quote:
Originally Posted by Pete1990 View Post
+k but there is an error with GC.MyChar.MyClient.Message(2005,NPCDialog.ChangeCo de("箭支不足,请及时购买!"));
changecode isnt right but i got it working

You can edit it :

GC.MyChar.MyClient.Message(2005,"havn't enough arrows!!"));

ChangeCode is my method convert to chinese!!
262315610 is offline  
Old 07/01/2010, 23:13   #4
 
-Shunsui-'s Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
i have a simpler method for this
-Shunsui- is offline  
Old 07/07/2010, 17:57   #5
 
elite*gold: 0
Join Date: Sep 2007
Posts: 54
Received Thanks: 1
nice one it really help me
wolvreen2006 is offline  
Old 07/07/2010, 18:23   #6
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
hmmmm somehow when I add dis in and I logg in da game no one can use skills lol O_O...any help XD?
killersub is offline  
Old 07/07/2010, 20:15   #7
 
elite*gold: 0
Join Date: Feb 2010
Posts: 90
Received Thanks: 17
Quote:
Originally Posted by killersub View Post
hmmmm somehow when I add dis in and I logg in da game no one can use skills lol O_O...any help XD?
I can't know your mind!!!

Can you description again???
262315610 is offline  
Old 07/07/2010, 20:51   #8
 
killersub's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 884
Received Thanks: 211
Quote:
Originally Posted by 262315610 View Post
I can't know your mind!!!

Can you description again???
erm...I meant like when I added this and logged in...no one in my game could use skills or xp skills or transform skills lol...
killersub is offline  
Reply


Similar Threads Similar Threads
[help] Change Mana-Cost or Stamina-Cost
07/01/2010 - CO2 Private Server - 2 Replies
....Version : 5165 ....... .....Type : ini version ....... I want to change the mana cost of (an example) of stigma.... I tried to edit the MagicType.txt from the OldcoDB...but i changed the Mana Cost and added Stamina Cost but nothink changed... Does anyone have an ideea?
Archer auto-scatter + repack arrows
10/22/2009 - CO2 Bots & Macros - 31 Replies
I made this small macro which automatically scatters for u in the direction where your mouse is pointing and it re-packs arrows for you, so the only thing u need to do is jump around and no need to worry about the rest, just point where you want the scatter to go :bandit: Arrows should be placed under F2! Special thx to varza1999 for letting me edit his automatically fire circle lvler so I could create this macro :bandit: , his fire lvler can be found here Edit: Made a small...



All times are GMT +1. The time now is 21:20.


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