public override void onKill(L2Player player, L2Warrior mob, int cond) { switch (mob.Template.NpcId) { case varka_silenos_grunt: case varka_silenos_scout: case varka_silenos_hunter: case varka_silenos_shaman: case varka_silenos_priest: case varka_silenos_warrior: case varka_silenos_medium: case varka_silenos_sergeant: case varka_silenos_seer: case varka_silenos_archmage: case varka_silenos_officer: case varka_silenos_overseer: case varka_silenos_general: case varka_high_magus: case varka_soothsayer: { player.addItemQuest(q_barka_mane, 1); } break; } }
// вызывается клановым игроком при убийстве босса. [player._clan.notifyBossDeath(boss)] public override void onKill(L2Player player, L2Warrior mob, int stage) { switch (mob.Template.NpcId) { case palibati_queen_themis: player.addItemQuest(q_themis_scale, 1); break; } }
public void OnDie(L2Warrior warrior, L2Character killer) { Obj = null; if (RespawnTimer == null) { RespawnTimer = new System.Timers.Timer(); RespawnTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnRespawnTime); } RespawnTimer.Interval = Respawn; RespawnTimer.Enabled = true; }
public override void onKill(L2Player player, L2Warrior mob, int stage) { if (stage == 1) { switch (mob.Template.NpcId) { case onyx_beast: { if (!player.hasItem(onyx_beast_eye)) { player.addItemQuest(onyx_beast_eye, 1); } } break; case tainted_zombie: case stink_zombie: { if (!player.hasItem(taint_stone)) { player.addItemQuest(taint_stone, 1); } } break; case least_succubus: case least_succubus_turen: case least_succubus_tilfo: { if (!player.hasItem(succubus_blood)) { player.addItemQuest(succubus_blood, 1); } } break; } if (player.hasAllOfThisItems(onyx_beast_eye, taint_stone, succubus_blood)) { player.changeQuestStage(questId, 2); } } }
public override void onKill(L2Player player, L2Warrior mob, int stage) { if (stage == 2) { Random rn = new Random(); switch (mob.Template.NpcId) { case brilliant_prophet: { if (!player.hasItem(q_ring_waterbinder) && rn.Next(100) <= 15) { player.addItemQuest(q_ring_waterbinder, 1); } } break; case brilliant_justice: { if (!player.hasItem(q_necklace_evergreen) && rn.Next(100) <= 10) { player.addItemQuest(q_necklace_evergreen, 1); } } break; } } else if (stage == 4) { switch (mob.Template.NpcId) { case blinding_fire_barakiel: { if (!player.hasItem(q_staff_rainsong)) { player.addItemQuest(q_staff_rainsong, 1); } } break; } } }
public L2Object spawnNpc(int id, int x, int y, int z, int h) { NpcTemplate template = this.getNpcTemplate(id); if (template == null) { Console.WriteLine("null template " + id); return(null); } L2Warrior o = new L2Warrior(); o.setTemplate(template); //switch (template._type) //{ // case NpcTemplate.L2NpcType.warrior: // case NpcTemplate.L2NpcType.zzoldagu: // case NpcTemplate.L2NpcType.herb_warrior: // case NpcTemplate.L2NpcType.boss: // o = new L2Warrior(); // ((L2Warrior)o).setTemplate(template); // break; // default: // o = new L2Citizen(); // ((L2Citizen)o).setTemplate(template); // break; //} o.X = x; o.Y = y; o.Z = z; o.Heading = h; o.SpawnX = x; o.SpawnY = y; o.SpawnZ = z; L2World.Instance.RealiseEntry(o, null, true); o.onSpawn(); return(o); }
public L2Object SpawnOne(int id, int x, int y, int z, int h) { //NpcTemplate template = new NpcTemplate(new StatsSet()); //NpcTable.Instance.GetNpcTemplate(id); L2Warrior o = new L2Warrior { X = x, Y = y, Z = z, Heading = h, SpawnX = x, SpawnY = y, SpawnZ = z }; //o.setTemplate(template); //switch (template._type) //{ // case NpcTemplate.L2NpcType.warrior: // case NpcTemplate.L2NpcType.zzoldagu: // case NpcTemplate.L2NpcType.herb_warrior: // case NpcTemplate.L2NpcType.boss: // o = new L2Warrior(); // ((L2Warrior)o).setTemplate(template); // break; // default: // o = new L2Npc(); // ((L2Npc)o).setTemplate(template); // break; //} L2World.Instance.AddObject(o); o.OnSpawn(); return(o); }
public virtual void onKill(L2Player player, L2Warrior mob, int stage) { }
protected internal override void use(L2Player admin, string alias) { // double dis = Calcs.calculateDistance(admin, admin._currentTarget, true); // admin.sendMessage("dis "+dis); // foreach (L2SkillCoolTime ct in admin._reuse.Values) // { // ct.forcedStop(); // } // admin._reuse.Clear(); // admin.updateReuse(); string s = alias.Split(' ')[1]; if (s == "1") { admin.AbnormalBitMaskEvent = int.Parse(alias.Split(' ')[2]); admin.updateAbnormalEventEffect(); } else if (s == "2") { int listid = int.Parse(alias.Split(' ')[2]); MultiSell.getInstance().showList(admin, null, listid); } else if (s == "4") { FortressOfTheDead d = new FortressOfTheDead(); d.start(); } else if (s == "5") { if (np == null) { int[] x = new int[] { -81166, -80913, -81952, -82554 }; int[] y = new int[] { 245118, 246031, 246551, 245619 }; np = new ZoneNPoly(x, y, -3727, -3727); } int count = int.Parse(alias.Split(' ')[2]); for (int i = 0; i < count; i++) { int[] rloc = this.rndXYZ(); // NpcTable.getInstance().spawnNpc("lector", rloc[0], rloc[1], rloc[3], new Random().Next(65000)); } } else if (s == "6") { L2Citizen npc = (L2Citizen)admin.CurrentTarget; if (npc.Template.DropData == null) { admin.sendMessage("no drops at this npc"); } else { npc.Template.DropData.showInfo(admin); } } else if (s == "7") { L2Citizen npc = (L2Citizen)admin.CurrentTarget; if (npc.Template.DropData == null) { admin.sendMessage("no drops at this npc"); } else { npc.Template.roll_drops(npc, admin); } } else if (s == "8") { L2Citizen npc = (L2Citizen)admin.CurrentTarget; if (npc.Template.DropData == null) { admin.sendMessage("no drops at this npc"); } else { npc.doDie(admin, false); npc.Template.roll_drops(npc, admin); } } else if (s == "9") { admin.destx = admin.X + 200; admin.desty = admin.Y + 200; admin.destz = admin.Z; admin.sendPacket(new CharMoveToLocation(admin)); } else if (s == "11") { admin.Boat.destx = -121385; admin.Boat.desty = 261660; admin.Boat.destz = -3610; admin.Boat.OnRoute = true; admin.Boat.broadcastPacket(new VehicleStarted(admin.Boat.ObjID, 1)); admin.Boat.broadcastPacket(new VehicleDeparture(admin.Boat, 400, 1800)); } else if (s == "12") { L2Boat boat = new L2Boat(); boat.X = -96622; boat.Y = 261660; boat.Z = -3610; L2World.Instance.RealiseEntry(boat, null, true); boat.onSpawn(); } else if (s == "13") { MonsterRace.Instance.startRace(); } else if (s == "17") { admin.Mount(NpcTable.Instance.getNpcTemplate(13146)); } else if (s == "18") { int count = int.Parse(alias.Split(' ')[2]); TransformManager.getInstance().transformTo(count, admin, 30); } else if (s == "19") { admin.sstt = int.Parse(alias.Split(' ')[2]); admin.broadcastUserInfo(); } else if (s == "20") { int sx = int.Parse(alias.Split(' ')[2]); admin.broadcastPacket(new MagicSkillUse(admin, admin, sx, 1, 0)); } else if (s == "21") { int sx = int.Parse(alias.Split(' ')[2]); admin.broadcastPacket(new MagicSkillUse(admin, admin, 261, 1, 1000, sx)); adm = admin; if (t == null) { t = new System.Timers.Timer(); t.Elapsed += new System.Timers.ElapsedEventHandler(t_Elapsed); } t.Interval = 900; t.Enabled = true; } else if (s == "22") { adm = admin; L2Warrior war = (L2Warrior)NpcTable.Instance.spawnNpc(21003, 14107, 182287, -3586, 32500); war.destx = 13107; war.desty = 182287; war.destz = -3586; admin.sendPacket(new CharMoveToLocation(war)); war.dtstart = DateTime.Now; admin.ChangeTarget(war); if (t == null) { t = new System.Timers.Timer(); t.Elapsed += new System.Timers.ElapsedEventHandler(t_Elapsed); } t.Interval = 2000 * 12; t.Enabled = true; } // admin._privateStoreType = byte.Parse(alias.Split(' ')[1]); // admin.broadcastUserInfo(); // int val = int.Parse(alias.Split(' ')[1]); // StatusUpdate su = new StatusUpdate(admin); // su.add(val, 5000); // admin.sendPacket(su); }
public override void onKill(L2Player player, L2Warrior mob, int cond) { if (cond == 6) { return; } switch (mob.Template.NpcId) { case varka_silenos_grunt: case varka_silenos_footman: case varka_silenos_scout: case varka_silenos_hunter: case varka_silenos_shaman: { if (cond >= 1) { if (rn.Next(100) <= 80) { player.addItemQuest(q_barka_badge_grunt, 1); } } } break; case varka_silenos_priest: case varka_silenos_warrior: case varka_silenos_medium: case varka_silenos_mage: case varka_silenos_sergeant: case varka_silenos_general: case varka_elite_guard: { if (cond >= 2) { if (rn.Next(100) <= 80) { player.addItemQuest(q_barka_badge_captn, 1); } } } break; case varka_silenos_seer: case varka_silenos_archmage: case varka_silenos_officer: case varka_silenos_overseer: case varka_high_magus: case varka_high_guard: case varka_soothsayer: case soothsayers_escort: case soothsayers_apostle: { if (cond >= 3) { if (rn.Next(100) <= 80) { player.addItemQuest(q_barka_badge_officer, 1); } } } break; } }