Beispiel #1
0
        private void chatClient_FailReceived(object sender, EventArgs e)
        {
            if (!Dispatcher.CheckAccess())
            {
                FailMessage r = chatClient_MessageReceived;
                Dispatcher.Invoke(r, sender, e);
            }
            else
            {
                var args = e as MessageEventArgs;
                if (args == null)
                {
                    return;
                }

                MessageBox.Show(args.Message, "Ошибка", MessageBoxButton.OK);
            }
        }
Beispiel #2
0
        public void handleMessage(Message msg)
        {
            // trading with auctionbot#############################################################################################################


            if (this.sttngs.waitForAuctionBot && msg is FailMessage) // bot is offline! shame on him!
            {
                FailMessage fm = (FailMessage)msg;
                if (fm.op == "Whisper" && fm.info == "Could not find the user '" + botname + "'.")
                {
                    this.sttngs.AucBotMode        = "";
                    this.sttngs.waitForAuctionBot = false;
                    this.sttngs.actualTrading     = false;
                    pppmngr.startOKPopup("auctionmodresponse", "offline", "the auctionbot is offline");
                }
            }


            if (this.sttngs.waitForAuctionBot && msg is WhisperMessage)
            {
                WhisperMessage wm = msg as WhisperMessage;

                if (wm.from == botname && wm.text == "invite me")
                {
                    //invite the auctionmod for trade
                    //App.Communicator.sendRequest(new TradeAcceptMessage("1b8a4125d2634634aa76f33e1d04b0d4"));
                    App.Communicator.send(new TradeInviteMessage(botid));
                    this.sttngs.actualTrading = true;
                    this.sttngs.addedCard     = false;
                }
            }

            if ((this.sttngs.waitForAuctionBot || this.sttngs.actualTrading) && msg is WhisperMessage)
            {
                WhisperMessage wm = msg as WhisperMessage;

                if (wm.from == botname && wm.text == "invite me")
                {
                    //invite the auctionmod for trade
                    //App.Communicator.sendRequest(new TradeAcceptMessage("1b8a4125d2634634aa76f33e1d04b0d4"));

                    this.sttngs.actualTrading = true;
                    this.sttngs.addedCard     = false;
                }

                if (wm.from == botname && wm.text == "there is not such an auction")
                {
                    this.sttngs.AucBotMode        = "";
                    this.sttngs.waitForAuctionBot = false;
                    this.sttngs.actualTrading     = false;
                    Console.WriteLine("not such an auction");
                    pppmngr.startOKPopup("auctionmodresponse", "non exsisting", "the auction you chosed, doesnt exist anymore");
                }

                if (wm.from == botname && wm.text == "to slow")
                {
                    this.sttngs.AucBotMode        = "";
                    this.sttngs.waitForAuctionBot = false;
                    this.sttngs.actualTrading     = false;
                    Console.WriteLine("you are to slow bro");
                    pppmngr.startOKPopup("auctionmodresponse", "to slow", "you were responding to slow");
                }

                if (wm.from == botname && wm.text == "auctionlimit reached")
                {
                    this.sttngs.AucBotMode        = "";
                    this.sttngs.waitForAuctionBot = false;
                    this.sttngs.actualTrading     = false;
                    Console.WriteLine("not more than 10 auctions");
                    pppmngr.startOKPopup("auctionmodresponse", "to much auctions", "You cant create more auctions");
                }

                if (wm.from == botname && wm.text == "dont fool me")
                {
                    this.sttngs.AucBotMode        = "";
                    this.sttngs.waitForAuctionBot = false;
                    this.sttngs.actualTrading     = false;
                    Console.WriteLine("there are no auctions open");
                    pppmngr.startOKPopup("auctionmodresponse", "no auctions", "you dont own a finished auction");
                }

                if (wm.from == botname && wm.text == "hit accept" && this.sttngs.AucBotMode == "getauc")
                {
                    new Thread(new ThreadStart(this.acceptTrade)).Start();
                }
            }


            //trade finished
            if (this.sttngs.actualTrading && msg is TradeViewMessage && (msg as TradeViewMessage).to.profile.name == botname && (msg as TradeViewMessage).modified == false && (msg as TradeViewMessage).to.accepted == true && (msg as TradeViewMessage).from.accepted == true)
            {
                if (this.sttngs.AucBotMode == "setauc")
                {
                    pppmngr.startOKPopup("auctionmodresponse", "created auction", "you created the following auction:\r\n" + this.helpf.createdAuctionText);
                }
                if (this.sttngs.AucBotMode == "multisetauc")
                {
                    pppmngr.startOKPopup("auctionmodresponse", "created auction", "you created some auctions!");
                    this.ps.clearAuctions();
                }
                if (this.sttngs.AucBotMode == "bidauc")
                {
                    pppmngr.startOKPopup("auctionmodresponse", "scroll bought", "you bought " + this.helpf.auctionBotCardsToNames[(msg as TradeViewMessage).to.cardIds[0]] + " for " + (msg as TradeViewMessage).from.gold + " gold.");
                }
                if (this.sttngs.AucBotMode == "getauc")
                {
                    string reccards = "";
                    foreach (long x in (msg as TradeViewMessage).to.cardIds)
                    {
                        if (reccards != "")
                        {
                            reccards = reccards + ", ";
                        }
                        reccards = reccards + this.helpf.auctionBotCardsToNames[x];
                    }
                    string output = "you received: " + (msg as TradeViewMessage).to.gold + " gold and some scrolls (look in Chat).";
                    if (reccards == "")
                    {
                        output = "you received: " + (msg as TradeViewMessage).to.gold + " gold.";
                    }
                    pppmngr.startOKPopup("auctionmodresponse", "stuff received", output);
                    if (reccards != "")
                    {
                        RoomChatMessageMessage nrcmm = new RoomChatMessageMessage("[note]", "You received these scrolls: " + reccards + ".");
                        nrcmm.from = "AuctionHouse";
                        App.ArenaChat.handleMessage(nrcmm);
                    }
                }
                new Thread(new ThreadStart(this.getCardsAndGold)).Start();
            }

            // get cardIDs+ Types from auctionbot, for knowing which cards you got :D

            if (this.sttngs.actualTrading && msg is LibraryViewMessage)
            {
                if ((((LibraryViewMessage)msg).profileId == this.botid))
                {
                    // the libViewMessage is from auctionmod :D
                    helpf.setAuctionModCards(msg);
                }
            }

            //accept in bidmode, after he adds card + we adds money
            if (this.sttngs.actualTrading && msg is TradeViewMessage && this.sttngs.AucBotMode == "bidauc" && (msg as TradeViewMessage).to.profile.name == botname && (msg as TradeViewMessage).to.cardIds.Length == 1 && (msg as TradeViewMessage).to.cardIds[0] == this.sttngs.tradeCardID && (msg as TradeViewMessage).from.gold == this.sttngs.bidgold && (msg as TradeViewMessage).modified == true)
            { // trading with bot, he has added the wanted card, and we added the money... lets click ok in 5 seconds! (if modified = true (if he accept, it will be falls), so we accept only once
                new Thread(new ThreadStart(this.acceptTrade)).Start();
            }

            //if trading with bot and wants to bid on an auction: add money, + wait till he adds card accept
            if (this.sttngs.waitForAuctionBot && !this.sttngs.addedCard && this.sttngs.AucBotMode == "bidauc" && msg is TradeResponseMessage && (msg as TradeResponseMessage).to.name == botname && (msg as TradeResponseMessage).status == "ACCEPT")
            {
                new Thread(new ThreadStart(this.setGold)).Start();
            }

            //if trading with bot and wants to set an auction: add card, accept after 5 seconds (threaded)
            if (this.sttngs.waitForAuctionBot && !this.sttngs.addedCard && this.sttngs.AucBotMode == "setauc" && msg is TradeResponseMessage && (msg as TradeResponseMessage).to.name == botname && (msg as TradeResponseMessage).status == "ACCEPT")
            {
                App.Communicator.sendRequest(new TradeAddCardsMessage(new long[] { this.sttngs.tradeCardID }));
                this.sttngs.addedCard = true;
                new Thread(new ThreadStart(this.acceptTrade)).Start();
            }

            //if trading with bot and wants to set some auctions: add cards, accept after 5 seconds (threaded)
            if (this.sttngs.waitForAuctionBot && !this.sttngs.addedCard && this.sttngs.AucBotMode == "multisetauc" && msg is TradeResponseMessage && (msg as TradeResponseMessage).to.name == botname && (msg as TradeResponseMessage).status == "ACCEPT")
            {
                App.Communicator.sendRequest(new TradeAddCardsMessage(this.helpf.cardsForTradeIds.ToArray()));
                this.sttngs.addedCard = true;
                new Thread(new ThreadStart(this.acceptTrade)).Start();
            }

            // trade was canceled
            if (this.sttngs.waitForAuctionBot && msg is TradeResponseMessage && (msg as TradeResponseMessage).to.name == botname && (msg as TradeResponseMessage).status == "CANCEL_BARGAIN")
            {
                this.sttngs.AucBotMode        = "";
                this.sttngs.waitForAuctionBot = false;
                this.sttngs.actualTrading     = false;
            }
            // trade was accepted
            if (this.sttngs.waitForAuctionBot && msg is TradeResponseMessage && (msg as TradeResponseMessage).to.name == botname && (msg as TradeResponseMessage).status == "ACCEPT")
            {
                // nice!
                this.sttngs.waitForAuctionBot = false;
            }
            // trade was timeouted :D
            if (this.sttngs.waitForAuctionBot && msg is TradeResponseMessage && (msg as TradeResponseMessage).to.name == botname && (msg as TradeResponseMessage).status == "TIMEOUT")
            {
                this.sttngs.AucBotMode        = "";
                this.sttngs.waitForAuctionBot = false;
                this.sttngs.actualTrading     = false;
            }

            if (msg is RoomEnterMessage && (this.sttngs.waitForAuctionBot || this.sttngs.actualTrading))
            {
                this.sttngs.autoAuctionRoom = (msg as RoomEnterMessage).roomName;
                this.sttngs.auctionScrollsMessagesCounter = 1;
            }

            if (msg is RoomChatMessageMessage && this.sttngs.auctionScrollsMessagesCounter >= 1)
            {
                if ((msg as RoomChatMessageMessage).from == "Scrolls")
                {
                    this.sttngs.auctionScrollsMessagesCounter++;
                }
                if (this.sttngs.auctionScrollsMessagesCounter == 3)
                {
                    App.ArenaChat.ChatRooms.LeaveRoom((msg as RoomChatMessageMessage).roomName);
                    App.Communicator.send(new RoomExitMessage((msg as RoomChatMessageMessage).roomName));
                }
            }

            return;
        }
        public void handleMessage(Message msg)
        {
            if (msg is MessageMessage)
            {
                MessageMessage omsg = (MessageMessage)msg;
                if (omsg.type == MessageMessage.Type.SOLD_MARKET_SCROLLS)
                {
                    this.needSoldAucs = true;
                    App.Communicator.send(new MarketplaceSoldListViewMessage());
                }
            }

            if (msg is OkMessage)
            {
                OkMessage omsg = (OkMessage)msg;
                if (Helpfunktions.Instance.createAuctionMenu)
                {
                    if (omsg.op == "MarketplaceCreateOffer" && this.sellingCard != null)
                    {
                        Helpfunktions.Instance.cardIDToNumberOwned[this.sellingType]--;
                        Helpfunktions.Instance.cardIDToNumberOwnedTiered[this.sellingType] -= (int)Math.Pow(3, sellingTypeLevel);
                        PlayerStore.Instance.createCardsFilter.filtersChanged = true;
                        PlayerStore.Instance.sellOfferFilter.filtersChanged   = true;

                        this.dataOffer   = 0;
                        this.sellingCard = null;
                        App.Communicator.send(new MarketplaceOffersViewMessage());
                        //App.Communicator.send(new MarketplaceSoldListViewMessage());
                        App.Communicator.sendRequest(new LibraryViewMessage());
                    }
                    if (omsg.op == "MarketplaceCancelOffer")
                    {
                        Helpfunktions.Instance.cardIDToNumberOwned[this.cancelType]++;
                        Helpfunktions.Instance.cardIDToNumberOwnedTiered[this.cancelType] += (int)Math.Pow(3, cancelTypeLevel);
                        PlayerStore.Instance.createCardsFilter.filtersChanged              = true;
                        PlayerStore.Instance.sellOfferFilter.filtersChanged = true;

                        this.dataOffer = 0;
                        App.Communicator.send(new MarketplaceOffersViewMessage());
                        //App.Communicator.send(new MarketplaceSoldListViewMessage());
                        App.Communicator.sendRequest(new LibraryViewMessage());
                    }

                    if (omsg.op == "MarketplaceClaim")
                    {
                        if (transactionBeingClaimed == null)
                        {
                            return;
                        }
                        if (this.workthreadclaimall)
                        {
                            this.claimeditemstaxes += this.transactionBeingClaimed.fee;
                            this.claimeditemsmoney += this.transactionBeingClaimed.sellPrice;
                            System.Threading.Thread.Sleep(150);
                            this.claimlast();
                            return;
                        }
                        App.AudioScript.PlaySFX("Sounds/hyperduck/UI/ui_coin_tally_end");
                        CardType cardType = CardTypeManager.getInstance().get(this.transactionBeingClaimed.cardType);
                        this.dataOffer    = 0;
                        this.needSoldAucs = true;
                        App.Communicator.send(new MarketplaceOffersViewMessage());
                        App.Communicator.send(new MarketplaceSoldListViewMessage());
                        App.Communicator.sendRequest(new LibraryViewMessage());
                        App.Popups.ShowOk(this, "claimgold", "Gold added", string.Concat(new object[]
                        {
                            "<color=#bbaa88>Tier ",
                            (int)(this.transactionBeingClaimed.level + 1),
                            " ",
                            cardType.name,
                            " sold for ",
                            this.transactionBeingClaimed.sellPrice,
                            " gold!\nEarned <color=#ffd055>",
                            this.transactionBeingClaimed.sellPrice - this.transactionBeingClaimed.fee,
                            " gold</color> (the fence collects ",
                            this.transactionBeingClaimed.fee,
                            ").</color>"
                        }), "Ok");
                        this.transactionBeingClaimed = null;
                    }
                }

                if (Helpfunktions.Instance.playerStoreMenu)
                {
                    if (omsg.op == "MarketplaceMakeDeal")
                    {
                        App.Communicator.sendRequest(new GetStoreItemsMessage());
                        App.Communicator.sendRequest(new LibraryViewMessage());
                        App.Popups.ShowOk(this, "dealmade", "Purchase complete!", clickedItemName + " has been added to your collection.", "Ok");
                        Helpfunktions.Instance.cardIDToNumberOwned[this.clickedItemtypeid]++;
                        Helpfunktions.Instance.cardIDToNumberOwnedTiered[this.clickedItemtypeid] += (int)Math.Pow(3, clickedItemLevel);
                        PlayerStore.Instance.createCardsFilter.filtersChanged = true;
                        PlayerStore.Instance.sellOfferFilter.filtersChanged   = true;
                        clickedItemBuyID = -1;
                    }
                }
            }

            if (msg is FailMessage)
            {
                FailMessage failMessage = (FailMessage)msg;
                if (failMessage.isType(typeof(MarketplaceMakeDealMessage)))
                {
                    App.Popups.ShowOk(this, "dealNOTmade", "Purchase failed", failMessage.info, "Ok");
                    PlayerStore.Instance.createCardsFilter.filtersChanged = true;
                    PlayerStore.Instance.sellOfferFilter.filtersChanged   = true;
                    clickedItemBuyID = -1;
                }

                if (failMessage.isType(typeof(MarketplaceCreateOfferMessage)) && this.sellingCard != null)
                {
                    App.Popups.ShowOk(this, "cantcreate", "Create failed", failMessage.info, "Ok");
                    this.sellingCard = null;
                }

                if (failMessage.isType(typeof(MarketplaceClaimMessage)))
                {
                    if (transactionBeingClaimed == null)
                    {
                        return;
                    }
                    if (this.workthreadclaimall)
                    {
                        System.Threading.Thread.Sleep(150);
                        this.claimlast();
                        return;
                    }
                    this.dataOffer    = 0;
                    this.needSoldAucs = true;
                    App.Communicator.send(new MarketplaceOffersViewMessage());
                    App.Communicator.send(new MarketplaceSoldListViewMessage());
                    App.Communicator.sendRequest(new LibraryViewMessage());
                    transactionBeingClaimed = null;
                }
            }

            if (msg is CheckCardDependenciesMessage && sellingCard != null)
            {
                CheckCardDependenciesMessage checkCardDependenciesMessage = (CheckCardDependenciesMessage)msg;
                if (checkCardDependenciesMessage.dependencies == null || checkCardDependenciesMessage.dependencies.Length == 0)
                {
                    this.GetCreateOfferInfo();
                }
                else
                {
                    App.Popups.ShowOkCancel(this, "deckinvalidationwarning", "Notice", "Selling this scroll will make the following decks illegal:\n\n" + DeckUtil.GetFormattedDeckNames(checkCardDependenciesMessage.GetDeckNames()), "Ok", "Cancel");
                }
            }

            if (msg is MarketplaceCreateOfferInfoMessage && sellingCard != null)
            {
                MarketplaceCreateOfferInfoMessage marketplaceCreateOfferInfoMessage = (MarketplaceCreateOfferInfoMessage)msg;
                App.Popups.ShowSellCard(this, "sellcard", this.sellingCard, marketplaceCreateOfferInfoMessage.lowestPrice, marketplaceCreateOfferInfoMessage.suggestedPrice, marketplaceCreateOfferInfoMessage.copiesForSale, marketplaceCreateOfferInfoMessage.tax);
            }

            if (msg is MarketplaceOffersSearchViewMessage)
            {
                MarketplaceOffersSearchViewMessage marketplaceOffersViewMessage = (MarketplaceOffersSearchViewMessage)msg;
                clickedItemForSales = marketplaceOffersViewMessage.copiesForSale;
                clickedItemLevel    = marketplaceOffersViewMessage.offer.card.level;
                clickedItemPrice    = marketplaceOffersViewMessage.offer.price;
                clickedItemBuyID    = marketplaceOffersViewMessage.offer.id;
                clickedItemName     = marketplaceOffersViewMessage.offer.card.getName();
                clickedItemtypeid   = marketplaceOffersViewMessage.offer.card.getType();
            }

            if (msg is MarketplaceOffersViewMessage)
            {
                //if (this.dataisreadyOwnOffers) return;

                MarketplaceOffersViewMessage marketplaceOffersViewMessage = (MarketplaceOffersViewMessage)msg;
                MarketplaceOffer[]           offers = marketplaceOffersViewMessage.offers;
                this.pstoreOwnAucs.Clear();
                DateTime tme = DateTime.Now;
                tme = tme.AddMilliseconds(1000);
                for (int i = 0; i < offers.Length; i++)
                {
                    MarketplaceOffer marketplaceOffer = offers[i];
                    Auction          a = new Auction(App.MyProfile.ProfileInfo.name, tme, Auction.OfferType.SELL, marketplaceOffer.card, "" + marketplaceOffer.id, marketplaceOffer.price);
                    tme = tme.AddMilliseconds(1);
                    //Console.WriteLine("add owm auction: " + a.card.getName() + " " + a.price);
                    this.pstoreOwnAucs.Add(a);
                }

                this.dataOffer++;

                if (this.dataOffer >= 2 || !this.needSoldAucs)
                {
                    this.dataisreadyOwnOffers = true;
                }
                if (this.dataOffer >= 2)
                {
                    this.needSoldAucs = false;
                }
            }

            if (msg is MarketplaceSoldListViewMessage)
            {
                //if (this.dataisreadyOwnOffers) return;

                MarketplaceSoldListViewMessage marketplaceOffersViewMessage = (MarketplaceSoldListViewMessage)msg;
                TransactionInfo[] offers = marketplaceOffersViewMessage.sold;
                this.pstoreSOLDAucs.Clear();
                this.soldScrollTransactions.Clear();
                DateTime tme = DateTime.Now;

                for (int i = 0; i < offers.Length; i++)
                {
                    TransactionInfo marketplaceOffer = offers[i];
                    if (!marketplaceOffer.claimed)
                    {
                        this.soldScrollTransactions.Add(marketplaceOffer.cardId, marketplaceOffer);
                    }
                    CardType type       = CardTypeManager.getInstance().get(marketplaceOffer.cardType);
                    Card     c          = new Card(marketplaceOffer.cardId, type, true);
                    string   aucmessage = "sold " + marketplaceOffer.fee;
                    if (marketplaceOffer.claimed)
                    {
                        aucmessage += " claimed";
                        continue;
                    }
                    Auction a = new Auction(App.MyProfile.ProfileInfo.name, tme, Auction.OfferType.SELL, c, aucmessage, marketplaceOffer.sellPrice, marketplaceOffer.cardId);
                    tme = tme.AddMilliseconds(1);
                    //Console.WriteLine("add owm auction: " + a.card.getName() + " " + a.price);
                    this.pstoreSOLDAucs.Add(a);
                }
                this.dataOffer++;
                if (this.dataOffer >= 2)
                {
                    this.dataisreadyOwnOffers = true;
                }
                this.needSoldAucs = false;
            }

            if (msg is MarketplaceAvailableOffersListViewMessage)
            {
                Prices.Instance.getBlackmarketPrices(msg as MarketplaceAvailableOffersListViewMessage);
                if (this.dataisready)
                {
                    return;
                }

                MarketplaceAvailableOffersListViewMessage marketplaceAvailableOffersListViewMessage = (MarketplaceAvailableOffersListViewMessage)msg;

                MarketplaceTypeAvailability[] available = marketplaceAvailableOffersListViewMessage.available;
                this.pstoreAucs.Clear();
                DateTime tme = DateTime.Now;
                for (int i = 0; i < available.Length; i++)
                {
                    MarketplaceTypeAvailability mta = available[i];
                    CardType type = CardTypeManager.getInstance().get(mta.type);
                    Card     card = new Card(1, type, true);
                    card.level = mta.level;
                    Auction a = new Auction("BlackMarket", tme, Auction.OfferType.SELL, card, "", mta.price);
                    tme = tme.AddMilliseconds(-1);
                    //Console.WriteLine("add auction: " + a.card.getName() + " " + a.price);
                    this.pstoreAucs.Add(a);
                }

                this.dataisready = true;
            }
            return;
        }
Beispiel #4
0
        public void handleMessage(Message msg)
        {
            if (msg is FailMessage)
            {
                FailMessage failMessage = (FailMessage)msg;
                if (failMessage.isTypes(new Type[]
                {
                    typeof(ConnectMessage),
                    typeof(FirstConnectMessage)
                }))
                {
                    Thread t1 = new Thread(new ThreadStart(addListenerOnWrongLogin));
                    t1.Start();
                }
            }

            GetGoogleThings.Instance.handleMessage(msg);
            if (msg is CardTypesMessage)
            {
                generator.setallavailablecards(msg);
                mssgprsr.searchscrollsnicks.AddRange(helpf.loadedscrollsnicks);
            }

            if (msg is LibraryViewMessage)
            {
                if ((((LibraryViewMessage)msg).profileId == App.MyProfile.ProfileInfo.id))
                {
                    generator.setowncards(msg);
                    helpf.setOwnCards(msg);
                    this.ahui.clearOffercard();
                }
            }

            if (msg is BuyStoreItemResponseMessage)
            {
                // if we buy a card in the store, we have to reload the own cards , nexttime we open ah/generator
                List <Card> boughtCards = null;
                BuyStoreItemResponseMessage buyStoreItemResponseMessage = (BuyStoreItemResponseMessage)msg;
                if (buyStoreItemResponseMessage.cards.Length > 0)
                {
                    boughtCards = new List <Card>(buyStoreItemResponseMessage.cards);
                }
                else
                {
                    boughtCards = null;
                }
                DeckInfo[] deckInfo = buyStoreItemResponseMessage.deckInfos;
                if (boughtCards != null)
                {
                    deckchanged = true;
                }
                else
                {
                    if (deckInfo != null)
                    {
                        deckchanged = true;
                    }
                }
            }

            // following stuff writes the offer you want to buy/sell in chatroom after entering the trade-chat-room#####################

            if (msg is TradeResponseMessage)
            {
                //if he doesnt accept the trade, reset the variables
                TradeResponseMessage trm = (TradeResponseMessage)msg;
                if (trm.status != "ACCEPT")
                {
                    helpf.postmsgontrading        = false;
                    helpf.postmsggetnextroomenter = false;
                    helpf.postmsgmsg = "";
                }
            }


            if (helpf.postmsggetnextroomenter && msg is RoomEnterMessage)
            {// he accept your trade, post the auction message to yourself
                RoomEnterMessage rmem = (RoomEnterMessage)msg;
                if (rmem.roomName.StartsWith("trade-"))
                {
                    helpf.postmsggetnextroomenter = false;
                    // post the msg here!:
                    RoomChatMessageMessage joinmessage = new RoomChatMessageMessage(rmem.roomName, "<color=#777460>" + helpf.postmsgmsg + "</color>");
                    joinmessage.from = "Scrolls";

                    //App.ChatUI.handleMessage(new RoomChatMessageMessage(rmem.roomName, "<color=#777460>" + postmsgmsg + "</color>"));
                    App.ArenaChat.ChatRooms.ChatMessage(joinmessage);
                    helpf.postmsgmsg = "";
                }
            }

            return;
        }