Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 11:47

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

Advertisement



Redux v2 - Official 5065 Classic Source

Discussion on Redux v2 - Official 5065 Classic Source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old 02/27/2014, 04:58   #1081
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
I added winning fields in guild.cs, how can I edit that from guildwar.cs at the end?
I have tried Currentwinner.haswon =1; but it's no good as it will crash.
Should it be something like
If(player.guildid = currentwinnerid)
player.guild.haswon =1;??
mujake is offline  
Old 02/27/2014, 14:14   #1082
 
Balce2's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 31
Received Thanks: 4
why when i start source i get this problem help please..
Balce2 is offline  
Old 02/27/2014, 14:35   #1083
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
You haven't set it up well or you have problems with database.
mujake is offline  
Old 02/27/2014, 14:39   #1084
 
Balce2's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 31
Received Thanks: 4
Quote:
Originally Posted by mujake View Post
You haven't set it up well or you have problems with database.
can you help me how to set up?
Balce2 is offline  
Old 02/27/2014, 15:31   #1085
 
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
Looks to me like it hasn't been compiled.
Aceking is offline  
Old 02/27/2014, 17:12   #1086
 
Yupmoh's Avatar
 
elite*gold: 26
Join Date: Jul 2011
Posts: 522
Received Thanks: 284
Quote:
Originally Posted by mujake View Post
I added winning fields in guild.cs, how can I edit that from guildwar.cs at the end?
I have tried Currentwinner.haswon =1; but it's no good as it will crash.
Should it be something like
If(player.guildid = currentwinnerid)
player.guild.haswon =1;??
Or you could simply check the name on the pole for the winner guild? Let an NPC check if it's talking to the leader of that guild and execute your code?
That would be my go if I were you.
Yupmoh is offline  
Thanks
1 User
Old 02/27/2014, 17:17   #1087
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
Quote:
Originally Posted by Execution! View Post
Or you could simply check the name on the pole for the winner guild? Let an NPC check if it's talking to the leader of that guild and execute your code?
That would be my go if I were you.
Thanks...I didn't thought about that...I always skip simple things..and get stuck by thinking to complicated solutions.
mujake is offline  
Old 02/27/2014, 17:45   #1088
 
Yupmoh's Avatar
 
elite*gold: 26
Join Date: Jul 2011
Posts: 522
Received Thanks: 284
Same, However I haven't done it yet, but I sure will in the future, Still having trouble finding out why scatter doesn't launch in TG, Thats 1, Second thing is Proff experience, it levels correctly but the experience showing isn't correct
Yupmoh is offline  
Thanks
1 User
Old 02/27/2014, 19:10   #1089
 
mujake's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 494
Received Thanks: 54
Quote:
Originally Posted by Execution! View Post
Same, However I haven't done it yet, but I sure will in the future, Still having trouble finding out why scatter doesn't launch in TG, Thats 1, Second thing is Proff experience, it levels correctly but the experience showing isn't correct
Here is what i made so far on NPC, now i am trying to set haswon to 0 the rest of the time after th rewarding time has expired.
mujake is offline  
Old 02/27/2014, 19:59   #1090
 
elite*gold: 0
Join Date: Feb 2006
Posts: 726
Received Thanks: 271
I would check the database for the name of the pole.

Or, I believe the GuildWar class loads the winner at server start. I could be wrong, but if it doesn't it would only take a couple lines to load it.
Then that variable would always have the winner.
Aceking is offline  
Thanks
1 User
Old 02/27/2014, 20:19   #1091
 
Yupmoh's Avatar
 
elite*gold: 26
Join Date: Jul 2011
Posts: 522
Received Thanks: 284
Quote:
Originally Posted by Aceking View Post
I would check the database for the name of the pole.

Or, I believe the GuildWar class loads the winner at server start. I could be wrong, but if it doesn't it would only take a couple lines to load it.
Then that variable would always have the winner.
Fairly simple , Anyways.. I was planning on coding the love stone, I know that marriage is an attack type, Still no clue on how to do it... Any hints?
Yupmoh is offline  
Old 02/27/2014, 22:22   #1092
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Quote:
Originally Posted by Execution! View Post
Fairly simple , Anyways.. I was planning on coding the love stone, I know that marriage is an attack type, Still no clue on how to do it... Any hints?
First you send 1010, with a subtype of OpenCustom, then go ahead and send the customcommand of 1067, which is the flower pointer mouse.

After that its basically handling the 1022 subtypes, 8 and 9.
InsomniacPro is offline  
Thanks
2 Users
Old 02/28/2014, 00:42   #1093
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
@Insomniac also stringpacket for the spouse names.
Super Aids is offline  
Thanks
1 User
Old 02/28/2014, 00:51   #1094
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Quote:
Originally Posted by Super Aids View Post
@Insomniac also stringpacket for the spouse names.
I was trying to leave some things for him to figure out himself.
InsomniacPro is offline  
Old 02/28/2014, 01:19   #1095
 
Yupmoh's Avatar
 
elite*gold: 26
Join Date: Jul 2011
Posts: 522
Received Thanks: 284
Figured that out already Lol

//EDIT Thanks for the help with the marriage, Also BIG thanks to Aceking.

Here's the code for marriage

NPC:

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Redux.Packets.Game;

namespace Redux.Npcs
{
   public class NPC_390 : INpc
    {
        public NPC_390(Game_Server.Player _client)
            : base(_client)
        {
            ID = 390;
            Face = 1;
        }

        public override void Run(Game_Server.Player _client, ushort _linkback)
        {
            Responses = new List<NpcDialogPacket>();
            AddAvatar();
            switch (_linkback)
            {
                case 0:
                    AddText("The fate brings lover together. I hope that all can get married and live happily with their lover. What can I do for you?");
                    AddOption("I would like to get married please.", 1);
                    AddOption("Just passing by.", 255);
                    break;
                case 1:
                    if (_client.Spouse == "None")
                    {
                        _client.Send(GeneralActionPacket.Create(_client.UID, Enum.DataAction.OpenCustom, 1067));
                    }
                    else
                    {
                        AddText("Ooh my! You're already married, Wanna cheat on your spouse now?");
                        AddOption("Sorry.", 255);
                    }
                    break;
            }
            AddFinish();
            Send();
        }
    }
}
CombatManager:

Code:
              case InteractAction.Court:
                    {
                        var target = PlayerManager.Players[_packet.Target];
                        if (target != null)
                            target.Send(_packet);
                        break;
                    }
              case InteractAction.Marry:
                    {
                        var target = PlayerManager.Players[_packet.Target];
                        var sender = PlayerManager.Players[this.owner.UID];
                        if (target != null && sender.Spouse == "None" && target.Spouse == "None")
                        {
                            sender.Spouse = target.Name.ToString();
                            target.Spouse = sender.Name.ToString();
                            sender.Send(StringsPacket.Create(sender.UID, StringAction.Mate, target.Name.ToString()));
                            target.Send(StringsPacket.Create(target.UID, StringAction.Mate, sender.Name.ToString()));
                            sender.Save(); target.Save();
                            PlayerManager.SendToServer(new TalkPacket(ChatType.GM, sender.Name.ToString() + " and " + target.Name.ToString() + " are now married, Congrats.", ChatColour.Red));
                        }
                        else
                        {
                            sender.Send(new TalkPacket(ChatType.System, "Either you or your target are married."));
                        }
                        break;
                    }
Packets turn out to be fun after all!
Yupmoh is offline  
Thanks
4 Users
Closed Thread


Similar Threads Similar Threads
[S] Shadow Warrior Classic Redux [B] EG
09/15/2013 - elite*gold Trading - 1 Replies
Topic regelt ! SWCR aus dem Weekly Bundle. Macht mir angebote.



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


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.