Register for your free account! | Forgot your password?

You last visited: Today at 05:17

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

Advertisement



[FAQ] HellmouthSource

Discussion on [FAQ] HellmouthSource within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Closed Thread
 
Old 03/10/2011, 17:46   #46
 
RT-Gaming's Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 13
Received Thanks: 1
Hey Pro4Never could you be so nice and explain me a bit more what I excactly need to add??

thanks alot !
RT-Gaming is offline  
Thanks
1 User
Old 03/10/2011, 19:15   #47
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Here's a little hint...

The mobspawn code never adds the mob to the map or to the members dictionary. That would be where I'd recommend starting.
pro4never is offline  
Thanks
2 Users
Old 03/11/2011, 06:22   #48
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
What`s wrong with this o.0? ID IS 62 but it tells me on the created NPC that there is no script?

Code:
#region Plit
                            case 62:
                                {
                                    if (LinkBack == 0)
                                    {
                                        Text("Do you want enter the guild arena?", Client);
                                        Link("Yes.", 9, Client);
                                        Link("Just passing by.", 255, Client);
                                        Finish(Client);
                                    }
                                    else if (LinkBack == 9)
                                        Teleport(Client, 348, 339, 1038);
                                    break;
                                }
                            #endregion
denominator is offline  
Old 03/11/2011, 06:37   #49
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Make sure that the script is placed in the switch statement where the others are and that you have debugged the project since editing (you are opening the whole project not just the .cs file)

Also double check that the error that pops up tells you it's using that npc id.

Also.. isn't this already coded in the external npc files? Does no one have any desire to use external scripts that imo are SOOO much easier?
pro4never is offline  
Old 03/11/2011, 07:27   #50
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
I love the external npc system I just have no need to want to use ur source when id rather help on the real hellmouthco server
BioHazarxPaul is offline  
Old 03/11/2011, 07:28   #51
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
It was a test and I am used to using 5165, I know how to add NPCs but a few things change for this like it`s just link rather than NPCLink etc. I F6 then F5ed it like I always do, I added the NPC to database so he is actually there. Just not sure as to why ID 62 is not matching with the script?


Code:
                   return;
                                        }
                                        Program.ActionQueue.Enqueue(new Action(null, ActionType.ReturnFlag, Program.CTF.Blue, 5000));
                                        //RESPAWN FLAG
                                    }
                                    else
                                    {
                                        Text("Go to the opposite side of the map and bring me back the blue flag!", Client);
                                        Link("Send Me to Twin City", 9, Client);
                                        Link("Will do!", 255, Client);
                                        Finish(Client);
                                    }
                                }
                                return;
                            #region Plit
                            case 62:
                                {
                                    if (LinkBack == 0)
                                    {
                                        Text("Do you want enter the guild arena?", Client);
                                        Link("Yes.", 9, Client);
                                        Link("Just passing by.", 255, Client);
                                        Finish(Client);
                                    }
                                    else if (LinkBack == 9)
                                        Teleport(Client, 348, 339, 1038);
                                    break;
                                }
                            #endregion
                            case 9:
                                Client.ChangeGarmentDisguise(0);
                                Teleport(Client, 439, 385, 1002);
                                return;
                        }
                        return;
                    case 10010:Client.Send(Packets.GeneralData(Client.UID, 4, Client.X, Client.Y, 0x7e)); return;
                    case 10012: Client.Send(Packets.GeneralData(Client.UID, 4, Client.X, Client.Y, 0x7e)); break;
                    case 10028: Client.Send(Packets.GeneralData(Client.UID, 4, Client.X, Client.Y, 0x7e)); break;
                    case 10011: Client.Send(Packets.GeneralData(Client.UID, 4, Client.X, Client.Y, 0x7e)); break;
                    case 10027: Client.Send(Packets.GeneralData(Client.UID, 4, Client.X, Client.Y, 0x7e)); break;
                    case 44: Client.Send(Packets.GeneralData(Client.UID, 4, Client.X, Client.Y, 0x7e)); break;
                    case 4101: Client.Send(P
Attached Images
File Type: jpg 44475839.jpg (447.7 KB, 106 views)
denominator is offline  
Old 03/11/2011, 07:32   #52
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
I was bored and couldn't sleep...


So I can confirm that fixing monster (basic spawn) can be done within about... 10 lines of code?

Seriously guys... place some debug and you will easily find it. The only reason I didn't find it in like 2 seconds is because I was break pointing the wrong section which the exception was talking about not realizing which part was null.


NO; I WILL NOT BE POSTING THE ACTUAL FIX. I WILL SIMPLY POINT IN THE RIGHT DIRECTION

This is something you guys NEED to be able to do.

Step 1: Make sure it is loading from database (by default I disabled that)

Step 2: Make sure the monster spawn is setting up everything right.

There are typos causing issues in both the database AND the spawn class. It also is not setting up all monster variables

Step 3: Make sure I am actually adding the mob to the map/spawn members once I generate it (*gasp* how has no one seemed to even notice that I removed that? ^^)


Anndd that's all the help i'm providing.

yes, monsters can be attacked and die. They do not attack back, move, respawn, despawn or drop anything. Those systems are NOT coded and should be done your self.





<edit>

Sorry for the double post. wireless network sucks.

@ question about npc.

it's not working cause you wrote it as one of the linkbacks for the capture the flag wars...

Notice there are still more }/return; statements after where you are adding the code.

But yes... try looking through the external npcs... there was already a guild conductor in there which you could use as an example (or any of the other conductors)

I suggest /debug so server prints out like everything possible to you including what npc you are talking to.
pro4never is offline  
Thanks
1 User
Old 03/11/2011, 07:42   #53
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
Ok thanks I was putting it into the wrong area lol. It`s for a TG guy but I just wanted to test that I could add an NPC and also add script to it
denominator is offline  
Old 03/11/2011, 07:56   #54
 
elite*gold: 0
Join Date: Jan 2011
Posts: 7
Received Thanks: 0
hey, i'm coding npcs using the python way (npcs.npc files) but i can't figure out how to make an npc make somone learn a skill.
e.g trojangod(promo) i want him to teach players herc. how would i go about writing this in the .npc files or has a code to learn skills not been added?
anyway, thanks in advance
noblewarrior is offline  
Old 03/11/2011, 07:57   #55
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
and.... it just went from how do i make monsters spawn to how do i make them drop items and move... should just give up now pro its not going to end people always want everything handed to them on here.

***With a select few I guess ill add that do try***
BioHazarxPaul is offline  
Old 03/11/2011, 08:02   #56
 
elite*gold: 0
Join Date: Aug 2010
Posts: 951
Received Thanks: 76
When you say external do you mean using phpmyadmin/navicat? I don`t use navicat as it`s not actually needed with xampp lol. Also I attempted to use the GuildWars.cs from the other project but seemed to fail at it lol. I`m sure I will eventually crack it though

Ok I decided to continue having a play around with this and had a look at what you have said about mob spawning, needless to say I get an error sooooooo I decided to Google the error and I assume I need something like this code?

Code:
if (null == formCollection)
            {
                return;
            }
            object obj = formCollection["UserId"];
            if (null == obj)
            {
                return;
            }
I have had a look at this and tried several things but I`m not to sure on what it should be because Game.World obviously does not exist in this source lol.

Code:
Game.World.SendMsgToAll("SYSTEM", "http://somewebsite.com", 2105, 0);
I also tried

Code:
Link("http://somewebsite.com", 2105, Client);
denominator is offline  
Old 03/11/2011, 12:41   #57
 
elite*gold: 0
Join Date: May 2008
Posts: 22
Received Thanks: 1
Pro4Never can you help us with coding monsters?
dimepp95 is offline  
Old 03/11/2011, 15:37   #58
 
elite*gold: 0
Join Date: Apr 2009
Posts: 8
Received Thanks: 0
mane i can execute sql file ... what should i do?:|
komy9 is offline  
Old 03/11/2011, 15:48   #59
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
@sql: install sql with innodb enabled and try again.

@denom: a null reference exception means one or more variable is never assigned. Place a breakpoint and find out which one.

@ mobs: no, do it yourself. I've provided everything
pro4never is offline  
Old 03/11/2011, 16:36   #60
 
elite*gold: 0
Join Date: May 2009
Posts: 45
Received Thanks: 5
@pro4never i would suggest to not release mobs classes or codes for any reason.
and 1 more question! i know well at C# but i didn't read the whole source yet .. but i tried to make npc that upgrades weapon level/quality but when i use something like this it don't upgrade the level.. didn't check the method also! xD
PHP Code:
Client.UpgradeEquipLevel(8); 
but when i use
PHP Code:
Client.UpgradeEquipQuality(8); 
the quality upgrades!

here
PHP Code:
HeadBand //level
weapon 1 //level / quality
weapon 2 //level / quality
Armor //level
Necklace //quality
Ring //quality
Boot //quality 
Some of them accept level upgrade and some of them don't the same for the quality upgrade.



Quote:
Originally Posted by BioHazarxPaul View Post
and.... it just went from how do i make monsters spawn to how do i make them drop items and move... should just give up now pro its not going to end people always want everything handed to them on here.

***With a select few I guess ill add that do try***
i don't know why did he released the source either.. if they want something i suggest to let them think and do it themselves i expected annoying will be the 1st thing he will get ..
mohamedkhaled is offline  

Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.