Register for your free account! | Forgot your password?

You last visited: Today at 14:48

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

 

Power Source Packing NPC

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
Power Source Packing NPC

K now i will release my own coded NPC it's my first code so yea...
This NPC can pack 10 meteors into met scroll also can pack 20 meteors in 2 met scrolls at once and the same is for DB scrolls this will work only in 5017 sources.
Change the NPC talk in the npctalk and it should look like this


PHP Code:
if (CurrentNPC == 9812)
                        {
                            
SendPacket(General.MyPackets.NPCSay("Hunting meteors and dragonballs is an exciting thing. However, they also pile up in your inventories."));
                            
SendPacket(General.MyPackets.NPCLink("I want to pack my meteors"1));
                            
SendPacket(General.MyPackets.NPCLink("I wanna pack DragonBalls"2));
                            
SendPacket(General.MyPackets.NPCLink("I am poor and do not have the problem."255));
                            
SendPacket(General.MyPackets.NPCSetFace(30));
                            
SendPacket(General.MyPackets.NPCFinish()); 



now go to npcdo and add this code this is the important one



PHP Code:
 if (CurrentNPC == 9812)
                        {
                            if (
Control == 1)
                            {
                                
SendPacket(General.MyPackets.NPCSay("Im a NPC which allow you to pack DragonBalls/Meteors 20 DragonBalls/Meteors into 2 Db/Met Scrolls either 10 met/Dbs into DBScroll/Metscroll"));
                            
                                
SendPacket(General.MyPackets.NPCLink("Cool pack my meteors."3));
                                
SendPacket(General.MyPackets.NPCLink("I wanna pack 10 meteors into 1 meteor scroll"5));
                              
                           
                         
                                
SendPacket(General.MyPackets.NPCLink("I wanna pack 20 meteors into 2 Met Scrolls"7));
                               
                                
SendPacket(General.MyPackets.NPCSetFace(30));
                                
SendPacket(General.MyPackets.NPCFinish());
                            }
                            if (
Control == 7)
                            {
                                if (
MyChar.InventoryContains(108800120))
                                {
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.AddItem("720027-0-0-0-0-0"0, (uint)General.Rand.Next(36457836));
                                    
MyChar.AddItem("720027-0-0-0-0-0"0, (uint)General.Rand.Next(36457836));
                                }
                                if (
Control == 5)
                                {
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));
                                    
MyChar.RemoveItem(MyChar.ItemNext(1088001));

 
                                }
                            }
                        
                            if (
CurrentNPC == 9812)
                            {
                                if (
Control == 2)
                                    
SendPacket(General.MyPackets.NPCSay("Grrr"));
                                
SendPacket(General.MyPackets.NPCLink("I wanna pack 20 DragonBalls into 2 Db scrolls"));
                                
SendPacket(General.MyPackets.NPCSetFace(30));
                                
SendPacket(General.MyPackets.NPCFinish());
                            }
                            {
                                if (
Control == 11)
                                {
                                    if (
MyChar.InventoryContains(108800020))
                                    {
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));

                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));    
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.RemoveItem(MyChar.ItemNext(1088000));
                                        
MyChar.AddItem("720028-0-0-0-0-0"0, (uint)General.Rand.Next(36457836));
                                        
MyChar.AddItem("720028-0-0-0-0-0"0, (uint)General.Rand.Next(36457836)); 
And i gotta say that there is a part missing at if (Control == 5)
Just wanted you to discover it by yourself it's very easy and i think and a beginner would find it out.Just look at the previosly code won't say at which one cuse it would be too easy, and if you wanna post this anywere else just give me a credits and you're allowed to.



folip5 is offline  
Thanks
1 User
Old   #2
 
elite*gold: 0
Join Date: Dec 2009
Posts: 495
Received Thanks: 109
umm add db scroll to inventory after removing the dbs thats missing . It should be like : MyChar.AddItem("(DBscrollCode)-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));


[X]-Cape is offline  
Old   #3
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
Quote:
Originally Posted by [X]-Cape View Post
umm add db scroll to inventory after removing the dbs thats missing . It should be like : MyChar.AddItem("(DBscrollCode)-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
LOl don't post it like that other should keep trying so i would please you to edit your post and are you xCape from aco?
folip5 is offline  
Old   #4
 
elite*gold: 106
Join Date: Oct 2006
Posts: 6,045
Received Thanks: 1,160
#Moved


Huseby is offline  
Old   #5
 
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
you should use sumthing like this

for( int x = 0; x < 20; x++)
MyChar.RemoveItem(MyChar.ItemNext(1088000));

that will make your code a lot less big + it looks better ^^

nice job tho
AndreaCo is offline  
Old   #6
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
Quote:
Originally Posted by AndreaCo View Post
you should use sumthing like this

for( int x = 0; x < 20; x++)
MyChar.RemoveItem(MyChar.ItemNext(1088000));

that will make your code a lot less big + it looks better ^^

nice job tho
ya thanks i completely forgot about the for loop x.x
folip5 is offline  
Old   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,196
Received Thanks: 5,306
Quote:
Originally Posted by AndreaCo View Post
you should use sumthing like this

for( int x = 0; x < 20; x++)
MyChar.RemoveItem(MyChar.ItemNext(1088000));

that will make your code a lot less big + it looks better ^^

nice job tho
Aww I was just gonna mention using a for or while loop.


Also... why not use a met/db storage npc so you can store/remove as many as you like? Saves alot of time for players and is a very useful npc to code.

Regardless: Good job. Nice to see ppl trying to release stuff for ppl.
pro4never is offline  
Old   #8
 
elite*gold: 0
Join Date: Dec 2009
Posts: 62
Received Thanks: 11
Quote:
Originally Posted by pro4never View Post
Aww I was just gonna mention using a for or while loop.


Also... why not use a met/db storage npc so you can store/remove as many as you like? Saves alot of time for players and is a very useful npc to code.

Regardless: Good job. Nice to see ppl trying to release stuff for ppl.
well was in a hurry and didn't reallised that.xD
folip5 is offline  
Old   #9
 
elite*gold: 0
Join Date: Apr 2010
Posts: 273
Received Thanks: 50
Quote:
Originally Posted by AndreaCo View Post
you should use sumthing like this

for( int x = 0; x < 20; x++)
MyChar.RemoveItem(MyChar.ItemNext(1088000));

that will make your code a lot less big + it looks better ^^

nice job tho
big code dosn't mean is bad.
But true, he could do like that
zTREME is offline  
Old   #10
 
elite*gold: 0
Join Date: Oct 2008
Posts: 2
Received Thanks: 2
my problem is i dont know where to put thouse Npc codes should i put them in my navicat SQL or where? please help me out?
thnx
rampe93 is offline  
Old   #11
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 369
Quote:
Originally Posted by rampe93 View Post
my problem is i dont know where to put thouse Npc codes should i put them in my navicat SQL or where? please help me out?
thnx
Put them in your microwave.


Syst3m_W1z4rd is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
Power Source CO HELP!!!!
Hey ok so i used this guide here, YouTube - How to make conquer online private server, and got my server all up and working ^^ its awesome however i...
47 Replies - CO2 PServer - Discussions / Questions
Can someone get me power source with talis ancd ninja ? :/
pla can anyone help :/
0 Replies - CO2 Main - Discussions / Questions
(GUIDE) Power Source Codes
hello i use power Source i search alot for codes for it and i try to make a Guide and u put here the codes and wish help alot :o :o
2 Replies - CO2 PServer Guides & Releases
I add new spaw for Power Source
Here i post my sql file, Add monter and Good spaw, in Ape, Bird, Desert, Mistic Castle, Phoenix, Twin City, And very Good Spaw in all lab! :)
3 Replies - CO2 PServer - Discussions / Questions



All times are GMT +2. The time now is 14:48.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.