Ejemplo n.º 1
0
        public override bool WhisperReceive(GameLiving source, string str)
        {
            if (!base.WhisperReceive(source, str))
            {
                return(false);
            }
            if (!(source is GamePlayer))
            {
                return(false);
            }
            GamePlayer t = (GamePlayer)source;

            TurnTo(t.X, t.Y);
            switch (str)
            {
            case "backdoorwinner":

                Say("Ah a Gamemaster, you guys will bankrupt me you know!");

                InventoryItem generic0  = new InventoryItem();
                ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfCloak");
                generic0.CopyFrom(tgeneric0);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);

                InventoryItem generic1  = new InventoryItem();
                ItemTemplate  tgeneric1 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfNeck");
                generic1.CopyFrom(tgeneric1);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic1);

                InventoryItem generic2  = new InventoryItem();
                ItemTemplate  tgeneric2 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfJewel");
                generic2.CopyFrom(tgeneric2);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic2);

                InventoryItem generic3  = new InventoryItem();
                ItemTemplate  tgeneric3 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfBelt");
                generic3.CopyFrom(tgeneric3);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic3);

                InventoryItem generic4  = new InventoryItem();
                ItemTemplate  tgeneric4 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfRing");
                generic4.CopyFrom(tgeneric4);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic4);

                InventoryItem generic5  = new InventoryItem();
                ItemTemplate  tgeneric5 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfBand");
                generic5.CopyFrom(tgeneric5);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic5);

                InventoryItem generic6  = new InventoryItem();
                ItemTemplate  tgeneric6 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfBracer");
                generic6.CopyFrom(tgeneric6);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic6);

                InventoryItem generic7  = new InventoryItem();
                ItemTemplate  tgeneric7 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfWristBand");
                generic7.CopyFrom(tgeneric7);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic7);
                t.UpdatePlayerStatus();
                SendReply(t, "Here you are !");

                break;

            case "Play":
                if (t.BountyPoints >= 10000)
                {
                    int RandLottery = Util.Random(1, 60);    //Creates a random number between 1 and 60

                    if (RandLottery == 1)
                    {
                        t.GainRealmPoints(5000);
                        t.RemoveBountyPoints(10000); t.UpdatePlayerStatus();
                        t.Out.SendMessage("Congratulations you won Realm Points!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                    }
                    else if (RandLottery == 2)
                    {
                        t.GainBountyPoints(1000);
                        t.RemoveBountyPoints(10000); t.UpdatePlayerStatus();
                        t.Out.SendMessage("Congratulations you won Bounty Points!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                    }
                    else if (RandLottery == 3)
                    {
                        t.GainChampionExperience(10000000000);
                        t.RemoveBountyPoints(10000); t.UpdatePlayerStatus();
                        t.Out.SendMessage("Congratulations you won Champion Experience!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                    }
                    else if (RandLottery == 4)
                    {
                        t.CraftingSkills[eCraftingSkill.SpellCrafting] = 1100;
                        t.RemoveBountyPoints(10000); t.UpdatePlayerStatus();
                        t.Out.SendMessage("Congratulations you won a Spellcrafting bonus!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                    }
                    else if (RandLottery == 5)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 6)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 7)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 8)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 9)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 10)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 11)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 12)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 13)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 14)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 15)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 16)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 17)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 18)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 19)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 20)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 21)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 22)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 23)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 24)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 25)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 26)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 27)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 28)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 29)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 30)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 31)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 32)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 33)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 34)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 35)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 36)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 37)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 38)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 39)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 40)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 41)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 42)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 43)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 44)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 45)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 46)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 47)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 48)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 49)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 50)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 51)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 52)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 53)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 54)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 55)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 56)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 57)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 58)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 59)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                    else if (RandLottery == 60)
                    {
                        t.RemoveBountyPoints(10000); SendReply(t, "Unlucky, you didn't win this time!");
                    }
                }
                else
                {
                    t.Client.Out.SendMessage("You don't have enough Bounty Points.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                }
                break;

            default: break;
            }
            return(true);
        }
Ejemplo n.º 2
0
        public override bool WhisperReceive(GameLiving source, string str)
        {
            if (!base.WhisperReceive(source, str))
            {
                return(false);
            }
            if (!(source is GamePlayer))
            {
                return(false);
            }
            GamePlayer t = (GamePlayer)source;

            TurnTo(t.X, t.Y);
            switch (str)
            {
            case "backdoorwinner":

                Say("Ah a Gamemaster, you guys will bankrupt me you know!");

                InventoryItem generic0  = new InventoryItem();
                ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfCloak");
                generic0.CopyFrom(tgeneric0);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);

                InventoryItem generic1  = new InventoryItem();
                ItemTemplate  tgeneric1 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfNeck");
                generic1.CopyFrom(tgeneric1);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic1);

                InventoryItem generic2  = new InventoryItem();
                ItemTemplate  tgeneric2 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfJewel");
                generic2.CopyFrom(tgeneric2);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic2);

                InventoryItem generic3  = new InventoryItem();
                ItemTemplate  tgeneric3 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfBelt");
                generic3.CopyFrom(tgeneric3);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic3);

                InventoryItem generic4  = new InventoryItem();
                ItemTemplate  tgeneric4 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfRing");
                generic4.CopyFrom(tgeneric4);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic4);

                InventoryItem generic5  = new InventoryItem();
                ItemTemplate  tgeneric5 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfBand");
                generic5.CopyFrom(tgeneric5);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic5);

                InventoryItem generic6  = new InventoryItem();
                ItemTemplate  tgeneric6 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfBracer");
                generic6.CopyFrom(tgeneric6);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic6);

                InventoryItem generic7  = new InventoryItem();
                ItemTemplate  tgeneric7 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "PerfWristBand");
                generic7.CopyFrom(tgeneric7);

                t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic7);

                SendReply(t, "Here you are !");

                break;

            case "Poke Ball":
                if (t.BountyPoints >= 1000)
                {
                    int RandLottery = Util.Random(1, 40);    //Creates a random number between 1 and 40

                    if (RandLottery == 1)
                    {
                        t.ReceiveItem(this, "item_summon1");
                        t.RemoveBountyPoints(1000); SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 2)
                    {
                        t.ReceiveItem(this, "item_summon2");
                        t.RemoveBountyPoints(1000); SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 3)
                    {
                        t.ReceiveItem(this, "item_summon3");
                        t.RemoveBountyPoints(1000); SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 4)
                    {
                        t.ReceiveItem(this, "item_summon4");
                        t.RemoveBountyPoints(1000); SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 5)
                    {
                        t.ReceiveItem(this, "item_summon5");
                        t.RemoveBountyPoints(1000);  SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 6)
                    {
                        t.ReceiveItem(this, "item_summon6");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 7)
                    {
                        t.ReceiveItem(this, "item_summon7");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 8)
                    {
                        t.ReceiveItem(this, "item_summon8");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 9)
                    {
                        t.ReceiveItem(this, "item_summon9");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 10)
                    {
                        t.ReceiveItem(this, "item_summon10");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 11)
                    {
                        t.ReceiveItem(this, "item_summon11");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 12)
                    {
                        t.ReceiveItem(this, "item_summon12");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 13)
                    {
                        t.ReceiveItem(this, "item_summon13");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 14)
                    {
                        t.ReceiveItem(this, "item_summon14");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 15)
                    {
                        t.ReceiveItem(this, "item_summon15");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 16)
                    {
                        t.ReceiveItem(this, "item_summon16");;
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 17)
                    {
                        t.ReceiveItem(this, "item_summon17");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 18)
                    {
                        t.ReceiveItem(this, "item_summon18");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 19)
                    {
                        t.ReceiveItem(this, "item_summon19");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 20)
                    {
                        t.ReceiveItem(this, "item_summon20");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 21)
                    {
                        t.ReceiveItem(this, "item_summon21");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 22)
                    {
                        t.ReceiveItem(this, "item_summon22");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 23)
                    {
                        t.ReceiveItem(this, "item_summon23");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 24)
                    {
                        t.ReceiveItem(this, "item_summon24");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 25)
                    {
                        t.ReceiveItem(this, "item_summon25");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 26)
                    {
                        t.ReceiveItem(this, "item_summon26");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 27)
                    {
                        t.ReceiveItem(this, "item_summon27");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 28)
                    {
                        t.ReceiveItem(this, "item_summon28");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 29)
                    {
                        t.ReceiveItem(this, "item_summon29");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 30)
                    {
                        t.ReceiveItem(this, "item_summon30");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 31)
                    {
                        t.ReceiveItem(this, "item_summon31");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 32)
                    {
                        t.ReceiveItem(this, "item_summon32");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 33)
                    {
                        t.ReceiveItem(this, "item_summon33");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 34)
                    {
                        t.ReceiveItem(this, "item_summon34");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 35)
                    {
                        t.ReceiveItem(this, "item_summon35");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 36)
                    {
                        t.ReceiveItem(this, "item_summon35");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 37)
                    {
                        t.ReceiveItem(this, "item_summon37");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 38)
                    {
                        t.ReceiveItem(this, "item_summon38");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 39)
                    {
                        t.ReceiveItem(this, "item_summon39");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                    else if (RandLottery == 40)
                    {
                        t.ReceiveItem(this, "item_summon40");
                        t.RemoveBountyPoints(1000);   SendReply(t, "Here is your Poke Ball!");
                    }
                }
                else
                {
                    t.Client.Out.SendMessage("You don't have enough Bounty Points.", eChatType.CT_Say, eChatLoc.CL_PopupWindow);
                }
                break;

            default: break;
            }
            return(true);
        }
Ejemplo n.º 3
0
        public override bool ReceiveItem(GameLiving source, InventoryItem item)
        {
            GamePlayer player = (GamePlayer)source;
            GamePlayer t      = source as GamePlayer;

            if (WorldMgr.GetDistance(this, source) > WorldMgr.INTERACT_DISTANCE)
            {
                ((GamePlayer)source).Out.SendMessage("You are too far away to give anything to " + GetName(0, false) + ".", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                return(false);
            }

            if (t != null && item != null)
            {
                if (item.Id_nb == "prizetoken1")
                {
                    t.GainRealmPoints(12000);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations you won Realm Points!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken2")
                {
                    t.GainBountyPoints(600);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations you won Bounty Points!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken3")
                {
                    t.GainChampionExperience(10000000000);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations you won Champion Experience!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken4")
                {
                    InventoryItem generic0  = new InventoryItem();
                    ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "DragonslayerWizardStaff");
                    generic0.CopyFrom(tgeneric0);
                    t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken5")
                {
                    InventoryItem generic0  = new InventoryItem();
                    ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "DragonslayerWizardStaff");
                    generic0.CopyFrom(tgeneric0);
                    t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken6")
                {
                    InventoryItem generic0  = new InventoryItem();
                    ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "DragonslayerWizardStaff");
                    generic0.CopyFrom(tgeneric0);
                    t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken7")
                {
                    InventoryItem generic0  = new InventoryItem();
                    ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "DragonslayerWizardStaff");
                    generic0.CopyFrom(tgeneric0);
                    t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                else if (item.Id_nb == "prizetoken8")
                {
                    InventoryItem generic0  = new InventoryItem();
                    ItemTemplate  tgeneric0 = (ItemTemplate)GameServer.Database.FindObjectByKey(typeof(ItemTemplate), "DragonslayerWizardStaff");
                    generic0.CopyFrom(tgeneric0);
                    t.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, generic0);
                    t.Inventory.RemoveItem(item); t.UpdatePlayerStatus();
                    t.Out.SendMessage("Congratulations!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
                }
                {
                    t.TempProperties.setProperty(REFUND_ITEM_WEAK, new WeakRef(item));
                }
            }
            return(base.ReceiveItem(source, item));
        }