Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 05:58

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

Advertisement



Adding NPC's and Adding Items in Shopping Mall

Discussion on Adding NPC's and Adding Items in Shopping Mall within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 01/24/2012, 21:53   #16
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
search

{ "/addnpc", Command_AddNpc },

That links to the Command_AddNpc method. Right click that and you see how it functions. In this case it takes 4 parameters.

UID Mesh Flag and Name
pro4never is offline  
Old 01/24/2012, 22:25   #17
 
elite*gold: 0
Join Date: Mar 2009
Posts: 67
Received Thanks: 3
this is the command:

Code:
        private static bool Command_AddNpc(Player user, string[] data)
        {
            if (user.Permission < PlayerPermission.GM) return false;
            Npc npc = new Npc();
            npc.UID = uint.Parse(data[1]);
            npc.ID = npc.UID;
            npc.Name = data[4];
            npc.Mesh = ushort.Parse(data[2]);
            npc.Map = user.Map;
            npc.Location = user.Location;
            npc.Flag = byte.Parse(data[3]);
            user.Map.Insert(npc);
            Database.AddNpc(npc);
            return true;
So I need to use the UID, NAME, MESH and FLAG. I did that command. But that didn't worked.

Honestly I find that weird.

Now it is working. I don't know how it is possible but it is fixed. Thank you.

I only have one problem now. I want to let it speak, but when I add this into 300001.npc it isn't talking. I relogged in because otherwise it wouldn't work.

Mine Code:
Code:
def npc(Client, Option):
    if(Option == 0):
        Text("What? A group of Cattle Thieves Stole the Saddles of the cavalry! Without the")
		Text(" Saddles, they won't be able to hold any drills. If you can help get the saddles")
		Text(" from the Cattle Thieves, I might give you a Steed as reward!")
        Link("Here is the saddle.", 1)
		Link("Where are the thieves?", 255)
        Finish()
    if(Option == 1):
        Text("Thanks for bringing it back! Please choose from one of these steeds!")
		Link("Black Steed.", 255)
		Finish()
    return 0
Code of Already existing NPC:
Code:
def npc(Client, Option):
    if(Option == 0):
        Text("Do you want to leave the market? I can teleport you for free.")
        Link("Yeah. Thanks.", 1)
        Link("No, I shall stay here.", 255)
        Face(156)
        Finish()
    if(Option == 1):
        PreviousMap()
    return 0
What is wrong with mine code?
warzie005 is offline  
Old 02/06/2012, 03:54   #18
 
Nyorai's Avatar
 
elite*gold: 200
Join Date: Sep 2011
Posts: 202
Received Thanks: 107
Code:
def npc(Client, Option):
    if(Option == 0):
        Text("What? A group of Cattle Thieves Stole the Saddles of the cavalry! Without the")
        Text(" Saddles, they won't be able to hold any drills. If you can help get the saddles")
        Text(" from the Cattle Thieves, I might give you a Steed as reward!")
        Link("Here is the saddle.", 1)
        Link("Where are the thieves?", 255)
        Finish()
    if(Option == 1):
        if(Client.HasItem(723903)):
            Text("Thanks for bringing it back! Please choose from one of these steeds!")
            Link("Black Steed.", 2)
            Link("White Steed.", 3)
            Link("Maroon Steed.", 4)
            Finish()
        else:
            Text("I'm sorry but you don't have a Saddle!")
            Link("Ops, Sorry.", 255)
            Finish()
    if(Option == 2):
        Client.RemoveItem(723903)
        Client.AddItem(723859)
        Text("There you go, a you got a +1BlackSteedPack now!")
        Link("Thanks alot", 255)
        Finish()
    if(Option == 3):
        Client.RemoveItem(723903)
        Client.AddItem(723856)
        Text("There you go, you got a +1WhiteSteedPack now!")
        Link("Thanks alot!", 255)
        Finish()
    if(Option == 4):
        Client.RemoveItem(723903)
        Client.AddItem(723855)
        Text("There you go, you got a +1MaroonSteedPack now!")
        Link("Thanks alot!", 255)
        Finish()
    return 0
There you go, analyse it so you can see what you've done wrong please

EDIT: By the way, it's adding +1 Packs since I was too lazy to make the +0Packs work ahah
Nyorai is offline  
Thanks
1 User
Old 03/17/2015, 15:53   #19
 
elite*gold: 0
Join Date: Apr 2012
Posts: 32
Received Thanks: 2
Wich table in the database i need to edit?
And is there and list with item id's?
jschellekens is offline  
Old 03/17/2015, 19:19   #20
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 8
please be more specific. You can find all the id's that you need in the source.
t0pr0 is offline  
Old 03/17/2015, 22:35   #21
 
elite*gold: 0
Join Date: Apr 2012
Posts: 32
Received Thanks: 2
and if i edit shops? wich database table i need to edit?
jschellekens is offline  
Old 03/19/2015, 03:21   #22
 
elite*gold: 0
Join Date: Jun 2008
Posts: 60
Received Thanks: 8
Editing the shops has to be done both client and server sided. What to edit, depends on the source. You have to set the cp price for the item in the shop in the itemtype table tho

Verstuurd van mijn P6-U06 met Elitepvpers, mogelijk gemaakt door appyet.com
t0pr0 is offline  
Reply


Similar Threads Similar Threads
a Qustion about Adding items to Items mall ... PLEASE HELP
11/25/2011 - SRO Private Server - 0 Replies
Hello i need to add some items to my incoming server i need to add Circus bear and , Devil spite upgrader , and Some new avatars i am editing in those :
Adding NPC's
10/25/2011 - Rappelz Private Server - 10 Replies
Hey guys I was just woundering if someone could tell me how to add a NPC to an x,y location and how to stock that npc ?
[HELP] Adding new items to Shopping mall
08/29/2010 - EO PServer Hosting - 11 Replies
Well :/ I tryed Makeing MY shopping mall better i added The Exp ball pack B,C and A And some other casuals. what happened was i logg in after editing my Shop.DAT and ItemType Useing Editing tools From Revo And then i logg in and some a invisable Some show but i cannot buy :S please can some boddy help me PLEASE!!! lmao not many people help me on here just 1 person to accualy help me thank you !!
[VIDEO TUTORIAL]Adding an item to shopping mall(by hex)!!
04/18/2009 - EO PServer Hosting - 8 Replies
Ok this is another video tutorial by me ...enjoy it and if u think that was good support me(with ur thanks)coz some guys here believe that everybody knows how to hex edit the mall... P.S.:I am reffering to u Grandalio... YouTube - Adding a new item to shopping mall!!!!
[Guide] Adding item to shopping mall.
12/16/2008 - EO PServer Guides & Releases - 8 Replies
ok guys i would like to thanks the great :p cypherghoser1 first for releasing how to replace item i wouldn't remember all this without his guide, so thought of sharing this as a pay back. :handsdown: *Recommanded to read this first* http://www.elitepvpers.com/forum/eo-pserver-hostin g/189204-guide-hexedit-shopping-mall-replace-items -equipment-eggs.html <<Cypherghoser1's guide alright everyone probably seen his guide about replacing item on shopping mall.. so lets now do this new version of...



All times are GMT +2. The time now is 05:58.


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.