Register for your free account! | Forgot your password?

You last visited: Today at 04:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



CoEmu clearinv NPC

Discussion on CoEmu clearinv NPC within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2006
Posts: 114
Received Thanks: 30
Smile CoEmu clearinv NPC

Ok I just made this NPC on my own im learning #C.. So umm... It works and all.. but when I relog the items show up.. how do I make it not do that?

Code:
                case 10151://Clearinv NPC
                    {
                        if (LinkBack == 0)
                        {
                            Text("Would you like me to clear your Inventory?", CSocket);
                            Link("Yes", 1, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            foreach (Struct.ItemInfo Itm in CSocket.Client.Inventory.Values)
                            CSocket.Send(ConquerPacket.ItemUsage(Itm.UID, 0, Struct.ItemUsage.RemoveItem));
                            CSocket.Client.Inventory.Clear();
                        }
                    }
                    break;
imported_spitt_fire911 is offline  
Thanks
1 User
Old 07/14/2009, 23:17   #2
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
I'll look at it. One second
n0mansland is offline  
Thanks
1 User
Old 07/14/2009, 23:32   #3
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Your code is rather LOTF? If you didnt know LOTF != CoEmu.

Code:
 case 10151: //Clearinv NPC
                    {
                        if (LinkBack == 0)
                        {
                            Text("Would you like me to clear your Inventory?", CSocket);
                            Link("Yes", 1, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            foreach(Struct.ItemInfo Itm in CSocket.Client.Inventory.Values)
                                CSocket.Send(ConquerPacket.ItemUsage(Itm.UID, 0, Struct.ItemUsage.RemoveItem));
                            CSocket.Client.Inventory.Clear();
                        }
                    }
                    break;
+
What should i worry about? You haxing me? Not a chance.
---------------------------------

Quote:
Originally Posted by n0mansland View Post
I'll look at it. One second
I'd love to see your version.
alexbigfoot is offline  
Old 07/14/2009, 23:52   #4
 
elite*gold: 0
Join Date: Jun 2006
Posts: 114
Received Thanks: 30
Exclamation

I made the NPC for for CoEmu.. and just used the

Code:
                            foreach(Struct.ItemInfo Itm in CSocket.Client.Inventory.Values)
                                CSocket.Send(ConquerPacket.ItemUsage(Itm.UID, 0, Struct.ItemUsage.RemoveItem));
                            CSocket.Client.Inventory.Clear()
From Lotf
imported_spitt_fire911 is offline  
Old 07/15/2009, 00:32   #5
 
danielachraf's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
does coemu have MyChar ?
danielachraf is offline  
Old 07/15/2009, 00:37   #6
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
thats a GREAT guess. i think just thread owner's coemu source has "MyChar" and all variables from LOTF. -> Noobs just copy and paste.
alexbigfoot is offline  
Old 07/15/2009, 01:31   #7
 
arab4life's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 430
Received Thanks: 286
good job import
arab4life is offline  
Thanks
2 Users
Old 07/15/2009, 02:16   #8
 
elite*gold: 0
Join Date: Jun 2006
Posts: 114
Received Thanks: 30
ty arab4life... So I do do it correct?? Sweet.....
imported_spitt_fire911 is offline  
Old 07/15/2009, 09:57   #9
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
Quote:
Originally Posted by imported_spitt_fire911 View Post
ty arab4life... So I do do it correct?? Sweet.....
Of course not. thats why i reply with the good version, even though it doesnt delete the items from database, but it removes the items for moment.
alexbigfoot is offline  
Old 07/15/2009, 11:18   #10
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
Try not to be so harsh and don't use expressions like 'dipshit' etc.
tanelipe is offline  
Old 07/15/2009, 12:07   #11
 
elite*gold: 0
Join Date: Jun 2009
Posts: 140
Received Thanks: 12
#request close, thread starter got what he wanted, Dont need more useless flame
JustChillin is offline  
Old 07/15/2009, 12:08   #12
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
Actually no.. he was asking how to save the items so they won't be gone even after relog.

@Threadstarter: Save the new inventory to database with the new values.
tanelipe is offline  
Old 07/15/2009, 12:10   #13
 
elite*gold: 0
Join Date: Jun 2006
Posts: 114
Received Thanks: 30
# Request NOT CLOSE...... Cause i did not want it to be closed... and im still waiting for a reply on the save
imported_spitt_fire911 is offline  
Old 07/15/2009, 13:38   #14
 
elite*gold: 0
Join Date: Jul 2009
Posts: 548
Received Thanks: 52
Quote:
Originally Posted by imported_spitt_fire911 View Post
# Request NOT CLOSE...... Cause i did not want it to be closed... and im still waiting for a reply on the save
You try yourself? Atleast worked on it 3 days or more?
f0am is offline  
Old 07/15/2009, 20:36   #15
 
elite*gold: 0
Join Date: Jun 2006
Posts: 114
Received Thanks: 30
Ya.. I've looked for awhile... im starting to have the save problem alot... idk how to set a save on them.... like..... my cps... clearinv...... CPs wont save.... clearinv doesn't take them from database.. just takes them outa ur inv till u log back in. lol
imported_spitt_fire911 is offline  
Reply


Similar Threads Similar Threads
CoEmu
07/04/2009 - CO2 Private Server - 4 Replies
Can someone post here a CoEmu source??? with some fixes?? Thanks
CoEmu
06/18/2009 - CO2 Private Server - 12 Replies
I keep forgeting the code, how do I make an item in CoEmu? /item JusticeKatana 9 12 7 255 2?
[Help] CoEmu
06/02/2009 - CO2 Private Server - 0 Replies
Help comands for PM charakter dont vork
Help with CoEmu v2!
05/31/2009 - CO2 Private Server - 11 Replies
Hello Elitepvpers, I can't login! This is my error: http://img46.imageshack.us/img46/1135/errorhxb.th .png Can someone help me?
[HELP] CoEmu v2 GW
05/31/2009 - CO2 Private Server - 5 Replies
Hey, how i can open GW in CoEmu v2 source by andy? Thanks for help.



All times are GMT +2. The time now is 04:57.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.