[Help] Couple questions.. mostly about npcs

06/17/2009 22:39 n0mansland#1
Alright i got a couple questions for ya...

1. When you code npcs' you base the case number on their npc type which will make that code for every npc for w/ that type.

How do you make it so it's for only 1 npc of that kind.. Like im making 2 arena guards 1 for pk arena 2 for TC pk map and BI pk map... I need to make Number 2 seperate but still the same npc.

If you cant just tell me i need to look in the list and find another one...

2.How do you add new portals? I know that some portals are already in some maps but just dont have a location to teleport but i wanna add a whole new one..

3. what the code for npc adding items and please put how you add it... Its confusing for me x.x

That should be about it for right now I will add more later if i need to
06/17/2009 22:52 quadruple1#2
idk
06/17/2009 23:58 kinshi88#3
I'm guessing this is for CoEmu v2...

1. All NPCs have their own unique ID. The case would be this unique ID.
I think you were thinking of the Mesh ID, which is what they look like.

2. In the database, go to the portals table. Add the correct values in.
(Note: This will not add a new blue portal thing on the map, this is just for existing ones)

3. Search around, this has been covered.
06/17/2009 23:58 CIRASH#4
yes again im back. I'll try to help you. First off for jail npcs just make 2 number 2 npcs have a different case in your database. IDK if it works but i believe it will.

tell me what you want them to say or post what you have and ill try to make it work.
06/17/2009 23:59 CIRASH#5
yes again im back. I'll try to help you. First off for jail npcs just make 2 number 2 npcs have a different case in your database. IDK if it works but i believe it will.

tell me what you want them to say or post what you have and ill try to make it work.
06/18/2009 01:03 n0mansland#6
#CIRASH Alright my pk arena dude already has text (ArenaGuard)

now im making another one to take players to Pk maps

I'll make the code and put it up here so it makes your life easier

Code:
                case 10021: // ArenaGuard 2
                    {
                        if (LinkBack == 0)
                        {
                            Text("I can take you to amazing PK maps of Twin City or Bird Island. In this area you will not lose", CSocket);
                            Text(" equipped items or get any PK Points. In there is an NPC that will supply you with Health and Mana Potions but I will have to fee 100,000 Gold.", CSocket);
                            Link("Take me to the Twin City PK Map!", 1, CSocket);
                            Link("Take me to the Bird Island PK Map!", 2, CSocket);
                            Link("I'm fine where I am.", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            if (CSocket.Client.Money >= 100000)
                            {
                                Teleport(1505, 163, 227, 0, CSocket);
                                Money(-100000, CSocket);
                            }
                            else if (LinkBack == 2)
                            {
                                if (CSocket.Client.Money >= 100000)
                                {
                                    Teleport(1507, 89, 113, 0, CSocket);
                                    Money(-100000, CSocket);
                                }
                            }
                            break;
                        }
                    }
#kinshi88

Thanks but I already know how to set coords for it i was wondering if it was possible to add the blue thing
06/18/2009 01:21 CIRASH#7
Okay illwork on it now =]

edit: Where do you want this npc to be? gimme coords and everything
06/18/2009 01:34 n0mansland#8
ok i want it to be

1002 427 257 (TC)

k once you have it done i will look at it and figure it out to use it for the npcs that give free pots
06/18/2009 01:44 CIRASH#9
ok this shouldnt take long xD
06/18/2009 01:48 n0mansland#10
ok thanks
06/18/2009 02:02 CIRASH#11
Hmm, I actually couldnt get this working man. It's gonna annoy me. if i fix it ill be sure to tell you
06/18/2009 02:18 n0mansland#12
alright thanks brb
06/18/2009 03:35 CIRASH#13
Hey i fixed it =] something was wrong with your money statements or sumtin

use this

Code:
                case 956: // ArenaGuard
                    {
                        if (LinkBack == 0)
                        {
                            Text("I can take you to amazing PK maps of Twin City or Bird Island. In this area you will not lose", CSocket);
                            Text(" equipped items or get any PK Points. In there is an NPC that will supply you with Health and Mana Potions but I will have to fee 100,000 Gold.", CSocket);
                            Link("Take me to the Twin City PK Map!", 1, CSocket);
                            Link("Take me to the Bird Island PK Map!", 2, CSocket);
                            Link("I'm fine where I am.", 255, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            Teleport(1505, 163, 227, 0, CSocket);
                        }
                        else if (LinkBack == 2)
                        {
                            {
                                Teleport(1507, 89, 113, 0, CSocket);
                            }

                        }
                        break;
                    }

you know how to add an npc since i h believe i helped you with it be4 xD
and just use 956 as npctype and 588 as your NPCid
06/18/2009 05:01 n0mansland#14
Thanks for fixing it but howd you get it as a seperate NPC? im looking at it and i dont see how you came up with it

EDIT what about subtype