[Release] Shows how much money you picked up!!!! to the whole server

02/09/2009 20:06 ph03nixx#1
in client.cs search for [B]SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You picked up " + TehItem.Money +[B]
then add under that this
Code:
World.SendMsgToAll(MyChar.Name + " has picked up" + TehItem.Money + "Silvers we hope he/she willspend it wisely", "System", 2011);
so it loks like this:
Code:
{
                            MyChar.Ready = false;
                            if (MyChar.ItemsInInventory > 39)
                                return;
                            uint ItemUID = (uint)((Data[7] << 24) + (Data[6] << 16) + (Data[5] << 8) + Data[4]);
                            DroppedItem TehItem = null;
                            if (DroppedItems.AllDroppedItems.Contains(ItemUID))
                                TehItem = (DroppedItem)DroppedItems.AllDroppedItems[ItemUID];

                            if (TehItem != null)
                            {
                                if (TehItem.Money == 0)
                                {
                                    MyChar.AddItem(TehItem.Item, 0, ItemUID);
                                }
                                else
                                {
                                    MyChar.Silvers += TehItem.Money;
                                    SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
                                    SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You picked up   " + TehItem.Money + " Silvers. Spend it wisely", 2005));
                                    World.SendMsgToAll(MyChar.Name + " has picked up" + TehItem.Money + "Silvers we hope he/she willspend it wisely", "System", 2011);
                                }

                                DroppedItems.AllDroppedItems.Remove(ItemUID);
                                World.ItemDissappears(TehItem);
                            }
                            MyChar.Ready = true;
                            break;
                        }
then when you pick up money, it will come up to the whole server!
:) press thnx if you like it, if not then don't pls put comments, BTW this is an addon for my other guide that it shows up in the corner
02/09/2009 20:48 © Haydz#2
Pointless...

You have even 50 people on at once (which you won't) imagine the spamming... Why would anybody else want to know hoow much money you've picked up... other than coming to kill you =[
02/09/2009 20:53 _Emme_#3
Quote:
case 1101:
{
uint IUID = BitConverter.ToUInt32(Data, 4);

if (LiveManager.DropItems.Contains(IUID))
{
Extra.DroppedItem I = (Extra.DroppedItem)LiveManager.DropItems[IUID];

if (I.Owner == C.MyChar.EntityID || I.Owner == 0 || DateTime.Now > I.DropTime.AddSeconds(15))
{
if (I.Cps > 0)
{
C.MyChar.CPs += I.Cps;
C.SendLocalMessage("You have picked up " + I.Cps + " Conquer points.", 2005);
}
else if (I.Silvers > 0)
{
C.MyChar.Silvers += I.Silvers;
C.SendLocalMessage("You have picked up " + I.Silvers + " Silvers", 2005);
}
else
{
C.MyChar.AddItem(I.Info);
string s = "You have picked up ";
s += I.Info.Quality;
if (I.Info.Plus > 0)
s += " [+" + I.Info.Plus + "] Item.";
C.SendLocalMessage(s, 2005);
}

I.Dissappear();
}
else
C.SendLocalMessage("You have to wait a little before you can pick an item dropped by a mob killed by some other player.", 2005);
}

break;
}
I win again.
02/09/2009 20:54 ph03nixx#4
lol, i thought it would be funny
02/09/2009 21:01 yuko#5
why showin everyone how much you pickedup? btw the code you have there 'phoenixx' won't allow you to pickup money when you inventory is full you'll better change that. would be more usefull...
02/09/2009 21:08 PeTe Ninja#6
Quote:
Originally Posted by EmmeTheCoder View Post
I win again.
can you translate that code into lotf or am i being stupid and is that in lotf :D
02/09/2009 21:18 _Emme_#7
That is not in LOTF, and I may do it later and send you it.
02/09/2009 21:25 ph03nixx#8
lol i have made mine LOTF, but i need a timer or a msg afterward
02/09/2009 21:40 _Emme_#9
Quote:
case 1101:
{
uint IUID = BitConverter.ToUInt32(Data, 4);

if (DroppedItems.AllDroppedItems.Contains(IUID))
{
DroppedItem Item = (DroppedItem)DroppedItems.AllDroppedItems[IUID];


if (Item.Money > 0)
{
MyChar.Silvers += Item.Money;
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You have picked up " + Item.Money + " silvers!", 2005));
SendPacket(General.MyPackets.Vital(MyChar.UID, 4, MyChar.Silvers));
}
else
{
MyChar.AddItem(Item.Item, 0, IUID);

if (Item.ToString().EndsWith("5"))
q = "normal";
else if (Item.ToString().EndsWith("6"))
q = "refined";
else if (Item.ToString().EndsWith("7"))
q = "unique";
else if (Item.ToString().EndsWith("8"))
q = "elite";
else if (Item.ToString().EndsWith("9"))
q = "super";
else
q = "unknown";
IniFile Ids = new IniFile("ItemIdsToNames.ini");
string ItemName = Ids.IniReadValue("Items", "Name" + IUID.ToString());
string item = q + " " + ItemName;

SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You have picked up a " + item + "!", 2005));

}
DroppedItems.AllDroppedItems.Remove(IUID);
World.ItemDissappears(Item);


}
break;
}
Its as shitty as it could be, LOTF is so un-orginazed so its really hard to make good codes.
02/09/2009 22:10 InfamousNoone#10
Quote:
Originally Posted by EmmeTheCoder View Post
That is not in LOTF, and I may do it later and send you it.
Yes but it's still from the same person, so it's still

Lousy and Outrageously Fucked
02/09/2009 22:13 ph03nixx#11
lol well i only realsed it cos i wos bored XD
02/09/2009 22:27 InfamousNoone#12
Just to clarify cause it seems Emme just whined on msn to me, "the same person" refers to Tanel, not Emme; Then again I suppose that insults Emme's coding ability too?

Hmm....
02/10/2009 07:44 _Emme_#13
No it doesn't itsult me I just get pissed when you guys keep whining about Tanels skills when hes pretty good actually.
02/10/2009 14:33 ph03nixx#14
well thats true Tanel is very good, and Emme, if you do feel insulted, im sorry...
02/10/2009 15:56 _Emme_#15
I dont feel insulted, im just getting pissed at everyone claiming he sucks. The only thing that sucks is LandsOfTheForgotten source, because he didnt spend alot of time on coding everything good, but I've seen his latest code, they are pretty neat I must say.