public override void onAction(L2Player player) { player.sendMessage(asString()); // TimeSpan ts = dtstart - DateTime.Now; // player.sendMessage("timems "+(ts.TotalMilliseconds)); bool newtarget = false; if (player.CurrentTarget == null) { player.CurrentTarget = this; newtarget = true; } else { if (player.CurrentTarget.ObjID != this.ObjID) { player.CurrentTarget = this; newtarget = true; } } if (newtarget) { player.sendPacket(new MyTargetSelected(ObjID, player.Level - Template.Level)); StatusUpdate su = new StatusUpdate(ObjID); su.add(StatusUpdate.CUR_HP, (int)CurHP); su.add(StatusUpdate.MAX_HP, (int)CharacterStat.getStat(TEffectType.b_max_hp)); player.sendPacket(su); } else { player.AICharacter.Attack(this); } }
public override void setTemplate(NpcTemplate template) { Template = template; CStatsInit(); CharacterStat.setTemplate(template); CurHP = CharacterStat.getStat(skills2.TEffectType.b_max_hp); MaxTime = 1200; //20 минут CurrentTime = MaxTime; Level = 35; }
public override void onActionShift(L2Player player) { string text = ""; text += "pdef: " + CharacterStat.getStat(TEffectType.p_physical_defense) + "<br>"; text += "patk: " + CharacterStat.getStat(TEffectType.p_physical_attack) + "<br>"; text += "curhp: " + CurHP + "<br>"; text += "maxhp: " + CharacterStat.getStat(TEffectType.b_max_hp) + "<br>"; text += "mdef: " + CharacterStat.getStat(TEffectType.p_magical_attack) + "<br>"; text += "matk: " + CharacterStat.getStat(TEffectType.p_magical_defense) + "<br>"; player.ShowHtmPlain(text, null); player.sendActionFailed(); }
public virtual void setTemplate(NpcTemplate template) { Template = template; ObjID = IdFactory.Instance.nextId(); CStatsInit(); CharacterStat.setTemplate(template); CurHP = CharacterStat.getStat(skills2.TEffectType.b_max_hp); Name = template.Name; AIProcessor = new citizen(); AIProcessor.dialog = new Dictionary <string, string>(); AIProcessor.dialog.Add("fnHi", "lector001.htm"); AIProcessor.dialog.Add("fnFeudInfo", "gludio_feud_manager001.htm"); AIProcessor.dialog.Add("fnNoFeudInfo", "farm_messenger002.htm"); AIProcessor.myself = this; }