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?
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
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.
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
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***
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.
@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
Some of them accept level upgrade and some of them don't the same for the quality upgrade.
Quote:
Originally Posted by BioHazarxPaul
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 ..