public override void onTalkToNpcQM(L2Player player, L2Citizen npc, int reply) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (reply == 1 && npcId == sentry_roseline) { player.addItem(q_roseline_paper, 1); player.changeQuestStage(questId, 2); htmltext = "sentry_roseline_q0008_0201.htm"; } else if (reply == 1 && npcId == harne) { player.takeItem(q_roseline_paper, 1); player.changeQuestStage(questId, 3); htmltext = "harne_q0008_0301.htm"; } else if (reply == 3 && npcId == jasmine) { htmltext = "jasmine_q0008_0401.htm"; player.addItem(escape_scroll_giran, 1); player.addItem(q_symbol_of_traveler, 1); player.finishQuest(questId); } player.ShowHtm(htmltext, npc); }
public override void onTalkToNpc(L2Player player, L2Citizen npc, int cond) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == trader_liesel) { switch (cond) { case 1: htmltext = "trader_liesel_q0014_0104.htm"; break; } } else if (npcId == explorer_ghost_a) { switch (cond) { case 1: if (player.hasItem(q_letter_to_explorer)) { htmltext = "explorer_ghost_a_q0014_0101.htm"; } break; } } player.ShowHtm(htmltext, npc); }
internal void SetNpc(int id) { if (npcs == null) { npcs = new SortedList <int, L2Citizen>(); } NpcTemplate t = NpcTable.Instance.getNpcTemplate(id); L2Citizen npc = null; switch (t.NpcId) { case 35461: npc = new L2HideoutManager(this); break; case 35462: npc = new L2Doormen(this); break; } npc.setTemplate(t); StructureSpawn ss = StructureTable.Instance.GetSpawn(id); npc.X = ss.x; npc.Y = ss.y; npc.Z = ss.z; npc.Heading = ss.heading; npcs.Add(t.NpcId, npc); }
private void observeIt(L2Player player, L2Citizen npc, int reply) { int[] dx = null; foreach (int[] d in data) { if (d[1] == reply) { dx = d; break; } } if (player.getAdena() < dx[2]) { player.sendSystemMessage(279);//You do not have enough adena. player.sendActionFailed(); return; } player.reduceAdena(dx[2], true, true); player.clearKnowns(true); player._obsx = player.X; player._obsy = player.Y; player._obsz = player.Z; player.sendPacket(new ObservationMode(dx[3], dx[4], dx[5])); }
public override void onTalkToNpcQM(L2Player player, L2Citizen npc, int reply) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (reply == 1 && npcId == ariel) { player.addItem(q_recommendation_elf, 1); player.changeQuestStage(questId, 2); htmltext = "ariel_q0007_0201.htm"; } else if (reply == 1 && npcId == ozzy) { if (player.hasItem(q_recommendation_elf)) { htmltext = "ozzy_q0007_0301.htm"; player.takeItem(q_recommendation_elf, 1); player.changeQuestStage(questId, 3); } } else if (reply == 3 && npcId == mint) { htmltext = "mint_q0007_0401.htm"; player.addItem(escape_scroll_giran, 1); player.addItem(q_symbol_of_traveler, 1); player.finishQuest(questId); } player.ShowHtm(htmltext, npc); }
public override void onTalkToNpcQM(L2Player player, L2Citizen npc, int reply) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (reply == 1 && npcId == baul) { player.addItem(q_letter_paulo, 1); htmltext = "baul_q0006_0201.htm"; player.changeQuestStage(questId, 2); } else if (reply == 1 && npcId == sir_collin_windawood) { if (player.hasItem(q_letter_paulo)) { htmltext = "sir_collin_windawood_q0006_0301.htm"; player.takeItem(q_letter_paulo, 1); player.changeQuestStage(questId, 3); } else { htmltext = "sir_collin_windawood_q0006_0302.htm"; } } else if (reply == 3 && npcId == rapunzel) { htmltext = "rapunzel_q0006_0401.htm"; player.addItem(escape_scroll_giran, 1); player.addItem(q_symbol_of_traveler, 1); player.finishQuest(questId); } player.ShowHtm(htmltext, npc); }
public void roll_spoil(L2Player caster, L2Citizen npc) { Random rn = new Random(); List <DropItem> rolled = new List <DropItem>(); foreach (DropItem itm in spoil) { if (rn.Next(1000000) <= (int)(itm.rate * 10000)) { rolled.Add(itm); } } if (rolled.Count == 0) { return; } foreach (DropItem item in rolled) { int count = rn.Next((int)item.min, (int)item.max); caster.Inventory.addItem(item.template, count, 0, true, true); } }
public void RequestTeleportList(L2Citizen npc, L2Player player, int groupId, int itemId) { if (!Teleports.npcs.ContainsKey(npc.Template.NpcId)) { player.ShowHtmPlain("no teleports available for you", npc); player.sendActionFailed(); return; } ab_teleport_group group = Teleports.npcs[npc.Template.NpcId].groups[groupId]; StringBuilder sb = new StringBuilder("&$556;<br><br>"); foreach (ab_teleport_entry e in group._teles.Values) { string cost = ""; int id = itemId != -1 ? itemId : e.itemId; if (player.Level >= 40) { cost = " - " + e.cost + " &#" + id + ";"; } sb.Append("<a action=\"bypass -h teleport_next?ask=" + groupId + "&reply=" + e.id + "\" msg=\"811;" + e.name + "\">" + e.name + "" + cost + "</a><br1>"); } player.TeleportPayID = itemId; player.ShowHtmPlain(sb.ToString(), npc); }
public void buylist(L2Player player, L2Citizen trader, short reply) { if (!_shops.ContainsKey(trader.Template.NpcId)) { player.sendMessage("you shop was not found"); player.sendActionFailed(); return; } ND_shop shop = _shops[trader.Template.NpcId]; GameServerNetworkPacket pk; if (!shop.lists.ContainsKey(reply)) { reply -= 2; // примерка if (!shop.lists.ContainsKey(reply)) { player.sendMessage("your shop id was just wrong " + reply); player.sendActionFailed(); return; } else { pk = new ShopPreviewList(player, shop.lists[reply], reply); } } else { player.sendPacket(new ExBuySellList_Buy(player, shop.lists[reply], 1.10, 1.0, reply)); player.sendPacket(new ExBuySellList_Sell(player)); } }
public void roll_qdrop(L2Citizen npc, L2Character killer) { Random rn = new Random(); List <DropItem> rolled = new List <DropItem>(); foreach (DropItem itm in qdrop) { if (rn.Next(1000000) <= (int)(itm.rate * 10000)) { rolled.Add(itm); } } if (rolled.Count == 0) { return; } foreach (DropItem item in rolled) { int count = rn.Next((int)item.min, (int)item.max); ((L2Player)killer).Inventory.addItem(item.template, count, 0, true, true); } }
public override void onTalkToNpc(L2Player player, L2Citizen npc, int cond) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == redry) { if (cond == 2) { htmltext = "redry_q0003_06.htm"; player.takeItem(onyx_beast_eye, 1); player.takeItem(taint_stone, 1); player.takeItem(succubus_blood, 1); player.addItem(scrl_of_ench_am_d, 1); player.finishQuest(questId); return; } else { htmltext = "redry_q0003_04.htm"; } } player.ShowHtm(htmltext, npc); }
public override void onAccept(L2Player player, L2Citizen npc) { player.questAccept(new QuestInfo(this)); player.ShowHtm("miner_bolter_q0005_03.htm", npc); player.addItem(bolters_list, 1); player.addItem(bolters_smelly_socks, 1); }
public override void onDialog(L2Player player, int ask, int reply, L2Citizen npc) { switch (ask) { case -1425: { switch (reply) { case 1: if (player.Level < 75) { player.ShowHtm(fnLowLevel, npc); } else if (player.getAdena() >= 150000) { player.InstantTeleportWithItem(-149406, 255247, -85, 57, 150000); } else { player.ShowHtm(fnNotHaveAdena, npc); } break; } } break; } }
public override void onTalkToNpc(L2Player player, L2Citizen npc, int cond) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == trader_vladimir) { if (cond != 0) { htmltext = "trader_vladimir_q0019_0105.htm"; } } else if (npcId == beast_herder_tunatun) { if (player.hasItem(q_youngmeat_of_beast)) { htmltext = "beast_herder_tunatun_q0019_0101.htm"; } else { htmltext = "beast_herder_tunatun_q0019_0202.htm"; } } player.ShowHtm(htmltext, npc); }
public override void onTalkToNpcQM(L2Player player, L2Citizen npc, int reply) { if (reply == 1) { int cond = player.getQuestCond(questId); switch (cond) { case 1: player.ShowHtm("ossian_q0246_0201.htm", npc); player.changeQuestStage(questId, 2); break; case 5: player.ShowHtm("ossian_q0246_0401.htm", npc); player.takeItem(q_ring_waterbinder, 1); player.takeItem(q_necklace_evergreen, 1); player.takeItem(q_staff_rainsong, 1); player.addItemQuest(q_red_dust, 1); player.changeQuestStage(questId, 6); break; } } else if (reply == 3) { player.ShowHtm("magister_ladd_q0246_0501.htm", npc); player.takeItem(q_red_dust, 1); player.addItemQuest(q_caradines_letter2, 1); player.addExpSp(719843, 0, true); player.finishQuest(questId); } }
public static void onReply(L2Player player, int reply, L2Citizen npc) { switch (reply) { case 0: //new clan { if (player.Level < 10) { player.ShowHtm("pl002.htm", npc); return; } if (player.Clan != null) { if (player.Clan.LeaderID == player.ObjID) { player.ShowHtm("pl003.htm", npc); } else { player.ShowHtm("pl004.htm", npc); } return; } player.ShowHtm("pl005.htm", npc); } break; case 1: //Повысить player.ShowHtm("pl013.htm", npc); break; case 2: //Распустить break; case 3: //Восстановить break; case 4: //Умения break; case 5: //Управлять Академией break; case 6: //Управлять Подразделениями Стражей break; case 9: //УправлятьПодразделениями Рыцарей break; case 13: //.Передать Полномочия Лидера Клана break; case 100: //main player.ShowHtm("pl001.htm", npc); break; } }
public override void onTalkToNpc(L2Player player, L2Citizen npc, int cond) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == mineral_trader_fundin) { switch (cond) { case 1: htmltext = "mineral_trader_fundin_q0013_0105.htm"; break; } } else if (npcId == warsmith_vulcan) { switch (cond) { case 1: if (player.hasItem(q_package_to_vulcan)) { htmltext = "warsmith_vulcan_q0013_0101.htm"; } break; } } player.ShowHtm(htmltext, npc); }
public override void onTalkToNpc(L2Player player, L2Citizen npc, int cond) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == caradine) { htmltext = "caradine_q0246_0105.htm"; } else if (npcId == ossian) { switch (cond) { case 1: htmltext = "ossian_q0246_0101.htm"; break; case 2: if (!player.hasAllOfThisItems(q_ring_waterbinder, q_necklace_evergreen)) { htmltext = "ossian_q0246_0203.htm"; } else { htmltext = "ossian_q0246_0202.htm"; } break; case 3: htmltext = "ossian_q0246_0301.htm"; player.changeQuestStage(questId, 4); break; case 4: htmltext = "ossian_q0246_0401.htm"; break; case 5: if (player.hasAllOfThisItems(q_necklace_evergreen, q_ring_waterbinder, q_staff_rainsong)) { htmltext = "ossian_q0246_0303.htm"; } else { htmltext = "ossian_q0246_0304.htm"; } break; } } else if (npcId == magister_ladd) { if (cond == 5) { htmltext = "magister_ladd_q0246_0401.htm"; } } player.ShowHtm(htmltext, npc); }
public override void onTalkToNpc(L2Player player, L2Citizen npc, int cond) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == mint) { switch (cond) { case 1: htmltext = "mint_q0007_0105.htm"; break; case 3: htmltext = "mint_q0007_0301.htm"; break; } } else if (npcId == ariel) { switch (cond) { case 1: if (!player.hasItem(q_recommendation_elf)) { htmltext = "ariel_q0007_0101.htm"; } break; case 2: htmltext = "ariel_q0007_0202.htm"; break; } } else if (npcId == ozzy) { switch (cond) { case 2: if (player.hasItem(q_recommendation_elf)) { htmltext = "ozzy_q0007_0201.htm"; } else { htmltext = "ozzy_q0007_0302.htm"; } break; case 3: htmltext = "ozzy_q0007_0303.htm"; break; } } player.ShowHtm(htmltext, npc); }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.Level < 2) { player.ShowHtm("daring_q0001_01.htm", npc); return; } player.ShowHtm("daring_q0001_02.htm", npc, questId); }
public override void onAccept(L2Player player, L2Citizen npc) { if (!player.hasItem(darings_letter)) { player.addItem(darings_letter); } player.questAccept(new QuestInfo(this)); player.ShowHtm("daring_q0001_06.htm", npc); }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.Level < 74) { player.ShowHtm("elder_kadun_zu_ketra_q0606_0103.htm", npc); return; } player.ShowHtm("elder_kadun_zu_ketra_q0606_0101.htm", npc, questId); }
public override void tryAccept(L2Player player, L2Citizen npc) { if (!player.subActive() || !player.hasItem(q_caradines_letter1) || player.Level < 65) { player.ShowHtm("caradine_q0246_0102.htm", npc); return; } player.ShowHtm("caradine_q0246_0101.htm", npc, questId); }
public override void onAccept(L2Player player, L2Citizen npc) { if (!player.hasItem(arujiens_letter1)) { player.addItem(arujiens_letter1); } player.questAccept(new QuestInfo(this)); player.ShowHtm("arujien_q0002_04.htm", npc); }
public override void onTalkToNpcQM(L2Player player, L2Citizen npc, int reply) { int npcId = npc.Template.NpcId; string htmltext = no_action_required; if (npcId == sir_eric_rodemai) { switch (reply) { case 2: if (player.hasItem(q_themis_scale)) { player.Clan.UpdatePledgeNameValue(1000); player.takeItem(q_themis_scale, 1); htmltext = "sir_eric_rodemai_q0508_19.htm"; } else { htmltext = "sir_eric_rodemai_q0508_10.htm"; } break; case 4: htmltext = "sir_eric_rodemai_q0508_12.htm"; break; case 5: htmltext = "sir_eric_rodemai_q0508_13.htm"; break; case 6: htmltext = "sir_eric_rodemai_q0508_14.htm"; break; case 7: htmltext = "sir_eric_rodemai_q0508_15.htm"; break; case 8: htmltext = "sir_eric_rodemai_q0508_15a.htm"; break; case 100: case 110: htmltext = "sir_eric_rodemai_q0508_04.htm"; break; case 101: htmltext = "sir_eric_rodemai_q0508_07.htm"; break; } } player.ShowHtm(htmltext, npc); }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.BaseClass.ClassId.ClassRace == ClassRace.DWARF && player.Level >= 3) { player.ShowHtm("elder_balanki_q0010_0101.htm", npc, questId); } else { player.ShowHtm("elder_balanki_q0010_0102.htm", npc); } }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.BaseClass.ClassId.ClassRace == ClassRace.DARK_ELF && player.Level >= 3) { player.ShowHtm("jasmine_q0008_0101.htm", npc, questId); } else { player.ShowHtm("jasmine_q0008_0102.htm", npc); } }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.BaseClass.ClassId.ClassRace == ClassRace.HUMAN && player.Level >= 3) { player.ShowHtm("rapunzel_q0006_0101.htm", npc, questId); } else { player.ShowHtm("rapunzel_q0006_0102.htm", npc); } }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.Level >= 2) { player.ShowHtm("miner_bolter_q0005_02.htm", npc, questId); } else { player.ShowHtm("miner_bolter_q0005_01.htm", npc); } }
public override void tryAccept(L2Player player, L2Citizen npc) { if (player.Level >= 63) { player.ShowHtm("trader_vladimir_q0019_0101.htm", npc); } else { player.ShowHtm("trader_vladimir_q0019_0103.htm", npc); } }