Jump to content

xeroplz

Members
  • Posts

    53
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by xeroplz

  1. 10 minutes ago, RisingGale said:

    thats illegal and if caught you'd get banned or worse (the worse that could happen is like 1 out out 10,000 chances of happening)

    private servers are illegal as well, so there's not really any difference in evils here

  2. 6 hours ago, RisingGale said:

    so you might help them when not busy (I am not associated I have no money or coding experience)? cuz it sucks that Sega has been an absolute dick with shoving sonic down our throats lately and keeping the good IPs to Japan only even if they know the demand is extremely high and there is profit to be made in the west.....

    can't you just use the PSO2 Tweaker and connect using proxy? my ip is blocked by japan and i can still play the game just as well with it

  3. 19 hours ago, exec said:

    There's also quite a few effect and other packets between SkillUse and the combat action, that you don't seem to have, what's up with that?

    If you mean effects 298 and 231, effects with that ID, they may appear multiple times but they're not part of a skill. They're lightning bolt effects created when I kill something since I'm in a family on NA.

    298 and 231 will basically appear all over any skill I log with my character o_O

  4. So I'm currently working on Dual Gun skills, and they're going quite well, except for two of them specifically.

    1. Bullet Storm

    2. Grapple Shot

    At the moment when each of these two skills "completes" they lock the character from using skills. I've been looking into it, but I can't seem to find any answers at the moment, so I'm putting it here in case anyone sees something I'm doing wrong. For now I'm just going to focus on Bullet Storm, as solving the problem there will most likely solve the problem for Grapple Shot as well.

    Here's a log of Bullet Storm: Bullet Storm - 218.txt

    And my current example of Bullet Storm if you're interested.

    Spoiler
    
    // Copyright (c) Aura development team - Licensed under GNU GPL
    // For more information, see license file in the main folder
    
    using Aura.Channel.Network.Sending;
    using Aura.Channel.Skills.Base;
    using Aura.Channel.Skills.Magic;
    using Aura.Channel.Skills.Combat;
    using Aura.Channel.World;
    using Aura.Channel.World.Entities;
    using Aura.Data.Database;
    using Aura.Mabi.Const;
    using Aura.Mabi.Network;
    using Aura.Shared.Network;
    using Aura.Shared.Util;
    using System.Drawing;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Aura.Channel.Skills.Guns
    {
    	/// <summary>
    	/// Bullet Storm skill handler
    	/// </summary>
    	/// Var1: Initial Bullet Use
    	/// Var2: Damage Per Shot
    	/// Var5: Max Targets
    	/// Var6: Attack Spread (Width)
    	/// Var7: Attack Range (Length)
    	/// Var8: Maximum Damage
    	[Skill(SkillId.BulletStorm)]
    	public class BulletStorm : ISkillHandler, IPreparable, IReadyable, IUseable, ICancelable
    	{
    		/// <summary>
    		/// Bullet Count Tag for Gun
    		/// </summary>
    		private const string BulletCountTag = "GVBC";
    
    		/// <summary>
    		/// Max Bullets for Gun
    		/// </summary>
    		private const string BulletsMaxTag = "BulletsMax";
    
    		/// <summary>
    		/// Attacker's stun upon using the skill
    		/// </summary>
    		private const int AttackerStun = 0;
    
    		/// <summary>
    		/// Target's stun after getting hit
    		/// </summary>
    		private const int TargetStun = 4000;
    
    		/// <summary>
    		/// Distance target gets knocked back
    		/// </summary>
    		private const int KnockbackDistance = 200;
    
    		/// <summary>
    		/// Target's stability reduction
    		/// </summary>
    		private const int StabilityReduction = 10;
    
    		/// <summary>
    		/// Prepares the skill
    		/// </summary>
    		/// <param name="creature"></param>
    		/// <param name="skill"></param>
    		/// <param name="packet"></param>
    		/// <returns></returns>
    		public bool Prepare(Creature creature, Skill skill, Packet packet)
    		{
    			if (creature.RightHand == null)
    				Send.SkillPrepareSilentCancel(creature, skill.Info.Id);
    
    			// Set Bullet Count Tag if it doesn't exist
    			if (!creature.RightHand.MetaData1.Has(BulletCountTag))
    			{
    				creature.RightHand.MetaData1.SetShort(BulletCountTag, 0);
    				Send.ItemUpdate(creature, creature.RightHand);
    			}
    
    			// Check Bullet Count
    			var bulletCount = creature.RightHand.MetaData1.GetShort(BulletCountTag);
    			if (bulletCount < skill.RankData.Var1 && !creature.Conditions.Has(ConditionsD.WayOfTheGun))
    				Send.SkillPrepareSilentCancel(creature, skill.Info.Id);
    
    			creature.StopMove();
    			creature.Lock(Locks.Walk | Locks.Run);
    			Send.UseMotion(creature, 131, 2, false, false);
    
    			/* Removed Until Further Notice */
    			/*
    			var unkPacket = new Packet(0x7534, creature.EntityId); //?
    			unkPacket.PutByte(0).PutByte(0).PutByte(0);
    			creature.Region.Broadcast(unkPacket, creature);
    			*/
    
    			Send.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());
    
    			return true;
    		}
    
    		/// <summary>
    		/// Readies the skill
    		/// </summary>
    		/// <param name="creature"></param>
    		/// <param name="skill"></param>
    		/// <param name="packet"></param>
    		/// <returns></returns>
    		public bool Ready(Creature creature, Skill skill, Packet packet)
    		{
    			skill.Stacks = 1;
    			Send.SkillReady(creature, skill.Info.Id);
    
    			return true;
    		}
    
    		/// <summary>
    		/// Uses the skill
    		/// </summary>
    		/// <param name="creature"></param>
    		/// <param name="skill"></param>
    		/// <param name="packet"></param>
    		public void Use(Creature attacker, Skill skill, Packet packet)
    		{
    			var targetAreaId = packet.GetLong();
    			var targetAreaLoc = new Location(targetAreaId);
    			var targetAreaPos = new Position(targetAreaLoc.X, targetAreaLoc.Y);
    
    			var attackerPos = attacker.GetPosition();
    
    			// Distance & Radius
    			var distance = skill.RankData.Var7;
    			var radius = skill.RankData.Var6;
    
    			var attackerToTargetPointDist = attackerPos.GetDistance(targetAreaPos);
    			var newTargetPosition = attackerPos.GetRelative(targetAreaPos, (int)(distance - attackerToTargetPointDist)); // Get position for use of true rectangle distance
    
    			attacker.StopMove(); // Unnecessary at the moment, but who knows.
    
    			// Note: Add BulletDist later.
    
    			// Center Points Calculation
    			var attackerPoint = new Point(attackerPos.X, attackerPos.Y);
    			var targetPoint = new Point(newTargetPosition.X, newTargetPosition.Y);
    
    			var pointDist = Math.Sqrt((distance * distance) + (radius * radius)); // Pythagorean Theorem - Distance between point and opposite side's center.
    			var rotationAngle = Math.Asin(radius / pointDist);
    
    			// Calculate Points 1 & 2
    			var posTemp1 = attackerPos.GetRelative(newTargetPosition, (int)(pointDist - distance));
    			var pointTemp1 = new Point(posTemp1.X, posTemp1.Y);
    			var p1 = this.RotatePoint(pointTemp1, attackerPoint, rotationAngle);
    			var p2 = this.RotatePoint(pointTemp1, attackerPoint, (rotationAngle * -1));
    
    			// Calculate Points 3 & 4
    			var posTemp2 = newTargetPosition.GetRelative(attackerPos, (int)(pointDist - distance));
    			var pointTemp2 = new Point(posTemp2.X, posTemp2.Y);
    			var p3 = this.RotatePoint(pointTemp2, targetPoint, rotationAngle);
    			var p4 = this.RotatePoint(pointTemp2, targetPoint, (rotationAngle * -1));
    
    			// DEBUG ----------------------------------------------------------------------------
    			/*
    			var prop1 = new Prop(24830, attacker.Region.Id, p1.X, p1.Y, 1);
    			attacker.Region.AddProp(prop1);
    			var prop2 = new Prop(24830, attacker.Region.Id, p2.X, p2.Y, 1);
    			attacker.Region.AddProp(prop2);
    			var prop3 = new Prop(24830, attacker.Region.Id, p3.X, p3.Y, 1);
    			attacker.Region.AddProp(prop3);
    			var prop4 = new Prop(24830, attacker.Region.Id, p4.X, p4.Y, 1);
    			attacker.Region.AddProp(prop4);
    			*/
    			// ----------------------------------------------------------------------------------
    
    			// Prepare attacker action
    			var cap = new CombatActionPack(attacker, skill.Info.Id);
    
    			var aAction = new AttackerAction(CombatActionType.SpecialHit, attacker, targetAreaId);
    			aAction.Set(AttackerOptions.UseEffect | AttackerOptions.KnockBackHit1);
    			cap.Add(aAction);
    
    			aAction.Stun = AttackerStun;
    
    			// Get targets in descending order for effect packet using bulletDist
    			var targets = attacker.Region.GetCreaturesInPolygon(p1, p2, p3, p4).Where(x => attacker.CanTarget(x)).OrderByDescending(x => x.GetPosition().GetDistance(attackerPos)).Reverse().ToList();
    
    			// Filter by max targets [var5] and bullet count
    			var bulletCount = attacker.RightHand.MetaData1.GetShort(BulletCountTag);
    
    			if (attacker.Conditions.Has(ConditionsD.WayOfTheGun))
    				bulletCount = attacker.RightHand.MetaData1.GetShort(BulletsMaxTag);
    
    			var maxTargetsBulletCount = (int)Math.Floor((decimal)(bulletCount / 4));
    
    			if (maxTargetsBulletCount < skill.RankData.Var5)
    			{
    				targets = targets.Take(maxTargetsBulletCount).ToList();
    			}
    			else if (maxTargetsBulletCount >= skill.RankData.Var5)
    			{
    				targets = targets.Take((int)skill.RankData.Var5).ToList();
    			}
    
    			// Effects & Etc
    			Send.Effect(attacker, 231, (byte)0);
    
    			var shootEffect = new Packet(Op.Effect, attacker.EntityId);
    			shootEffect.PutInt(339).PutShort((short)skill.Info.Id).PutInt(95).PutShort((short)targets.Count);
    			var bulletDist = -380;
    			var totalDelay = 0;
    
    			Send.Effect(attacker, 335, (byte)1, (byte)1, (short)131, (short)targets.Count, 1140, (byte)2, (short)433, (short)1133);
    			Send.UseMotion(attacker, 131, 3, true, false);
    
    			// Prepare target actions
    			foreach (var target in targets)
    			{
    				var tAction = new TargetAction(CombatActionType.TakeHit, target, attacker, SkillId.CombatMastery);
    				tAction.Set(TargetOptions.Result | TargetOptions.MultiHit);
    				tAction.AttackerSkillId = skill.Info.Id;
    				tAction.MultiHitDamageCount = 4;
    				tAction.MultiHitDamageShowTime = 95;
    				tAction.MultiHitUnk1 = 0;
    				tAction.MultiHitUnk2 = 421075482;
    				cap.Add(tAction);
    
    				/// Damage is calculated as (Skill Rank Damage per Target [var2 (for 4 bullets?)] * Number of Targets)
    				/// However, if the target count >= 5, damage is set to max damage [var8].
    				var damage = 0f;
    				if (targets.Count >= 5)
    				{
    					damage = (attacker.GetRndDualGunDamage() * (skill.RankData.Var8 / 100f));
    				}
    				else
    				{
    					damage = (attacker.GetRndDualGunDamage() * (skill.RankData.Var2 / 100f)) * targets.Count; // Is 4 bullets needed? Damage Per Shot can be taken in many ways...
    				}
    
    				// Master Title
    
    				// Critical Hit
    				var dgm = attacker.Skills.Get(SkillId.DualGunMastery);
    				var extraCritChance = (dgm == null ? 0 : dgm.RankData.Var6);
    				var critchance = attacker.GetRightCritChance(target.Protection) + extraCritChance;
    				CriticalHit.Handle(attacker, critchance, ref damage, tAction);
    
    				// Defense and Prot
    				SkillHelper.HandleDefenseProtection(target, ref damage);
    
    				// Defense (Skill)
    				Defense.Handle(aAction, tAction, ref damage);
    
    				// Mana Shield
    				ManaShield.Handle(target, ref damage, tAction);
    
    				// Apply Damage
    				target.TakeDamage(tAction.Damage = damage, attacker);
    
    				// Aggro
    				target.Aggro(attacker);
    
    				// Stun Time
    				tAction.Stun = TargetStun;
    
    				// Death or Knockback
    				if (target.IsDead)
    				{
    					tAction.Set(TargetOptions.FinishingKnockDown);
    					attacker.Shove(target, KnockbackDistance);
    				}
    				else
    				{
    					// Reduce Stability if not knocked down
    					if (!target.IsKnockedDown)
    					{
    						target.Stability -= StabilityReduction;
    					}
    
    					// Knock down if needed
    					if (target.IsUnstable)
    					{
    						if (target.Is(RaceStands.KnockDownable))
    						{
    							tAction.Set(TargetOptions.KnockDown);
    							attacker.Shove(target, KnockbackDistance);
    						}
    					}
    					else if (target.Is(RaceStands.KnockBackable)) // Always knock back
    					{
    						tAction.Set(TargetOptions.KnockBack);
    						attacker.Shove(target, KnockbackDistance);
    					}
    					tAction.Creature.Stun = tAction.Stun;
    				}
    
    				bulletDist += 380;
    				totalDelay += 380;
    				tAction.Delay = bulletDist;
    				shootEffect.PutInt(bulletDist).PutLong(target.EntityId);
    
    				System.Threading.Timer t = null;
    				t = new System.Threading.Timer(_ =>
    				{
    					attacker.TurnTo(target.GetPosition());
    					GC.KeepAlive(t);
    				}, null, bulletDist, System.Threading.Timeout.Infinite);
    			}
    			aAction.Creature.Stun = aAction.Stun;
    			cap.Handle();
    
    			Send.SkillUse(attacker, skill.Info.Id, targetAreaId, 0, 1);
    			skill.Stacks = 0;
    			attacker.Region.Broadcast(shootEffect, attacker);
    
    			// Item Update excluding Way Of The Gun
    			if (!attacker.Conditions.Has(ConditionsD.WayOfTheGun))
    			{
    				bulletCount -= (short)(targets.Count * 4);
    				attacker.RightHand.MetaData1.SetShort(BulletCountTag, bulletCount);
    				Send.ItemUpdate(attacker, attacker.RightHand);
    			}
    
    			System.Threading.Timer t2 = null;
    			t2 = new System.Threading.Timer(_ =>
    			{
    				Send.UseMotion(attacker, 131, 4, false, false);
    				GC.KeepAlive(t2);
    			}, null, totalDelay, System.Threading.Timeout.Infinite);
    
    			this.Complete(attacker, skill, packet);
    		}
    
    		/// <summary>
    		/// Completes the skill
    		/// </summary>
    		/// <param name="creature"></param>
    		/// <param name="skill"></param>
    		/// <param name="packet"></param>
    		public void Complete(Creature creature, Skill skill, Packet packet)
    		{
    			Send.SkillComplete(creature, skill.Info.Id);
    
    			creature.Unlock(Locks.Walk | Locks.Run);
    
    			/*
    			var unkPacket1 = new Packet(0xA43B, creature.EntityId); //?
    			unkPacket1.PutShort(0).PutInt(0);
    			creature.Region.Broadcast(unkPacket1, creature);
    			*/
    		}
    
    		/// <summary>
    		/// Cancels the skill
    		/// </summary>
    		/// <param name="creature"></param>
    		/// <param name="skill"></param>
    		public void Cancel(Creature creature, Skill skill)
    		{
    			Send.MotionCancel2(creature, 0);
    			creature.Unlock(Locks.Walk | Locks.Run);
    		}
    
    		private Point RotatePoint(Point point, Point pivot, double radians)
    		{
    			var cosTheta = Math.Cos(radians);
    			var sinTheta = Math.Sin(radians);
    
    			var x = (int)(cosTheta * (point.X - pivot.X) - sinTheta * (point.Y - pivot.Y) + pivot.X);
    			var y = (int)(sinTheta * (point.X - pivot.X) + cosTheta * (point.Y - pivot.Y) + pivot.Y);
    
    			return new Point(x, y);
    		}
    	}
    }
    

     

    If you notice anything that could be causing these issues (between the log and the code), please comment on it. I'll still be working on it though :D

    If you want to test it, you'd have to clone my gun branch because there are a few core changes.

    https://github.com/xeroplz/aura/tree/gunner_skills

    Apologies if this is in the wrong section of the forum exec :>

    • Like 1
  5. 17 hours ago, exec said:

    Looking at that file, I guess those are gone for good.

    Actually.... No they're not. If anyone has the Korean version of the game, during their 10th anniversary which was only last year, they had a special 3D login screen for the event. If we can find the login screen information for that version of the game, we could possibly find out how to get previous 3D versions back.

    ref: http://www.youtube.com/watch?v=4dZ4Ybybm4o

    • Like 1
  6. 1 hour ago, exec said:

    Oh~ nice, so this is finally configurable. Check "db/layout2/login/loginscene.xml". It specifies which images should be used during certain times, in certain regions.

    
    StartTime="201512221200"
    EndTime="201601201159"
    Background="login_image_samhain2.dds"

     

    Oh wow lol, 2015-12-21, 12:00, ending 2016-01-20-11:59... I wonder what specifies the music then. I'm going to check that out.

  7. I just had a thought...

    Anyone who has used Abyss should know that the changeable Title Screen option was broken at one point in time. Today, I logged into Mabi and saw that the Samhain 1st Movement title screen was still up, but later today it was changed to 2nd Movement without any patching needed. This makes me think that somewhere, the client was updated and now is receiving information on what title screen to use through some server, and maybe this can be taken advantage of. I don't really know where to go from here but it's just a thought.

  8. Wait... I'm almost certain that +1 decreased MP Consumption only works if you have 10 points of it. It's a set effect, but it's applied by enchants. Look at Attack Speed boost on my Gun Log, if you don't have 10+ points, there's no effect. Since my blunt master wasn't over 6, I only got 8 points and it wouldn't activate unless I wore another piece of gear I had that gave me another 2 Attack Speed points.

    My friend has a gear set with Decreased MP Consumption adding up to 10 and it gets applied at that point. However, the upgrade form of that, the 4% consumption decrease on my Hermits Staff, is applied immediately. 

    I guess we need to be careful about set effects inside of enchants, not just on the item itself. Also you should look at the Karis Set if you want more info on the mp consumption decrease

    Edit: Also if nobody said this already, are set effects stackable? Like 10 points of something = 10% and 20 points = 20% of whatever boost?

  9. Oh just a little note if you didn't know, you don't have to subscribe events the way you did anymore, you can simply put [On("OnCreatureAttack")] above your function and it'll be subscribed automatically.

    But this is really neat, I should play around with it. Thanks c:

    • Like 3
  10. i have no idea why but the second video will NOT load for me, but it looked like poison?

    anyway, do you have an example of one of your scripts? i'd like to see how you handle it if that's alright :o

  11. The game is sort of repetitive in a way I could deal with but wouldn't consider fun.

    - Bosses literally do the same thing every time

    - Quests are the same thing most of the time

    - Money seems like a big issue, even though I haven't gotten that far.

    I'm only level 43 max but I just stopped playing after Tenet Chapel F2.

    Also another thing I don't really see is the importance of jumping in the game. Any monster with magic or range will hit you in the air regardless, and to dodge melee it's as simple as running in the opposite direction. Their map structure limits jumping on props to very specific things and when you most want to jump over something, they force you to run around.

  12. I feel like this year has been somewhat slow in terms of anticipated games. Two of the games I wanted most this year...

    • Peria Chronicles was pushed back to mid/late 2016.
    • Final Fantasy 15 was pushed back to mid 2016.
    • Kingdom Hearts 3 ??? I'm not even too sure about this one...

    Both Peria and FF15 were supposed to debut this fall, but oh well. There are others, but I can't think of them right now. Have any games that you all have been waiting for been pushed back or disappeared off of the roster for upcoming games? *cough* peria *cough*

  13. I honestly don't have much experience in the design side, and I wouldn't call myself skilled at coding either. With Aura, all we really needed to do was code, but now there's a whole new branch of personnel we need to have for it to go through. Unless we have someone who can model (both 3D and 2D), animate, and maybe compose music, it honestly wouldn't work out to well. I do want to learn 3D Animation on my own, but besides that and coding, I wouldn't really be able to do anything else -_-

  14. And does increasing them really make the combat more challenging again? You'll still be able to use them during an enemy's combo, with the difference that when you make the cooldown too long the skills basically become useless for anything else, which kinda destroys the whole idea behind the combat system, doesn't it? :/

    That's true... Hmm, I'm not really sure what to say about it now. Even so, I can't stand slow combat at all. If we did want to do something different with the combat system we can add dodging instead of counterattacks? This would make the system less broken and make counterattacking take some skill instead of just pressing a button in the middle of a monster combo. If you wanted to go deeper into that, you could make dodging unavailable with heavy weapons like Lances and make a Lance Counter skill like Mabi.

    we can add dodging instead of counterattacks

    Actually... Now that I think about it, if we added dodging, skills would have to do damage over a specific area instead of simple click > hit action. In that case, skills like smash wouldn't work, even though we don't necessarily NEED a Smash. This isn't Mabi after all.

×
×
  • Create New...