protected override void Update() { base.Update(); if (player && hasSpawnPoint) { RallyPoint rallyPt = player.GetComponentInChildren <RallyPoint>(); if (selected) { if (rallyPt && player.isHuman && spawnPoint != null && rallyPoint != null) { // rallyPt.transform.position = rallyPoint; // rallyPt.transform.forward = transform.forward; rallyPt.Enable(); } } else { if (rallyPt && player.isHuman) { rallyPt.Disable(); } } } ProcessBuildQueue(); }
public override void SetSelection(bool selected, Rect playingArea) { base.SetSelection(selected, playingArea); if (player) { RallyPoint flag = player.GetComponentInChildren <RallyPoint>(); if (selected) { if (flag && player.human && spawnPoint != ResourceManager.InvalidPosition && rallyPoint != ResourceManager.InvalidPosition) { flag.transform.localPosition = rallyPoint; flag.transform.forward = transform.forward; flag.Enable(); } } else { if (flag && player.human) { flag.Disable(); } } } }
public void HandleSelectedChange() { if (Agent.Controller.Commander == PlayerManager.MainController.Commander) { RallyPoint flag = PlayerManager.MainController.Commander.GetComponentInChildren <RallyPoint>(); if (Agent.IsSelected) { if (flag && spawnPoint != ResourceManager.InvalidPosition && rallyPoint != ResourceManager.InvalidPosition) { if (_flagState == FlagState.FlagSet) { flag.transform.localPosition = rallyPoint.ToVector3(); flag.transform.forward = transform.forward; flag.Enable(); } else { flag.transform.localPosition = Agent.Body.Position3d.ToVector3(); flag.Disable(); } } } else { if (flag) { flag.Disable(); } } } }
public Colony(ActorInitializer init, ColonyInfo info) { this.info = info; health = init.Self.Trait <Health>(); health.RemoveOnDeath = false; // TODO: Replace this hack. rallyPoint = init.Self.TraitOrDefault <RallyPoint>(); }
public void RemoveFlag() { if (rallyPoint != null) { Destroy(rallyPoint.go); rallyPoint = null; } }
protected override void Start() { base.Start(); if (hasSpawnPoint) { rallyPtObj = transform.GetComponentInChildren <RallyPoint> (); SetRallyPoint(rallyPoint); } }
public RallyPointIndicator(Actor building, RallyPoint rp) { this.building = building; this.rp = rp; flag = new Animation(building.World, rp.Info.Image); flag.PlayRepeating(rp.Info.FlagSequence); circles = new Animation(building.World, rp.Info.Image); circles.Play(rp.Info.CirclesSequence); }
public void SetRallyPoint(Vector3 position) { rallyPoint = position; if (player && player.human && currentlySelected) { RallyPoint flag = player.GetComponentInChildren <RallyPoint>(); if (flag) { flag.transform.localPosition = rallyPoint; } } }
public void SetRallyPoint(Vector3 pos) { rallyPoint = pos; if (IsSelected()) { RallyPoint flag = player.GetComponentInChildren <RallyPoint>(); if (flag) { flag.transform.localPosition = rallyPoint; } } }
public RallyPointIndicator(Actor building, string palettePrefix) { this.building = building; this.palettePrefix = palettePrefix; rp = building.Trait<RallyPoint>(); flag = new Animation(building.World, "rallypoint"); circles = new Animation(building.World, "rallypoint"); flag.PlayRepeating("flag"); circles.Play("circles"); }
public void PlaceFlag(int x, float y, int z, GameObject flag) { if (rallyPoint != null) { Destroy(rallyPoint.go); } GameObject clone = UnityEngine.Object.Instantiate(flag, flag.transform.position + new Vector3(x, y, z), flag.transform.rotation); //GameObject clone = UnityEngine.Object.Instantiate(flag, flag.transform.position + new Vector3(x, y, z), Quaternion.identity); RallyPoint flagObj = new RallyPoint(clone, x, z); rallyPoint = flagObj; }
public void SetRallyPoint(Vector3 position) { rallyPoint = position; if (player && player.isHuman) { RallyPoint rallyPt = player.GetComponentInChildren <RallyPoint>(); if (rallyPt) { rallyPt.transform.position = rallyPoint; LineRenderer line = rallyPt.GetComponentInChildren <LineRenderer>(); line.SetPosition(0, new Vector3(transform.position.x, 5f, transform.position.z)); line.SetPosition(1, position); } } }
protected override void Created(Actor self) { base.Created(self); facing = self.TraitOrDefault <IFacing>(); exits = self.Info.TraitInfos <ExitInfo>().ToArray(); rallyPoint = self.TraitOrDefault <RallyPoint>(); // Spawn initial load. int burst = Info.InitialActorCount == -1 ? Info.Actors.Length : Info.InitialActorCount; for (int i = 0; i < burst; i++) { Replenish(self, SlaveEntries); } }
public void SetRallyPoint(Vector3d position) { rallyPoint = position; if (PlayerManager.MainController.Commander && Agent.IsSelected) { RallyPoint flag = PlayerManager.MainController.Commander.GetComponentInChildren <RallyPoint>(); if (flag) { if (!flag.ActiveStatus) { flag.Enable(); } flag.transform.localPosition = rallyPoint.ToVector3(); _flagState = FlagState.FlagSet; } } }
public RallyPoint cercaRallyPoint(TipoRallyPoint tipo) { RallyPoint rpObjetivo = null; float distanciaMasCercana = Mathf.Infinity; float distancia; foreach (RallyPoint rp in rallypoints) { distancia = Vector2.Distance(coordenadas, rp.getCoordenadas()); if (rp.getTipoRallyPoint() == tipo && distancia < rangoVision * 10 && distancia < distanciaMasCercana) { rpObjetivo = rp; distanciaMasCercana = distancia; } } return(rpObjetivo); }
public void SetRallyPoint(Vector3 position) { rallyPoint = position; if (Agent.GetCommander() && Agent.IsSelected) { RallyPoint flag = Agent.GetCommander().GetComponentInChildren <RallyPoint>(); if (flag) { if (!flag.ActiveStatus) { flag.Enable(); } flag.transform.localPosition = rallyPoint; _flagState = FlagState.FlagSet; Agent.Controller.GetCommanderHUD().SetCursorLock(false); Agent.Controller.GetCommanderHUD().SetCursorState(CursorState.Select); SelectionManager.SetSelectionLock(false); } } }
public RallyPointProperties(ScriptContext context, Actor self) : base(context, self) { rp = self.Trait <RallyPoint>(); }
public Order(Village village, string name, int quantity = 1) { id = GetId(); headquarters = new Headquarters(); timberCamp = new TimberCamp(); clayPit = new ClayPit(); ironMine = new IronMine(); farm = new Farm(); warehouse = new Warehouse(); rallyPoint = new RallyPoint(); barracks = new Barracks(); statue = new Statue(); wall = new Wall(); hospital = new Hospital(); market = new Market(); tavern = new Tavern(); academy = new Academy(); hallOfOrders = new HallOfOrders(); spearman = new Spearman(); swordsman = new Swordsman(); archer = new Archer(); heavyCavalry = new HeavyCavalry(); axeFighter = new AxeFighter(); lightCavalry = new LightCavalry(); mountedArcher = new MountedArcher(); ram = new Ram(); catapult = new Catapult(); barracksInfos = new List <PartialBarracksInfo>(); farmInfos = new List <PartialFarmInfo>(); waitInfos = new List <PartialWaitInfo>(); barracksToDateTime = new Dictionary <int, DateTime>(); stringToEntity = new Dictionary <string, Entity>() { { "Headquarters", headquarters }, { "TimberCamp", timberCamp }, { "ClayPit", clayPit }, { "IronMine", ironMine }, { "Farm", farm }, { "Warehouse", warehouse }, { "RallyPoint", rallyPoint }, { "Barracks", barracks }, { "Statue", statue }, { "Wall", wall }, { "Hospital", hospital }, { "Market", market }, { "Tavern", tavern }, { "Academy", academy }, { "HallOfOrders", hallOfOrders }, { "Spearman", spearman }, { "Swordsman", swordsman }, { "Archer", archer }, { "HeavyCavalry", heavyCavalry }, { "AxeFighter", axeFighter }, { "LightCavalry", lightCavalry }, { "MountedArcher", mountedArcher }, { "Ram", ram }, { "Catapult", catapult }, { "init", null } }; barracksToLimit = new Dictionary <int, int>() { { 1, 5 }, { 2, 10 }, { 3, 15 } }; for (int i = 4; i <= 25; i++) { barracksToLimit.Add(i, int.MaxValue); } this.name = name; this.quantity = quantity; entity = stringToEntity[name]; bar = new OrderBar(this.village = village); }
public void Awake() { instance = this; rallyCircle = GameObject.Find("rallyCircle"); }
public static void F_INIT_PLAYER(BaseClient client, PacketIn packet) { GameClient cclient = (GameClient)client; Player Plr = cclient.Plr; if (Plr == null) { return; } if (!Plr.IsInWorld()) // If the player is not on a map, then we add it to the map { ushort zoneId = Plr.Info.Value.ZoneId; ushort regionId = (ushort)Plr.Info.Value.RegionId; Zone_Info info = ZoneService.GetZone_Info(zoneId); if (info?.Type == 0) { RegionMgr region = WorldMgr.GetRegion(regionId, true); if (region.AddObject(Plr, zoneId, true)) { return; } } else if (info?.Type == 4 || info?.Type == 5 || info?.Type == 6) // login into a instance { if (!WorldMgr.InstanceMgr.ZoneIn(Plr, (byte)info?.Type)) // cant login into the instace port to exit { Instance_Info II; InstanceService._InstanceInfo.TryGetValue(zoneId, out II); Zone_jump ExitJump = ZoneService.GetZoneJump(II.exitzonejup); if (ExitJump == null) { Log.Error("Exit Jump in Instance", " " + zoneId + " missing!"); } else { if (ExitJump.Type == 4) { WorldMgr.InstanceMgr.ZoneIn(Plr, 4, ExitJump); } else { Plr.Teleport(ExitJump.ZoneID, ExitJump.WorldX, ExitJump.WorldY, ExitJump.WorldZ, ExitJump.WorldO); } } } return; } // Warp a player to their bind point if they attempt to load into a scenario map. RallyPoint rallyPoint = RallyPointService.GetRallyPoint(Plr.Info.Value.RallyPoint); if (rallyPoint != null) { Plr.Teleport(rallyPoint.ZoneID, rallyPoint.WorldX, rallyPoint.WorldY, rallyPoint.WorldZ, rallyPoint.WorldO); } else { CharacterInfo cInfo = CharMgr.GetCharacterInfo(Plr.Info.Career); Plr.Teleport(cInfo.ZoneId, (uint)cInfo.WorldX, (uint)cInfo.WorldY, (ushort)cInfo.WorldZ, (ushort)cInfo.WorldO); } } else { Plr.Loaded = false; Plr.StartInit(); } }
public static void F_INIT_PLAYER(BaseClient client, PacketIn packet) { GameClient cclient = (GameClient)client; Player Plr = cclient.Plr; if (Plr == null) { return; } // clear all lockouts if they are expired InstanceService.ClearLockouts(Plr); if (!Plr.IsInWorld()) // If the player is not on a map, then we add it to the map { ushort zoneId = Plr.Info.Value.ZoneId; ushort regionId = (ushort)Plr.Info.Value.RegionId; Zone_Info info = ZoneService.GetZone_Info(zoneId); if (info?.Type == 0) { RegionMgr region = WorldMgr.GetRegion(regionId, true); if (region.AddObject(Plr, zoneId, true)) { return; } } else if (info?.Type == 4 || info?.Type == 5 || info?.Type == 6) // login into a instance results in teleport outside { if (InstanceService._InstanceInfo.TryGetValue(zoneId, out Instance_Info II)) { Zone_jump ExitJump = null; if (Plr.Realm == Realms.REALMS_REALM_ORDER) { ExitJump = ZoneService.GetZoneJump(II.OrderExitZoneJumpID); } else if (Plr.Realm == Realms.REALMS_REALM_DESTRUCTION) { ExitJump = ZoneService.GetZoneJump(II.DestrExitZoneJumpID); } if (ExitJump == null) { Log.Error("Exit Jump in Instance", " " + zoneId + " missing!"); } else { Plr.Teleport(ExitJump.ZoneID, ExitJump.WorldX, ExitJump.WorldY, ExitJump.WorldZ, ExitJump.WorldO); } } return; } // Warp a player to their bind point if they attempt to load into a scenario map. RallyPoint rallyPoint = RallyPointService.GetRallyPoint(Plr.Info.Value.RallyPoint); if (rallyPoint != null) { Plr.Teleport(rallyPoint.ZoneID, rallyPoint.WorldX, rallyPoint.WorldY, rallyPoint.WorldZ, rallyPoint.WorldO); } else { CharacterInfo cInfo = CharMgr.GetCharacterInfo(Plr.Info.Career); Plr.Teleport(cInfo.ZoneId, (uint)cInfo.WorldX, (uint)cInfo.WorldY, (ushort)cInfo.WorldZ, (ushort)cInfo.WorldO); } } else { Plr.Loaded = false; Plr.StartInit(); } }
public RallyPointIndicator(Actor building, RallyPoint rp, ExitInfo[] exits) { this.building = building; this.rp = rp; this.exits = exits; }
protected override void Start() { base.Start(); if (hasSpawnPoint) { rallyPtObj = transform.GetComponentInChildren< RallyPoint > (); SetRallyPoint (rallyPoint); } }
public override void SendInteract(Player Plr, InteractMenu Menu) { Log.Success("SendInteract", "" + Name + " -> " + Plr.Name + ",Type=" + InteractType); Plr.QtsInterface.HandleEvent(Objective_Type.QUEST_SPEACK_TO, Spawn.Entry, 1); if (!IsDead) { // perhaps do some checks? if (Menu.Menu == 7) // Trainer Spells { PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(5); Out.WriteByte(0x0F); Out.WriteByte(6); Out.WriteUInt16(0); Plr.SendPacket(Out); } else if (Menu.Menu == 9) // List items for sale { WorldMgr.SendVendor(Plr, Spawn.Entry); } else if (Menu.Menu == 11) // Buy an item { WorldMgr.BuyItemVendor(Plr, Menu, Spawn.Entry); } else if (Menu.Menu == 14) // Sells an Item { Plr.ItmInterface.SellItem(Menu); } else if (Menu.Menu == 25) // Set rally point { RallyPoint Rally = WorldMgr.GetRallyPointFromNPC(Entry); if (Rally != null) { Plr._Value.RallyPoint = Rally.Id; PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x12); Out.WriteUInt16(Menu.Oid); Out.WriteUInt16(Plr._Value.RallyPoint); Plr.SendPacket(Out); } else { Plr.SendLocalizeString("ERROR: Unknown Rally Point NPC (" + Entry + ").", GameData.Localized_text.CHAT_TAG_DEFAULT); } } else if (Menu.Menu == 36) // Buy back item { Plr.ItmInterface.BuyBackItem(Menu); } else if (Menu.Menu == 37) // Dye menu { byte MAX_DYES = 30; PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x1B); List <Dye_Info> Dyes = WorldMgr.GetDyes(); byte count = (byte)Math.Min(Dyes.Count, MAX_DYES); Out.WriteByte(count); for (byte i = 0; i < count; i++) { Out.WriteByte(i); Out.WriteUInt16(Dyes[i].Entry); Out.WriteUInt32(Dyes[i].Price); } Plr.SendPacket(Out); } else if (Menu.Menu == 38) // Dye one item { Item item = Plr.ItmInterface.GetItemInSlot(Menu.Num); if (item == null) { return; } byte PrimaryDye = Menu.Packet.GetUint8(); byte SecondaryDye = Menu.Packet.GetUint8(); ushort PrimaryDyeId = 0; ushort SecondaryDyeId = 0; uint cost = 0; // 255 = no dye selected if (PrimaryDye != 255) { cost += WorldMgr.GetDyes()[PrimaryDye].Price; } // 255 = no dye selected if (SecondaryDye != 255) { cost += WorldMgr.GetDyes()[SecondaryDye].Price; } if (!Plr.RemoveMoney(cost)) { Plr.SendLocalizeString("", GameData.Localized_text.TEXT_AUCTION_NOT_ENOUGH_MONEY); return; } // 255 = no dye selected if (PrimaryDye != 255) { PrimaryDyeId = WorldMgr.GetDyes()[PrimaryDye].Entry; } // 255 = no dye selected if (SecondaryDye != 255) { SecondaryDyeId = WorldMgr.GetDyes()[SecondaryDye].Entry; } Plr.ItmInterface.DyeItem(item, PrimaryDyeId, SecondaryDyeId); if (Plr._IsActive && Plr.IsInWorld() && Plr._Loaded) { foreach (Player P in _PlayerRanged) { if (P.HasInRange(Plr)) { Plr.ItmInterface.SendEquiped(P); } } } } else if (Menu.Menu == 39) // Dye all items { byte Count = 0; for (UInt16 i = 0; i < ItemsInterface.MAX_EQUIPED_SLOT; ++i) { if (Plr.ItmInterface.Items[i] != null) // && is dyable { ++Count; } } byte PrimaryDye = Menu.Packet.GetUint8(); byte SecondaryDye = Menu.Packet.GetUint8(); ushort PrimaryDyeId = 0; ushort SecondaryDyeId = 0; uint cost = 0; // 255 = no dye selected if (PrimaryDye != 255) { cost += WorldMgr.GetDyes()[PrimaryDye].Price * Count; } // 255 = no dye selected if (SecondaryDye != 255) { cost += WorldMgr.GetDyes()[SecondaryDye].Price * Count; } if (!Plr.RemoveMoney(cost)) { Plr.SendLocalizeString("", GameData.Localized_text.TEXT_AUCTION_NOT_ENOUGH_MONEY); return; } // 255 = no dye selected if (PrimaryDye != 255) { PrimaryDyeId = WorldMgr.GetDyes()[PrimaryDye].Entry; } // 255 = no dye selected if (SecondaryDye != 255) { SecondaryDyeId = WorldMgr.GetDyes()[SecondaryDye].Entry; } for (UInt16 i = 0; i < ItemsInterface.MAX_EQUIPED_SLOT; ++i) { if (Plr.ItmInterface.Items[i] != null) // && is dyable { Plr.ItmInterface.DyeItem(Plr.ItmInterface.Items[i], PrimaryDyeId, SecondaryDyeId); } } if (Plr._IsActive && Plr.IsInWorld() && Plr._Loaded) { foreach (Player P in _PlayerRanged) { if (P.HasInRange(Plr)) { Plr.ItmInterface.SendEquiped(P); } } } } else { switch (InteractType) { case GameData.InteractType.INTERACTTYPE_FLIGHT_MASTER: { byte[] data = new byte[62] { 0x01, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x42, 0x39, 0x00, 0x00, 0x00, 0xC0, 0xE3, 0x03, 0x39, 0xA0, 0xD1, 0x6F, 0x00, 0xC8, 0xA8, 0x1D, 0x37, 0x28, 0x94, 0x79, 0x33, 0xB2, 0x24, 0x32, 0x44, 0xDB, 0xD7, 0x1C, 0x5D, 0x18, 0x5D, 0xDD, 0x1C, 0xA4, 0x0D, 0x00, 0x00, 0xA8, 0x6B, 0x21, 0x36, 0x11, 0x00, 0x00, 0x00, 0xC8, 0xD0, 0xAF, 0x3A, 0x78, 0xD1, 0x6F, 0x00 }; UInt16 Counts = 1; PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x0A); List <Zone_Taxi> Taxis = WorldMgr.GetTaxis(Plr); Out.WriteByte((byte)Taxis.Count); foreach (Zone_Taxi Taxi in Taxis) { Out.WriteUInt16(Counts); Out.WriteByte((byte)Taxi.Info.Pairing); Out.WriteUInt16(Taxi.Info.Price); Out.WriteUInt16(Taxi.Info.ZoneId); Out.WriteByte(1); ++Counts; } Out.Write(data); Plr.SendPacket(Out); } break; case GameData.InteractType.INTERACTTYPE_BANKER: { PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x1D); Out.WriteByte(0); // need to find bank buy box /* * Out = new PacketOut((byte)Opcodes.F_BAG_INFO); * Out.WriteByte(0x0F); * Out.WriteByte(ItmInterface.GetTotalSlot()); // Number of available slots // GetTotalSlot * Out.WriteUInt16((UInt16)ItemsInterface.INVENTORY_SLOT_COUNT); * Out.WriteByte(0); * Out.WriteUInt32R(ItmInterface.GetBagPrice());//GetBagPrice * * Out.WriteUInt16(2);// was 2 * Out.WriteByte(0x50);// was 0x50 * Out.WriteUInt16(0x08);// 0x08 * Out.WriteUInt16(0x60);// 0x60 * Out.WriteByte(0xEA);// 0xEA * Out.WriteUInt16(0); */ Plr.SendPacket(Out); } break; case GameData.InteractType.INTERACTTYPE_SIEGEWEAP: { // /* PacketOut Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); Out.WriteUInt16(Oid); Out.WriteByte(0x1D); Out.WriteByte(1); Out.WriteByte(1); Out.WriteByte(2); Out.WriteUInt16(0); Out.WriteByte(0x02); Out.WriteByte(0x4A); Out.WriteUInt16(0); Plr.SendPacket(Out); //21 D9 1D 01 01 02 00 00 02 4A 00 00 Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x18); Out.WriteByte(1); Out.WriteUInt16(0x005C); Out.WritePascalString(Name); Out.WriteByte(1); Out.WriteByte(0x3F); Out.WriteUInt16(0); Out.WriteByte(0x0E); //Out.WriteByte(0xA6);//(byte)Zone.ZoneId);//zone Out.WriteHexStringBytes("A6103C000400011E0000000002"); Out.WriteByte(0); // reload? Out.WriteUInt16(0x0B); Out.WriteByte(0); // Out.WriteHexStringBytes("1801005C0D456D706972652043616E6E6F6E013F00000EA6103C000400011E000000000200000B00"); Plr.SendPacket(Out); Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); Out.WriteUInt16(Oid); Out.WriteByte(0x21); Out.WriteByte(0x3C); // 3c=60 seconds 6000 14=20 seconds=2000 Out.Fill(0, 6); Plr.SendPacket(Out); Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); Out.WriteUInt16(Oid); Out.WriteByte(0x1C); Out.WriteByte(0x3); //14=20 seconds=2000 //Out.Fill(0, 6); Plr.SendPacket(Out); // 1D 01 01 02 00 00 8A DF 00 00 Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); Out.WriteUInt16(Oid); Out.WriteByte(0x1D); Out.WriteByte(1); Out.WriteByte(1); Out.WriteByte(2); Out.WriteUInt16(0); Out.WriteByte(0x8A); Out.WriteByte(0xDF); Out.WriteUInt16(0); Plr.SendPacket(Out); // */ /* * * // controll timer // size 13 * Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); * Out.WriteUInt16(Oid); * Out.WriteByte(0x21); * Out.WriteByte(0x3C);// 3c=60 seconds 6000 14=20 seconds=2000 * Out.Fill(0, 6); * Plr.SendPacket(Out); * * // size 7 * Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); * Out.WriteUInt16(Oid); * Out.WriteByte(0x1C); * Out.WriteByte(0x3);//14=20 seconds=2000 * //Out.Fill(0, 6); * Plr.SendPacket(Out); * * * */ /* * //size 15 * Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); * Out.WriteUInt16(Oid); * Out.WriteByte(0x1D); * Out.WriteByte(1); * Out.WriteByte(1); * Out.WriteByte(2); * Out.WriteUInt16(0); * Out.WriteByte(2); * Out.WriteByte(0x4A); * Out.WriteUInt16(0); * * // Out.WriteByte(0x3);//14=20 seconds=2000 * //Out.Fill(0, 6); * Plr.SendPacket(Out); */ /* * // target icon * Out = new PacketOut((byte)Opcodes.F_UPDATE_STATE); * Out.WriteUInt16(Oid); * Out.WriteByte(0x1C); * Out.WriteByte(0x3);//14=20 seconds=2000 * Out.Fill(0, 6); * Plr.SendPacket(Out); * // */ } break; case GameData.InteractType.INTERACTTYPE_GUILD_VAULT: { //Size = 43 // opens guild vault 5 slots PacketOut Out = new PacketOut((byte)Opcodes.F_GUILD_DATA); Out.WriteByte(0x18); // ?? //Out.WriteByte(0x1);// this shows a buy box Out.WriteByte(5); // number of vault boxs 0 to 5 Out.Fill(0, 8); // VAULT BOX 1 Out.WriteUInt16(0x003C); //Out.WriteByte(0x3C); Out.Fill(0, 4); // VAULT BOX 2 Out.WriteUInt16(0x003C); //Out.WriteByte(0x3C); Out.Fill(0, 4); // VAULT BOX 3 Out.WriteUInt16(0x003C); //Out.WriteByte(0x3C); Out.Fill(0, 4); // VAULT BOX 4 Out.WriteUInt16(0x003C); //Out.WriteByte(0x3C); Out.Fill(0, 4); // VAULT BOX 5 Out.WriteUInt16(0x003C); //Out.WriteByte(0x3C); Out.Fill(0, 4); Plr.SendPacket(Out); } break; //Heal Penalties structure i added case GameData.InteractType.INTERACTTYPE_HEALER: { // packet size 9 -3=6 PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x13); Out.WriteByte(1); // this the penalty points u have Out.WriteUInt16(0); // Out.WriteByte(0);// gold ? //Out.WriteByte(0);// gold Out.WriteByte(1); //1 silver Out.WriteByte(0); // 90??// brass Plr.SendPacket(Out); // this packet heals size 6 -3 =3 size Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x14); Out.WriteByte(1); // this the penalty points u have Out.WriteByte(90); // 90??// brass Plr.SendPacket(Out); } break; //10 00 03 2E 49 01 00 00 00 00 case GameData.InteractType.INTERACTTYPE_BARBERSHOP: { // packet size 13 -3=10 PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x10); Out.WriteByte(0); Out.WriteByte(3); // 3 Out.WriteByte(0x2E); //2E Out.WriteByte(0x49); //49 Out.WriteByte(1); // 1 // this is tokens that is required if set to 5 it says=(you dont have enough tokens in your inventory 5 token are required Out.WriteUInt32(0); Plr.SendPacket(Out); } break; //0E 01 01 00 case GameData.InteractType.INTERACTTYPE_GUILD_REGISTRAR: { // packet size 13 -3=10 PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x0E); Out.WriteByte(1); //0= sucess full /1= Out.WriteByte(1); //0= sucess full /1= Out.WriteByte(0); // Plr.SendPacket(Out); } break; case GameData.InteractType.INTERACTTYPE_AUCTIONEER: //INTERACTTYPE_AUCTIONEER = 13, { PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Out.WriteByte(0x1A); Out.WriteByte(0); Plr.SendPacket(Out); Out = new PacketOut((byte)Opcodes.F_AUCTION_SEARCH_RESULT); Out.WritePacketString(@"|00 00 9E 22 00 01 01 00 00 00 00 00 71 |..............q| |67 F1 00 01 82 52 00 00 00 00 00 00 27 10 03 43 |g....R......'..C| |68 6F 73 73 65 74 74 65 5E 4D 00 00 00 00 00 00 |hossette^M......| |00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| |00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF |................| |5F 39 00 00 01 4B B6 0F 30 00 00 00 00 00 00 00 |_9...K..0.......| |00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 |................| |00 00 00 00 00 00 06 00 14 00 14 00 00 00 00 00 |................| |00 00 00 00 00 00 00 10 57 69 6C 74 65 64 20 57 |........Wilted W| |69 6C 64 20 57 65 65 64 00 00 00 06 08 00 05 07 |ild Weed........| |00 04 01 00 00 02 00 00 04 00 00 0F 00 01 00 00 |................| |00 00 01 00 00 03 02 00 08 00 00 00 00 00 00 00 |................| |00 00 00 00 00 00 00 00 00 00 00 00 00 |............. |"); Plr.DispatchPacket(Out, true); // Out = new PacketOut((byte)Opcodes.F_AUCTION_BID_STATUS); } break; /////////added//////////////////////////////////////////////////////////////////////////////////////// // case GameData.InteractType.INTERACTTYPE_SIEGEWEAP: // { // PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); // Out.WriteByte(0x1A); // Out.WriteByte(0); // Plr.SendPacket(Out); // } break; default: { ushort MenuItems = 0; string Text = WorldMgr.GetCreatureText(Spawn.Entry); if (InteractType == GameData.InteractType.INTERACTTYPE_DYEMERCHANT) { MenuItems += 2; // Shop // 2 MenuItems += 16384; // Dyes // You need Text to see the 'dyes' option if (Text == String.Empty) { Text = "Selling a bit of everything here, come on have a look see!"; } //Text = "Forget about the drut he's selling; take a look at these beauties!"; ORIGNAL IN DB //Text = "Come and see what I have."; } bool HasQuests = QtsInterface.HasQuestInteract(Plr, this); if (HasQuests) { MenuItems += 64; // Quests } if (InteractType == GameData.InteractType.INTERACTTYPE_GUILD_REGISTRAR) { MenuItems += 128; // Guild Register =128 // Guild Regiser needs text if (Text == String.Empty) { Text = "Let's get started. To form a guild, you'll need to have a full group of six adventurers with you. None of you can belong to another guild. For a modest fee of only fifty silver I can create your guild."; } } if (InteractType == GameData.InteractType.INTERACTTYPE_TRAINER) { MenuItems += 1; // Trainer =1 // Theese were previously in there, nice to keep them unless theres info in creature_texts if (Text == String.Empty) { if (Plr.Realm == GameData.Realms.REALMS_REALM_ORDER) { Text = "Hail defender of the Empire! Your performance in battle is the only thing that keeps the hordes of Chaos at bay. Let's begin your training at once!"; } else { Text = "Learn these lessons well, for gaining the favor of the Raven god should be of utmost importance to you. Otherwise... There is always room for more Spawn within our ranks."; } } } if (InteractType == GameData.InteractType.INTERACTTYPE_BINDER) { MenuItems += 228; // Rally Point =256/ 228 is rally quest+influnce } if (Text.Length > 0) { MenuItems += 32; // Text } // VENDORS INVENTERY BOX PACKET PacketOut Out = new PacketOut((byte)Opcodes.F_INTERACT_RESPONSE); Log.Info("Creature", "npc = " + Name + " Oid = " + Oid + " MenuItems = " + MenuItems + " X= " + Spawn.WorldX + " Y= " + Spawn.WorldY + " Z= " + Spawn.WorldZ); Out.WriteByte(0); Out.WriteUInt16(Menu.Oid); Out.WriteUInt16(0); Out.WriteUInt16(MenuItems); if (HasQuests) { QtsInterface.BuildInteract(Plr, this, Out); } if (Text.Length > 0) { Out.WriteByte(0); // added and fixed the dye screen error, was missing this byte now working whoohooo } Out.WriteShortString(Text); // need to fix this ?? //Out.WritePascalString(Text);// added this because above gives error Out.WriteByte(0); // added this is on live server mite not need this byte Plr.SendPacket(Out); } break; } } } base.SendInteract(Plr, Menu); }