Heya guys
I've got a question....
I almost made a quest like monster hunter but
how can I make the NPC only gives the prize if the char has killed like 30 mobs???
go to Character.cs and create a new variable called:
Quote:
public int MonsterHunt = 0;
and in the NPC for example insert in the new text: "if (GC.MyChar.MonsterHunt = 30)"...
I took my time to create u dis simple one...Credits goes to me if you use this...hope u learn from dis one ^^.
Code:
#region MonsterHunt
case 35567:
{
if (Control == 0)
if (GC.MyChar.MonsterHunt = 30)
{
GC.AddSend(Packets.NPCSay("I see you have killed 30 monsters, you will now get 30,000 CPs according to the kills!"));
GC.AddSend(Packets.NPCSay("I want the prize!, 1"));
GC.AddSend(Packets.NPCLink("Okay!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
if (GC.MyChar.CPs >= 30000)
{
GC.MyChar.CPs += 30000)
GC.AddSend(Packets.NPCSay("Here is your reward young one! enjoy it!, 255"));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("You have not yet killed 30 monsters to claim your prize!"));
GC.AddSend(Packets.NPCLink("I see.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
well Hope I helped you yet again XD...+thanks if I helped rememba! ^_0 If u get errors from dis den tell me...
The Following User Says Thank You to killersub For This Useful Post:
To implement the NPC ID, you simply go to ur OldCODB folder and open up the NPCs.txt file and find a new npc u added or add a new one...
Quote:
case 35567:
as I stated in my above post that beside "case" is the NPC ID which you put "FIRST" when you create a new NPC spawn...now I'll show u how to create a new NPC spawn in ur NPCs.txt...:
first open it up...and then go to the bottom of the file and enter in a blank space and put this(example):
Quote:
35567 2480 2 0 1002 427 378
NOW, notice the numbers...what do they mean?
"35567"-means a random NPC ID you gave/have given the NPC you made
"2480"-is the NPC Type which is basically what the NPC will look like...
"2"-is the NPC flags...1 is for shop and 2 is for a normal npc...
"0"-is the NPC direction, meaning where the NPC is facing(there's more...)
"1002"-is the Map(ID) where the NPC will be put...find all the Map IDs here:[Only registered and activated users can see links. ]
"427,378"-are the X-coordinates and Y-coordinates of what spot the NPC will get placed in...
anyways I hoped you understood dis lol...I know it's difficult but I bet you can understand it A.S.A.P. goodluck!