Exemple #1
0
    public void OnQuest(ActorPC pc)
    {
        if (GetQuestStepStatus(pc, 355, 35501) == StepStatus.Active)
        {
        UpdateQuest(pc, 355, 35501, StepStatus.Completed);
        UpdateIcon(pc);
        RemoveNavPoint(pc, 355);
        NPCSpeech(pc, 3);
        NPCChat(pc, 0);
        }

        if (GetQuestStepStatus(pc, 356, 35601) == StepStatus.Active)
        {
        UpdateQuest(pc, 356, 35601, StepStatus.Completed);
        UpdateIcon(pc);
        RemoveNavPoint(pc, 356);
        AddNavPoint(356, 35602, 13, 1025, -2093f, -17903f, 681f); //Gretchel
        SendNavPoint(pc);
        NPCSpeech(pc, 3);
        NPCChat(pc, 0);
        }

        if (GetQuestStepStatus(pc, 369, 36902) == StepStatus.Active)
        {
        UpdateQuest(pc, 369, 36902, StepStatus.Completed);
        UpdateIcon(pc);
        RemoveNavPoint(pc, 369);
        QuestCompleted(pc, 369);
        NPCSpeech(pc, 3);
        NPCChat(pc, 0);
        SetReward(pc, new rewardfunc(OnReward));
        }
    }
Exemple #2
0
 private static void CalcAtkPC(ref ActorPC pc)
 {
     WeaponInfo weapon=null;
     Weapon activeweapon;
     uint weapondmg = 0;
     activeweapon = SagaDB.Items.WeaponFactory.GetActiveWeapon(pc);
     if (activeweapon != null) weapon = WeaponFactory.GetWeaponInfo((byte)activeweapon.type, activeweapon.level);
     if (weapon != null)
     {
         int min, max;
         min = (int)weapon.minatk + pc.str + pc.BattleStatus.strbonus + pc.BattleStatus.atkminbonus;
         max = (int)weapon.maxatk + ((pc.str + pc.BattleStatus.strbonus) * 2) + pc.BattleStatus.atkmaxbonus;
         if (min > max) min = max;
         weapondmg = (uint)Global.Random.Next(min, max);
     }
     else
     {
         int min, max;
         min = pc.str + pc.BattleStatus.strbonus + pc.BattleStatus.atkminbonus;
         max = (pc.str + pc.BattleStatus.strbonus) * 2 + pc.BattleStatus.atkmaxbonus;
         if (min > max) min = max;
         weapondmg = (uint)Global.Random.Next(min,max);
     }
     pc.BattleStatus.atk = (int)weapondmg + pc.BattleStatus.atkskill + pc.BattleStatus.atkbonus;
     if (pc.BattleStatus.atk < 0) pc.BattleStatus.atk = 0;
 }
Exemple #3
0
    public void OnQuest(ActorPC pc)
    {
        if (GetQuestStepStatus(pc, 356, 35602) == StepStatus.Active)
        {
        UpdateQuest(pc, 356, 35602, StepStatus.Completed);
        UpdateIcon(pc);
        RemoveNavPoint(pc, 356);
        AddNavPoint(356, 35603, 12, 1024, -8408f, -34514f, 6913f); //Pretan
        SendNavPoint(pc);
        NPCSpeech(pc, 3);
        NPCChat(pc, 0);
        }

        if (GetQuestStepStatus(pc, 368, 36802) == StepStatus.Active && CountItem(pc, 4210) > 0)
        {
        UpdateQuest(pc, 368, 36802, StepStatus.Completed);
        UpdateIcon(pc);
        TakeItem(pc, 4210, 1);
        RemoveNavPoint(pc, 368);
        AddNavPoint(368, 36803, 13, 1021, -9408f, -6118f, -3949f); // Derek
        SendNavPoint(pc);
        NPCSpeech(pc, 3);
        NPCChat(pc, 0);
        }

        if (GetQuestStepStatus(pc, 356, 35604) == StepStatus.Active)
        {
        UpdateQuest(pc, 356, 35604, StepStatus.Completed);
        UpdateIcon(pc);
        QuestCompleted(pc, 356);
        NPCSpeech(pc, 3);
        NPCChat(pc, 0);
        SetReward(pc, new rewardfunc(OnReward));
        }
    }
Exemple #4
0
 public void OnQuest(ActorPC pc)
 {
     UpdateQuest(pc, 396, 39601, StepStatus.Completed);
     UpdateIcon(pc);
     RemoveNavPoint(pc, 396);
     NPCChat(pc, 3919);
 }
Exemple #5
0
        public void OnQuest(ActorPC pc)
        {
            if (GetQuestStepStatus(pc, 177, 17703) == StepStatus.Active)
            {
                UpdateQuest(pc, 177, 17703, StepStatus.Completed);
                UpdateIcon(pc);
                RemoveNavPoint(pc, 177);
                QuestCompleted(pc, 177);
                NPCSpeech(pc, 823);
                NPCChat(pc, 0);
                SetReward(pc, new rewardfunc(OnReward));
            }

            if (GetQuestStepStatus(pc, 178, 17801) == StepStatus.Active)
            {
                UpdateQuest(pc, 178, 17801, StepStatus.Completed);
                UpdateIcon(pc);
                NPCSpeech(pc, 823);
                NPCChat(pc, 0);
            }

            if (GetQuestStepStatus(pc, 178, 17803) == StepStatus.Active)
            {
                UpdateQuest(pc, 178, 17803, StepStatus.Completed);
                UpdateIcon(pc);
                RemoveNavPoint(pc, 178);
                AddNavPoint(178, 17804, 5, 1012, 13931.36f, 74893.79f, 5049.054f); //Monika
                SendNavPoint(pc);
                NPCSpeech(pc, 823);
                NPCChat(pc, 0);
            }
        }
Exemple #6
0
        public void OnQuest(ActorPC pc)
        {
            if (GetQuestStepStatus(pc, 182, 18201) == StepStatus.Active)
            {
                UpdateQuest(pc, 182, 18201, StepStatus.Completed);
                UpdateIcon(pc);
                NPCSpeech(pc, 232);
                NPCChat(pc, 0);
            }

            if (GetQuestStepStatus(pc, 182, 18203) == StepStatus.Active)
            {
                UpdateQuest(pc, 182, 18203, StepStatus.Completed);
                RemoveNavPoint(pc, 182);
                QuestCompleted(pc, 182);
                NPCSpeech(pc, 232);
             	        NPCChat(pc, 0);
                SetReward(pc, new rewardfunc(OnReward));
              	    }

            if (GetQuestStepStatus(pc, 183, 18301) == StepStatus.Active)
            {
                UpdateQuest(pc, 183, 18301, StepStatus.Completed);
                UpdateIcon(pc);
                RemoveNavPoint(pc, 183);
                SendNavPoint(pc, 183, 1068, 22528f, -33632f, -4064f);
             	        NPCSpeech(pc, 232);
                NPCChat(pc, 0);
            }
        }
Exemple #7
0
    public void OnQuest(ActorPC pc)
    {
        if (GetQuestStepStatus(pc, 398, 39803) == StepStatus.Active)
        {
            if (CountItem(pc, 2666) >= 1)
            {
                TakeItem(pc, 2666, 1);
                UpdateQuest(pc, 398, 39803, StepStatus.Completed);
                QuestCompleted(pc, 398);
                UpdateIcon(pc);
                NPCSpeech(pc, 3936);
                NPCChat(pc, 0);
                SetReward(pc, new rewardfunc(OnReward));

            }
        }
        if (GetQuestStepStatus(pc, 399, 39901) == StepStatus.Active)
        {
            UpdateQuest(pc, 399, 39901, StepStatus.Completed);
            UpdateIcon(pc);
            RemoveNavPoint(pc, 399);
            SendNavPoint(pc, 399, 1148, 17425f, 10411f, 1951f);
            GiveItem(pc, 9344, 1);
            NPCSpeech(pc, 3939);
            NPCChat(pc, 0);
        }
    }
Exemple #8
0
 public static void EquiptLoseDurabilityOnDeath(ActorPC pc)
 {
     LoseDura(pc, SagaDB.Items.EQUIP_SLOT.BODY, 0.1f);
     LoseDura(pc, SagaDB.Items.EQUIP_SLOT.HANDS, 0.1f);
     LoseDura(pc, SagaDB.Items.EQUIP_SLOT.PANTS, 0.1f);
     LoseDura(pc, SagaDB.Items.EQUIP_SLOT.LEGS, 0.1f);
 }
Exemple #9
0
 public void OnReward(ActorPC pc, uint QID)
 {
     switch (QID)
     {
         case 399:
             GiveExp(pc, 200, 40);
             GiveZeny(pc, 6);
             RemoveNavPoint(pc, 399);
             RemoveQuest(pc, 399);
             AddStep(400, 40001);
             AddStep(400, 40002);
             QuestStart(pc);
             UpdateIcon(pc);
             break;
         case 400:
             GiveExp(pc, 202, 75);
             GiveZeny(pc, 10);
             GiveItem(pc, 91, 1);
             RemoveNavPoint(pc, 400);
             RemoveQuest(pc, 400);
             AddStep(401, 40101);
             AddStep(401, 40102);
             AddStep(401, 40103);
             QuestStart(pc);
             UpdateIcon(pc);
             SendNavPoint(pc, 401, 1148, 17425f, 10411f, 1951f);
             break;
     }
 }
Exemple #10
0
 public void StartEvent(ActorPC pc, uint Step)
 {
     Packets.Server.ScenarioEvent p = new SagaMap.Packets.Server.ScenarioEvent();
     p.SetStep(Step);
     p.SetActor(pc.id);
     SendPacket(pc, p);
 }
Exemple #11
0
    public override void OnQuestConfirmed(ActorPC pc, uint QuestID)
    {
        if (IfGotQuest(pc, QuestID)) return;
        switch (QuestID)
        {
            case 407:
                AddStep(407, 40701);
                AddStep(407, 40702);
                QuestStart(pc);
                break;
            case 1:
                AddStep(1,101);
                AddStep(1,102);
                QuestStart(pc);
                break;
            case 2:
                AddStep(2, 201);
                AddStep(2, 202);
                QuestStart(pc);
                break;
            case 24:
                AddStep(24, 2401);
                AddStep(24, 2402);
                QuestStart(pc);
                break;
            case 25:
                AddStep(25, 2501);
                AddStep(25, 2502);
                QuestStart(pc);
                SendNavPoint(pc, 25, 1002, 1460f, -13664f, -6472f);
                break;
            case 29:
                AddStep(29, 2901);
                AddStep(29, 2902);
                QuestStart(pc);
                break;
        case 156:
        AddStep(156, 15601);
        AddStep(156, 15602);
        SendNavPoint(pc, 156, 1003, 12484f, -15132f, -4779f);
        QuestStart(pc);
        break;
            case 323:
                AddStep(323, 32301);
                AddStep(323, 32302);
                AddStep(323, 32303);
                QuestStart(pc);
                SendNavPoint(pc, 323, 1000, -12092f, -6490f, -8284f);
                break;
            case 9:
                AddStep(9, 901);
                AddStep(9, 902);
                AddStep(9, 903);
                QuestStart(pc);
                SendNavPoint(pc, 9, 1005, -1216f, 3328f, -10144f);
                break;

        }
        SendQuestList(pc);
    }
Exemple #12
0
 public void OnQuest(ActorPC pc)
 {
     if (GetQuestStepStatus(pc, 402, 40202) == StepStatus.Active)
     {
         if (CountItem(pc, 2630) >= 3)
         {
             TakeItem(pc, 2630, 3);
             UpdateQuest(pc, 402, 40202, StepStatus.Completed);
             QuestCompleted(pc, 402);
             UpdateIcon(pc);
             NPCSpeech(pc, 3954);
             NPCChat(pc, 0);
             SetReward(pc, new rewardfunc(OnReward));
         }
     }
     if (GetQuestStepStatus(pc, 406, 40601) == StepStatus.Active)
     {
         UpdateQuest(pc, 406, 40601, StepStatus.Completed);
         NPCSpeech(pc, 4557);
         GiveItem(pc, 4245, 1);
         NPCChat(pc, 0);
         UpdateIcon(pc);
         RemoveNavPoint(pc, 406);
     }
 }
Exemple #13
0
 public static void Warp( ActorPC pc, byte mapid )
 {
     ActorEventHandlers.PC_EventHandler eh = (SagaMap.ActorEventHandlers.PC_EventHandler)pc.e;
     Map map;
     if( !MapManager.Instance.GetMap( mapid, out map ) ) return;
     float[] coord = map.GetRandomPos();
     eh.C.map.SendActorToMap( pc, mapid, coord[0], coord[1], coord[2] );
 }
Exemple #14
0
 public static void SetCurrentScenario(ActorPC pc,uint sceID, uint scenario)
 {
     Packets.Server.InitScenario p = new SagaMap.Packets.Server.InitScenario();
     p.SetUnknown(sceID);
     p.SetScenario(scenario);
     pc.Scenario = scenario;
     SendPacket(pc, p);
 }
Exemple #15
0
 public void ScenarioStepComplete(ActorPC pc, uint Step, uint NextStep)
 {
     Packets.Server.ScenarioStepComplete p = new SagaMap.Packets.Server.ScenarioStepComplete();
     pc.Scenario = NextStep;
     p.SetStep(Step);
     p.SetNextStep(NextStep);
     SendPacket(pc, p);
 }
Exemple #16
0
 public void EquiqItem(ActorPC pc, Item item, bool unequip)
 {
     if (item.Bonus == null) return;
     if (item.durability == 0) return;
     foreach (SagaDB.Items.Bonus i in item.Bonus)
     {
         AddBonus(pc, i, BonusType.Equipment, unequip, (uint)item.id);
     }
 }
Exemple #17
0
 /// <summary>
 /// Add EXP to a Passive Skill of a player
 /// </summary>
 /// <param name="pc">Player</param>
 /// <param name="StatusName">Status Name</param>
 /// <param name="skillbaseID">BaseID of a certain skill</param>
 /// <param name="exp">Maximum of exp to add</param>
 public static void AddPassiveSkillEXP(ActorPC pc, string StatusName, uint skillbaseID, uint exp)
 {
     Tasks.PassiveSkillStatus task;
     if (pc.Tasks.ContainsKey(StatusName))
     {
         task = (Tasks.PassiveSkillStatus)pc.Tasks[StatusName];
         AddSkillEXP(ref pc, (uint)(skillbaseID + task.level), exp);
     }
 }
Exemple #18
0
 public void OnReward(ActorPC pc, uint QID)
 {
     if (QID == 420)
     {
     GiveExp(pc, 2370, 680);
     GiveZeny(pc, 1453);
     RemoveQuest(pc, 420);
     }
 }
Exemple #19
0
 public void Step2501(ActorPC pc)
 {
     UpdateQuest(pc, 25, 2501, StepStatus.Completed);
     UpdateIcon(pc);
     NPCSpeech(pc, 229);
     NPCChat(pc, 0);
     RemoveNavPoint(pc, 25);
     SendNavPoint(pc, 25, 1005, -1216f, 3328f, -10144f);
 }
Exemple #20
0
 public void OnReward(ActorPC pc, uint QID)
 {
     if (QID == 426)
     {
         GiveExp(pc, 2379, 886);
         GiveZeny(pc, 1853);
         GiveItem(pc, 1700115, 1);
         RemoveQuest(pc, 426);
     }
 }
Exemple #21
0
 public void OnQuest(ActorPC pc)
 {
     if (GetQuestStepStatus(pc, 397, 39701) == StepStatus.Active)
     {
         UpdateQuest(pc, 397, 39701, StepStatus.Completed);
         SendNavPoint(pc, 397, 1067, 2646f, 18759f, 2820f);
         UpdateIcon(pc);
         NPCChat(pc, 0);
     }
 }
Exemple #22
0
 public void OnReward(ActorPC pc, uint QID)
 {
     if (QID == 401)
     {
         GiveExp(pc, 140, 50);
         GiveZeny(pc, 5);
         RemoveNavPoint(pc, 401);
         RemoveQuest(pc, 401);
     }
 }
Exemple #23
0
 public override void OnOpen(ActorPC pc)
 {
     if (GetQuestStepStatus(pc, 9, 902) == StepStatus.Active && CountItem(pc, 2622) == 0)
     {
         ClearNPCItem();
         AddNPCItem(2622);
         SendLootList(pc);
     }
     SetAnimation(pc, 2);
 }
Exemple #24
0
 public void Step602(ActorPC pc)
 {
     UpdateQuest(pc, 6, 602, StepStatus.Completed);
     GiveItem(pc, 2619, 1);
     UpdateIcon(pc);
     NPCSpeech(pc, 48);
     NPCChat(pc, 0);
     RemoveNavPoint(pc, 6);
     SendNavPoint(pc, 6, 10023, 12484f, -15132f, -4779f);
 }
Exemple #25
0
 public override void OnOpen(ActorPC pc)
 {
     if (GetQuestStepStatus(pc, 166, 16602) == StepStatus.Active)
     {
        		ClearNPCItem();
             AddNPCItem(3978);
             SendLootList(pc);
     }
     SetAnimation(pc, 2);
 }
Exemple #26
0
 public void OnReward(ActorPC pc, uint QID)
 {
     if (QID == 369)
     {
     GiveExp(pc, 2142, 262);
     GiveZeny(pc, 792);
     GiveItem(pc, 1700114, 5);
     RemoveQuest(pc, 369);
     }
 }
Exemple #27
0
 public void CalcEquipBonus(ActorPC pc)
 {
     ClearBonus(pc);
     Actor actor = (Actor)pc;
     Skills.SkillHandler.CalcBattleStatus(ref actor);
     foreach (Item i in pc.inv.EquipList.Values)
     {
         if (i.durability > 0) EquiqItem(pc, i, false);
     }
 }
Exemple #28
0
 public void OnReward(ActorPC pc, uint QID)
 {
     if (QID == 167)
     {
         GiveExp(pc, 0, 448);
         GiveZeny(pc, 212);
         GiveItem(pc, 1700113, 2);
         RemoveQuest(pc, 167);
     }
 }
Exemple #29
0
 public void Step33402(ActorPC pc)
 {
     if (CountItem(pc, 2654) == 0)
     {
         UpdateIcon(pc);
         GiveItem(pc, 2654, 1);
         TakeItem(pc, 2654, 1);
         NPCSpeech(pc, 241);
         NPCChat(pc, 0);
     }
 }
Exemple #30
0
 public void OnQuest(ActorPC pc)
 {
     if (GetQuestStepStatus(pc, 158, 15804) == StepStatus.Active)
     {
         UpdateQuest(pc, 158, 15804, StepStatus.Completed);
         UpdateIcon(pc);
         RemoveNavPoint(pc, 158);
         NPCSpeech(pc, 232);
         NPCChat(pc, 0);
     }
 }