Example #1
0
        public override void OnDialog(L2Player player, int ask, int reply)
        {
            player.FolkNpc = this;
            short result;

            switch (ask)
            {
            case 0:
                NotifyAction(player);
                break;

            case -201:
                switch (reply)
                {
                case 0:
                    NotifyAction(player);
                    break;

                case 1:                                       //doors
                    if (player.Clan.LeaderId == player.ObjId) //TODO privs
                    {
                        player.SendPacket(new NpcHtmlMessage(player, _ai.FnDoor, ObjId));
                    }
                    break;

                case 2:         //banish
                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnBanish, ObjId));
                    break;

                case 3:         //functions
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnDecoFunction, ObjId);
                    htm.Replace("<?HPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeHpregen));
                    htm.Replace("<?MPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeMpregen));
                    htm.Replace("<?XPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeXprestore));
                    player.SendPacket(htm);
                }
                break;

                case 4:         // warehouse
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnWarehouse, ObjId);
                    htm.Replace("<?agit_lease?>", _hideout.RentCost);
                    htm.Replace("<?pay_time?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    player.SendPacket(htm);
                }
                break;

                case 5:         // manage
                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnManage, ObjId));
                    break;

                case 7:         //use buff
                {
                    int level = _hideout.GetFuncLevel(AgitManagerAi.DecotypeBuff);
                    if (level == 0)
                    {
                        player.SendPacket(new NpcHtmlMessage(player, _ai.FnFuncDisabled, ObjId));
                    }
                    else
                    {
                        NpcHtmlMessage htm = new NpcHtmlMessage(player, $"{_ai.FnAgitBuff}_{level}.htm", ObjId);
                        htm.Replace("<?MPLeft?>", (int)CurMp);
                        player.SendPacket(htm);
                    }
                }
                break;

                case 12:         //use itemcreate
                {
                    int level = _hideout.GetFuncLevel(AgitManagerAi.DecotypeItem);
                    if (level == 0)
                    {
                        player.SendPacket(new NpcHtmlMessage(player, _ai.FnFuncDisabled, ObjId));
                    }
                    else
                    {
                        NpcData.Instance.Buylist(player, this, (short)level);
                    }
                }
                break;

                case 51:         // manage regen
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnManageRegen, ObjId);
                    htm.Replace("<?HPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeHpregen));
                    htm.Replace("<?HPCost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeHpregen));
                    htm.Replace("<?HPExpire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?HPReset?>", string.Empty);

                    htm.Replace("<?MPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeMpregen));
                    htm.Replace("<?MPCost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeMpregen));
                    htm.Replace("<?MPExpire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?MPReset?>", string.Empty);

                    htm.Replace("<?XPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeXprestore));
                    htm.Replace("<?XPCost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeXprestore));
                    htm.Replace("<?XPExpire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?XPReset?>", string.Empty);
                    player.SendPacket(htm);
                }
                break;

                case 52:         // manage etc
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnManageEtc, ObjId);
                    htm.Replace("<?TPDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeTeleport));
                    htm.Replace("<?TPCost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeTeleport));
                    htm.Replace("<?TPExpire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?TPReset?>", string.Empty);

                    htm.Replace("<?BFDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeBuff));
                    htm.Replace("<?BFCost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeBuff));
                    htm.Replace("<?BFExpire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?BFReset?>", string.Empty);

                    htm.Replace("<?ICDepth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeItem));
                    htm.Replace("<?ICCost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeItem));
                    htm.Replace("<?ICExpire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?ICReset?>", string.Empty);
                    player.SendPacket(htm);
                }
                break;

                case 53:         // manage deco
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnManageDeco, ObjId);
                    htm.Replace("<?7_Depth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypeCurtain));
                    htm.Replace("<?7_Cost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypeCurtain));
                    htm.Replace("<?7_Expire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?7_Reset?>", string.Empty);

                    htm.Replace("<?11_Depth?>", _hideout.GetFuncDepth(AgitManagerAi.DecotypePlatform));
                    htm.Replace("<?11_Cost?>", _hideout.GetCurrentDecoCost(AgitManagerAi.DecotypePlatform));
                    htm.Replace("<?11_Expire?>", _hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.Replace("<?11_Reset?>", string.Empty);
                    player.SendPacket(htm);
                }
                break;
                }

                break;

            case -203:
                switch (reply)
                {
                case 1:         //open doors
                    foreach (L2Door door in _hideout.doors.Where(door => door.Closed != 0))
                    {
                        door.Closed = 0;
                        door.BroadcastUserInfo();
                    }

                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnAfterDoorOpen, ObjId));
                    break;

                case 2:         //close
                    foreach (L2Door door in _hideout.doors.Where(door => door.Closed != 1))
                    {
                        door.Closed = 1;
                        door.BroadcastUserInfo();
                    }

                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnAfterDoorClose, ObjId));
                    break;
                }

                break;

            case -208:     //buffs
                result = UseBuff(reply, player);

                switch (result)
                {
                case 5:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnNotEnoughMp, ObjId);
                    htm.Replace("<?MPLeft?>", (int)CurMp);
                    player.SendPacket(htm);
                }
                break;

                case 1:
                case 4:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnNeedCoolTime, ObjId);
                    htm.Replace("<?MPLeft?>", (int)CurMp);
                    player.SendPacket(htm);
                }
                break;

                case -1:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnAfterBuff, ObjId);
                    htm.Replace("<?MPLeft?>", (int)CurMp);
                    player.SendPacket(htm);
                }
                break;
                }

                break;

            case -219:
                switch (reply)
                {
                case 1:         //banish action
                    _hideout.Banish();
                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnAfterBanish, ObjId));
                    break;
                }

                break;

            case -270:
            {
                string val = reply.ToString();
                int    lvl;
                int    id;
                if (val.Length == 5)
                {
                    id  = int.Parse(val.Remove(2));
                    lvl = int.Parse(val.Substring(3));
                }
                else
                {
                    lvl = int.Parse(val.Substring(2));
                    id  = int.Parse(val.Remove(1));
                }

                NpcHtmlMessage htm = new NpcHtmlMessage(player, $"agitdeco__{id}.htm", ObjId);
                htm.Replace("<?AgitDecoCost?>", _hideout.GetDecoCost(id, lvl));
                htm.Replace("<?AgitDecoEffect?>", _hideout.GetDecoEffect(id, lvl));
                htm.Replace("<?AgitDecoSubmit?>", reply);
                player.SendPacket(htm);
            }
            break;

            case -271:
            {
                result = 0;
                switch (reply)
                {
                case 1004:         //hp 80%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeHpregen, 4);
                    break;

                case 1006:         //hp 120%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeHpregen, 6);
                    break;

                case 1009:         //hp 180%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeHpregen, 9);
                    break;

                case 1012:         //hp 240%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeHpregen, 12);
                    break;

                case 1015:         //hp 300%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeHpregen, 15);
                    break;

                case 2001:         // mp 5%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeMpregen, 1);
                    break;

                case 2003:         //mp 15%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeMpregen, 3);
                    break;

                case 2006:         //mp 30%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeMpregen, 6);
                    break;

                case 2008:         //mp 40%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeMpregen, 8);
                    break;

                case 4003:         // xp 15%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeXprestore, 3);
                    break;

                case 4005:         //xp 25%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeXprestore, 5);
                    break;

                case 4007:         //xp 35%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeXprestore, 7);
                    break;

                case 4010:         //xp 50%
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeXprestore, 10);
                    break;

                case 5001:         // teleport lv 1
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeTeleport, 1);
                    break;

                case 5002:         //teleport lv 2
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeTeleport, 2);
                    break;

                case 7001:
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeCurtain, 1);
                    break;

                case 7002:
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeCurtain, 2);
                    break;

                case 9003:         // buff lv 3
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeBuff, 3);
                    break;

                case 9005:         //buff lv 5
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeBuff, 5);
                    break;

                case 9007:         // buff lv 7
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeBuff, 7);
                    break;

                case 9008:         //buff lv 8
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeBuff, 8);
                    break;

                case 11001:         // deco 11 lv 1
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypePlatform, 1);
                    break;

                case 11002:         //deco 11 lv 2
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypePlatform, 2);
                    break;

                case 12001:         // itemcreate lv 1
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeItem, 1);
                    break;

                case 12002:         //itemcreate lv 2
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeItem, 2);
                    break;

                case 12003:         // itemcreate lv 3
                    result = _hideout.MofidyFunc(AgitManagerAi.DecotypeItem, 3);
                    break;
                }

                switch (result)
                {
                case 1:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, _ai.FnDecoAlreadySet, ObjId);
                    htm.Replace("<?AgitDecoEffect?>", "Decoration");         //TODO name
                    player.SendPacket(htm);
                }
                break;

                case 2:
                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnFailtoSetDeco, ObjId));
                    break;

                case 5:
                    player.SendPacket(new NpcHtmlMessage(player, _ai.FnAfterSetDeco, ObjId));
                    BroadcastHideoutUpdate(player);
                    break;
                }
            }

            break;
            }
        }
        public override void onDialog(L2Player player, int ask, int reply)
        {
            player.FolkNpc = this;
            short result = 0;

            switch (ask)
            {
            case 0:
                NotifyAction(player);
                break;

            case -201:
                switch (reply)
                {
                case 0:
                    NotifyAction(player);
                    break;

                case 1:                                       //doors
                    if (player.Clan.LeaderID == player.ObjID) //TODO privs
                    {
                        player.sendPacket(new NpcHtmlMessage(player, ai.fnDoor, ObjID));
                    }
                    else
                    {
                        player.teleport(hideout.outsideLoc[0], hideout.outsideLoc[1], hideout.outsideLoc[2]);
                    }
                    break;

                case 2:         //banish
                    player.sendPacket(new NpcHtmlMessage(player, ai.fnBanish, ObjID));
                    break;

                case 3:         //functions
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnDecoFunction, ObjID);
                    htm.replace("<?HPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_hpregen));
                    htm.replace("<?MPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_mpregen));
                    htm.replace("<?XPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_xprestore));
                    player.sendPacket(htm);
                }
                break;

                case 4:         // warehouse
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnWarehouse, ObjID);
                    htm.replace("<?agit_lease?>", hideout.RentCost);
                    htm.replace("<?pay_time?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    player.sendPacket(htm);
                }
                break;

                case 5:         // manage
                    player.sendPacket(new NpcHtmlMessage(player, ai.fnManage, ObjID));
                    break;

                case 7:         //use buff
                {
                    int level = hideout.GetFuncLevel(AgitManagerAI.decotype_buff);
                    if (level == 0)
                    {
                        player.sendPacket(new NpcHtmlMessage(player, ai.fnFuncDisabled, ObjID));
                    }
                    else
                    {
                        NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnAgitBuff + "_" + level + ".htm", ObjID);
                        htm.replace("<?MPLeft?>", (int)CurMP);
                        player.sendPacket(htm);
                    }
                }
                break;

                case 12:         //use itemcreate
                {
                    int level = hideout.GetFuncLevel(AgitManagerAI.decotype_item);
                    if (level == 0)
                    {
                        player.sendPacket(new NpcHtmlMessage(player, ai.fnFuncDisabled, ObjID));
                    }
                    else
                    {
                        NpcData.getInstance().buylist(player, this, (short)level);
                    }
                }
                break;

                case 51:         // manage regen
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnManageRegen, ObjID);
                    htm.replace("<?HPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_hpregen));
                    htm.replace("<?HPCost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_hpregen));
                    htm.replace("<?HPExpire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?HPReset?>", "");

                    htm.replace("<?MPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_mpregen));
                    htm.replace("<?MPCost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_mpregen));
                    htm.replace("<?MPExpire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?MPReset?>", "");

                    htm.replace("<?XPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_xprestore));
                    htm.replace("<?XPCost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_xprestore));
                    htm.replace("<?XPExpire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?XPReset?>", "");
                    player.sendPacket(htm);
                }
                break;

                case 52:         // manage etc
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnManageEtc, ObjID);
                    htm.replace("<?TPDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_teleport));
                    htm.replace("<?TPCost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_teleport));
                    htm.replace("<?TPExpire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?TPReset?>", "");

                    htm.replace("<?BFDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_buff));
                    htm.replace("<?BFCost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_buff));
                    htm.replace("<?BFExpire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?BFReset?>", "");

                    htm.replace("<?ICDepth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_item));
                    htm.replace("<?ICCost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_item));
                    htm.replace("<?ICExpire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?ICReset?>", "");
                    player.sendPacket(htm);
                }
                break;

                case 53:         // manage deco
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnManageDeco, ObjID);
                    htm.replace("<?7_Depth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_curtain));
                    htm.replace("<?7_Cost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_curtain));
                    htm.replace("<?7_Expire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?7_Reset?>", "");

                    htm.replace("<?11_Depth?>", hideout.GetFuncDepth(AgitManagerAI.decotype_platform));
                    htm.replace("<?11_Cost?>", hideout.GetCurrentDecoCost(AgitManagerAI.decotype_platform));
                    htm.replace("<?11_Expire?>", hideout.PayTime.ToString("yyyy/MM/dd HH:mm"));
                    htm.replace("<?11_Reset?>", "");
                    player.sendPacket(htm);
                }
                break;
                }
                break;

            case -203:
                switch (reply)
                {
                case 1:         //open doors
                    foreach (L2Door door in hideout.doors)
                    {
                        if (door.Closed == 0)
                        {
                            continue;
                        }

                        door.Closed = 0;
                        door.broadcastUserInfo();
                    }

                    player.sendPacket(new NpcHtmlMessage(player, ai.fnAfterDoorOpen, ObjID));
                    break;

                case 2:         //close
                    foreach (L2Door door in hideout.doors)
                    {
                        if (door.Closed == 1)
                        {
                            continue;
                        }

                        door.Closed = 1;
                        door.broadcastUserInfo();
                    }

                    player.sendPacket(new NpcHtmlMessage(player, ai.fnAfterDoorClose, ObjID));
                    break;
                }
                break;

            case -208:     //buffs
                result = useBuff(reply, player);

                switch (result)
                {
                case 5:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnNotEnoughMP, ObjID);
                    htm.replace("<?MPLeft?>", (int)CurMP);
                    player.sendPacket(htm);
                }
                break;

                case 1:
                case 4:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnNeedCoolTime, ObjID);
                    htm.replace("<?MPLeft?>", (int)CurMP);
                    player.sendPacket(htm);
                }
                break;

                case -1:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnAfterBuff, ObjID);
                    htm.replace("<?MPLeft?>", (int)CurMP);
                    player.sendPacket(htm);
                }
                break;
                }
                break;

            case -219:
                switch (reply)
                {
                case 1:         //banish action
                    hideout.Banish();
                    player.sendPacket(new NpcHtmlMessage(player, ai.fnAfterBanish, ObjID));
                    break;
                }
                break;

            case -270:
            {
                string val = reply + "";
                int    lvl = 0;
                int    id  = 0;
                if (val.Length == 5)
                {
                    id  = int.Parse(val.Remove(2));
                    lvl = int.Parse(val.Substring(3));
                }
                else
                {
                    lvl = int.Parse(val.Substring(2));
                    id  = int.Parse(val.Remove(1));
                }

                NpcHtmlMessage htm = new NpcHtmlMessage(player, "agitdeco__" + id + ".htm", ObjID);
                htm.replace("<?AgitDecoCost?>", hideout.GetDecoCost(id, lvl));
                htm.replace("<?AgitDecoEffect?>", hideout.GetDecoEffect(id, lvl));
                htm.replace("<?AgitDecoSubmit?>", reply);
                player.sendPacket(htm);
            }
            break;

            case -271:
            {
                result = 0;
                switch (reply)
                {
                case 1004:             //hp 80%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_hpregen, 4);
                    break;

                case 1006:             //hp 120%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_hpregen, 6);
                    break;

                case 1009:             //hp 180%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_hpregen, 9);
                    break;

                case 1012:             //hp 240%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_hpregen, 12);
                    break;

                case 1015:             //hp 300%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_hpregen, 15);
                    break;

                case 2001:            // mp 5%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_mpregen, 1);
                    break;

                case 2003:             //mp 15%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_mpregen, 3);
                    break;

                case 2006:             //mp 30%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_mpregen, 6);
                    break;

                case 2008:             //mp 40%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_mpregen, 8);
                    break;

                case 4003:            // xp 15%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_xprestore, 3);
                    break;

                case 4005:             //xp 25%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_xprestore, 5);
                    break;

                case 4007:             //xp 35%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_xprestore, 7);
                    break;

                case 4010:             //xp 50%
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_xprestore, 10);
                    break;

                case 5001:            // teleport lv 1
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_teleport, 1);
                    break;

                case 5002:             //teleport lv 2
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_teleport, 2);
                    break;

                case 7001:
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_curtain, 1);
                    break;

                case 7002:
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_curtain, 2);
                    break;

                case 9003:            // buff lv 3
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_buff, 3);
                    break;

                case 9005:             //buff lv 5
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_buff, 5);
                    break;

                case 9007:            // buff lv 7
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_buff, 7);
                    break;

                case 9008:             //buff lv 8
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_buff, 8);
                    break;

                case 11001:            // deco 11 lv 1
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_platform, 1);
                    break;

                case 11002:             //deco 11 lv 2
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_platform, 2);
                    break;

                case 12001:            // itemcreate lv 1
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_item, 1);
                    break;

                case 12002:             //itemcreate lv 2
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_item, 2);
                    break;

                case 12003:            // itemcreate lv 3
                    result = hideout.MofidyFunc(AgitManagerAI.decotype_item, 3);
                    break;
                }

                switch (result)
                {
                case 1:
                {
                    NpcHtmlMessage htm = new NpcHtmlMessage(player, ai.fnDecoAlreadySet, ObjID);
                    htm.replace("<?AgitDecoEffect?>", "Decoration");                 //TODO name
                    player.sendPacket(htm);
                }
                break;

                case 2:
                    player.sendPacket(new NpcHtmlMessage(player, ai.fnFailtoSetDeco, ObjID));
                    break;

                case 5:
                    player.sendPacket(new NpcHtmlMessage(player, ai.fnAfterSetDeco, ObjID));
                    broadcastHideoutUpdate(player);
                    break;
                }
            }
            break;
            }
        }