#region Escort Chief
case 30165:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Do you want to clear your inventory? It's free.");
dialog.Option("Yes, actually i do.", 1);
dialog.Option("Just passing by.", 255);
dialog.Send();
break;
}
case 1:
{
dialog.Text("Are you sure?");
dialog.Option("Yes, i am.", 2);
dialog.Option("No, i don't know what i was thinking.", 255);
dialog.Send();
break;
}
case 2:
{
foreach (Game.Item I in GC.MyChar.Inventory)
GC.AddSend(Packets.ItemPacket(I.UID, 0, 3));
GC.MyChar.Inventory = new ArrayList(40);
dialog.Text("Well it's done.");
dialog.Option("Thanks.", 255);
dialog.Send();
break;
}
}
break;
}
#endregion
I'm trying to add this except I'm unsure as to what these lines should be
Code:
foreach (Game.Item I in GC.MyChar.Inventory)
GC.AddSend(Packets.ItemPacket(I.UID, 0, 3));
GC.MyChar.Inventory = new ArrayList(40);
I know it isn't GC.MyChar.Inventory or GC.AddSend but not really sure what it should be >.<
Unsure without the actual source code. I'd recommend looking at the Inventory class(?) and see what methods it exposes for clearing the list, and if deleting items also sends those packets to the client automatically. You reinitializing it as an ArrayList is odd to me. If you're not saving that to the database, then your characters are going to overflow items. Also, just some advice on coding indentation, I recommend indenting code in your foreach body so it's clear what's being repeated. For example:
Code:
foreach (Game.Item I in GC.MyChar.Inventory)
GC.AddSend(Packets.ItemPacket(I.UID, 0, 3));
GC.MyChar.Inventory = new ArrayList(40);
Unsure without the actual source code. I'd recommend looking at the Inventory class(?) and see what methods it exposes for clearing the list, and if deleting items also sends those packets to the client automatically. You reinitializing it as an ArrayList is odd to me. If you're not saving that to the database, then your characters are going to overflow items. Also, just some advice on coding indentation, I recommend indenting code in your foreach body so it's clear what's being repeated. For example:
Code:
foreach (Game.Item I in GC.MyChar.Inventory)
GC.AddSend(Packets.ItemPacket(I.UID, 0, 3));
GC.MyChar.Inventory = new ArrayList(40);
Well, it's cleaning the inventory but isn't saving (deleting btw) on the database. It's just sending the remove subtype and creating the inventory list again.
HELP GUYS im trying to add fastjobchange but something error 04/22/2018 - Flyff Private Server - 3 Replies Neuz error C2039: 'UpdateJob' : is not a member of 'CDPClient'
how to fix this ?? i compare this to the other files but its the same nothing change when i compile i got this error
sorry for my bad english
looking for coder to add soul item npc and dmg- add npc 07/09/2011 - CO2 Private Server - 0 Replies hey im looking for a coder that could add a npc which sells full dragon soul sets +12 -7 255 hp 2 soc for specific classes e.g. for a tro you would buy a soul set which has weapons armor coro necky boots armor and so on also i need a npc where you can buy dmg - to your equips for tortoise gems