public void pendulumkill(Player plr, Pendulum p) { plr.ReceiveDamage(p, int.MaxValue); PacketOut damageOut = new PacketOut((byte)Opcodes.F_CAST_PLAYER_EFFECT, 24); damageOut.WriteUInt16(p.Oid); damageOut.WriteUInt16(plr.Oid); damageOut.WriteUInt16(23584); // Terminate damageOut.WriteByte(0); damageOut.WriteByte(0); // DAMAGE EVENT damageOut.WriteByte(7); damageOut.WriteZigZag(-30000); damageOut.WriteByte(0); plr.DispatchPacketUnreliable(damageOut, true, p); }
public void createPenulums() { GameObject_proto proto; GameObjectService.GameObjectProtos.TryGetValue(98908, out proto); Firetrap ft; Pendulum go; DartTrap dt; //left side go = new Pendulum(proto, 2, 348784, 282876, 12659); _Pendulums[0] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 0, 348664, 282876, 12659); _Pendulums[2] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 0, 348544, 282876, 12659); _Pendulums[4] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 2, 348424, 282876, 12659); _Pendulums[6] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 2, 348304, 282876, 12659); _Pendulums[8] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 0, 348184, 282876, 12659); _Pendulums[10] = go; Region.AddObject(go, ZoneID, true); //rightside go = new Pendulum(proto, 0, 348784, 280031, 12659); _Pendulums[1] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 2, 348664, 280031, 12659); _Pendulums[3] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 0, 348544, 280031, 12659); _Pendulums[5] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 2, 348424, 280031, 12659); _Pendulums[7] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 2, 348304, 280031, 12659); _Pendulums[9] = go; Region.AddObject(go, ZoneID, true); go = new Pendulum(proto, 0, 348184, 280031, 12659); _Pendulums[11] = go; Region.AddObject(go, ZoneID, true); //firetraps //frontrow GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341050, 276799, 13371); _Firetrap[0] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341050, 276932, 13371); _Firetrap[1] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341050, 277329, 13371); _Firetrap[2] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341050, 277197, 13371); _Firetrap[3] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341050, 277065, 13371); _Firetrap[4] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341182, 276799, 13371); _Firetrap[5] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341182, 276932, 13371); _Firetrap[6] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341182, 277329, 13371); _Firetrap[7] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341182, 277197, 13371); _Firetrap[8] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341182, 277065, 13371); _Firetrap[9] = ft; Region.AddObject(ft, ZoneID, true); //backrow GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342397, 276799, 13371); _Firetrap[10] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342397, 276932, 13371); _Firetrap[11] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342397, 277329, 13371); _Firetrap[12] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342397, 277197, 13371); _Firetrap[13] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342397, 277065, 13371); _Firetrap[14] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342529, 276799, 13371); _Firetrap[15] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342529, 276932, 13371); _Firetrap[16] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342529, 277329, 13371); _Firetrap[17] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342529, 277197, 13371); _Firetrap[18] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342529, 277065, 13371); _Firetrap[19] = ft; Region.AddObject(ft, ZoneID, true); //mainfield GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341458, 276866, 13406); _Firetrap[20] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341458, 277131, 13406); _Firetrap[21] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341458, 276999, 13406); _Firetrap[22] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341458, 277263, 13406); _Firetrap[23] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341590, 276866, 13406); _Firetrap[24] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341590, 277131, 13406); _Firetrap[25] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341590, 276999, 13406); _Firetrap[26] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341590, 277263, 13406); _Firetrap[27] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341722, 276866, 13406); _Firetrap[28] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341722, 277131, 13406); _Firetrap[29] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341722, 276999, 13406); _Firetrap[30] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341722, 277263, 13406); _Firetrap[31] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341854, 276866, 13406); _Firetrap[32] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341854, 277131, 13406); _Firetrap[33] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341854, 276999, 13406); _Firetrap[34] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341854, 277263, 13406); _Firetrap[35] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341986, 276866, 13406); _Firetrap[36] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341986, 277131, 13406); _Firetrap[37] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341986, 276999, 13406); _Firetrap[38] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 341986, 277263, 13406); _Firetrap[39] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342118, 276866, 13406); _Firetrap[40] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342118, 277131, 13406); _Firetrap[41] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342118, 276999, 13406); _Firetrap[42] = ft; Region.AddObject(ft, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100490, out proto); ft = new Firetrap(proto, 342118, 277263, 13406); _Firetrap[43] = ft; Region.AddObject(ft, ZoneID, true); //Darttrap GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 10, 340385, 281620, 13050); _Darttrap[0] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 2, 340385, 281290, 13050); _Darttrap[1] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 11, 339883, 281603, 13085); _Darttrap[2] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 3, 339883, 281302, 13085); _Darttrap[3] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 6, 339675, 281456, 13085); _Darttrap[4] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 9, 339469, 281601, 13085); _Darttrap[5] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 17, 339469, 281304, 13085); _Darttrap[6] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 14, 339064, 281596, 13050); _Darttrap[7] = dt; Region.AddObject(dt, ZoneID, true); GameObjectService.GameObjectProtos.TryGetValue(100489, out proto); dt = new DartTrap(proto, 6, 339064, 281296, 13050); _Darttrap[8] = dt; Region.AddObject(dt, ZoneID, true); /* * * foreach (var p in GameObjectService.GameObjectSpawns.Where(e => e.Value.ZoneId == 179)) * { * if (p.Value.Entry == 98908) * { * GameObject go = new GameObject(p.Value); * * _Objects.Add(go); * //Region.AddObject(go, zoneid, true); * * } * } * */ }