Redux v2 - Official 5065 Classic Source

04/02/2014 17:57 pro4never#1216
Quote:
Originally Posted by ~gameface~ View Post
how to setup a new item to be able to upgrade equipment in tc? for example a "met" that never fails or something like that
The client already allows MeteorTears to be used in twin city.

Why not just alter its description/make it hard to get and have it never fail in upgrades?


Alternatively you can edit the .exe if needed but it'd be easier to just rename/re-texture meteor tear as needed to fit your use.
04/04/2014 13:12 Soulfly25#1217
what kind of Software to build the code? is it Microsoft C# 2010 or 2008?
04/04/2014 14:31 Aceking#1218
Any IDE that will allow the C# language.
04/04/2014 16:46 -Zo#1219
the max HP on mobs life is 65535.. any chance to raise it up? would like to have 2kk or something like that :D
04/04/2014 18:02 Aceking#1220
Feel free, but the HP bar for the mob will not work correctly.
04/04/2014 18:18 -Zo#1221
I can't even set it up, because it tells me the max is 65535 :/
04/04/2014 19:42 Aceking#1222
The database field probaby has a max value set to it.
Go into the design view for the monstertype table and see if it does for that field.
04/04/2014 21:55 pro4never#1223
Quote:
Originally Posted by -Zo View Post
the max HP on mobs life is 65535.. any chance to raise it up? would like to have 2kk or something like that :D
No. The packet which controls monster information only assigns 2 bytes (ushort with a max value of 65535) to control monster health.

Adding more will not actually work (as mentioned you can give it health server side but client side the monster will show as dead or having no hp to start with long before it dies)
04/04/2014 22:56 Aceking#1224
Explains why they made the defense2 field.
Sorry, didn't have access to the source where im writing from so I was only just guessing :)
04/05/2014 00:00 pro4never#1225
Quote:
Originally Posted by Aceking View Post
Explains why they made the defense2 field.
Sorry, didn't have access to the source where im writing from so I was only just guessing :)

In new versions instead of updating the packet I seem to remember everything being dealt as like a percentage of max health remaining. It was silly.
04/05/2014 00:05 Aceking#1226
Quote:
Originally Posted by pro4never View Post
In new versions instead of updating the packet I seem to remember everything being dealt as like a percentage of max health remaining. It was silly.
Or they gave them the boss healthbar that goes across the screen.
Yeah, seems they practically did everything they could to avoid changing that.
04/05/2014 01:05 -Zo#1227
Quote:
Originally Posted by Execution! View Post
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!
I get tons of errors if im using this code on CombatManager :/
04/05/2014 01:39 pro4never#1228
Quote:
Originally Posted by -Zo View Post
I get tons of errors if im using this code on CombatManager :/


You probably aren't pasting it in the right place.

Look up some basic tutorials in C# so you understand how logic flows through a program. This is just a new case statement. You need to paste it in the correct location, not replace the entire file.
04/05/2014 03:51 Yupmoh#1229
@Zo, Instead of raising the monsters HP, Just control the damage dealt to them.
04/05/2014 11:04 Fortzax#1230
Hi pro4never , cand you answer me to a question ? i want to know what kind of bugs do you know are in this source . I want to know what i'm dealing with . big Thanks !! :) :)