|
You last visited: Today at 01:22
Advertisement
[Release] Activate/Un-Activate NPC by Command.
Discussion on [Release] Activate/Un-Activate NPC by Command. within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
12/09/2008, 21:17
|
#1
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,160
|
[Release] Activate/Un-Activate NPC by Command.
So ive seen alot of you wanted this, well here it is, coded this in about 4minutes total and never tested it,so you will probably be the first one.
So, all you actually do is to make the server check if xxx is activated, if it is, it shows the real npc chat, if it isnt, it tells you that it isnt. And you activate/unactivate the xxx with a command. Well here you are:
In General.cs , under : public static System.Timers.Timer Thetimer;
Code:
public static bool CanTalkToNPC = false;
Search for : if (Splitter[0] == "/ServerRestart")
Above that , add:
Code:
if (Splitter[0] == "/startnpc")
{
string K = "";
if (General.CanTalkToNPC)
{
K = "un-activated!";
General.CanTalkToNPC = false;
}
if (!General.CanTalkToNPC)
{
K = "activated!";
General.CanTalkToNPC = true;
}
World.SendMsgToAll("The xxxx NPC has been " + K, "NPCHandeler", 2005);
}
This is how the command works:
If you type /startnpc , it will check if the npc is activated. If the npc(s) is activated, they will be un activated, and vice versa. Also it announce the status of the npc.
And this is an example of how to NPC code work:
Search for : if (CurrentNPC == 12)
Until you get to the NPC TALK
Above, add this:
Code:
if (CurrentNPC == 1339)
{
if (!General.CanTalkToNPC)
{
SendPacket(General.MyPackets.NPCSay("This NPC is not started yet. Please wait for an announcment!"));
SendPacket(General.MyPackets.NPCLink("Okay.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Hello there! Want me to teleport you to xxxx?"));
SendPacket(General.MyPackets.NPCLink("Sure", 1));
SendPacket(General.MyPackets.NPCLink("Just passing by..", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
Now that is an example how it could look like.
Hope it gave you any ideas or/and knowledge. Atleast I hope I helped someone.
Emme
|
|
|
12/10/2008, 02:02
|
#2
|
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
|
Hmmm... I never thought of doing something like this. Probably won't test this itself, but it gives me an idea. Setting NPC's to some sort of timer, in which at certain times they'll appear for quests or what not, and the rest of the time, have their location switched to an unreachable map.
|
|
|
12/10/2008, 08:55
|
#3
|
elite*gold: 0
Join Date: Sep 2008
Posts: 347
Received Thanks: 141
|
Thanks emme So Much
|
|
|
12/10/2008, 09:14
|
#4
|
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
|
Quote:
Originally Posted by E*PvPers
Thanks emme So Much
|
Im still Waiting to get hacked Mr.(Hacker) lol And Still i didnt Get it ... hmm lets see ,maybe your just full of ****?
|
|
|
12/10/2008, 09:18
|
#5
|
elite*gold: 0
Join Date: Sep 2008
Posts: 347
Received Thanks: 141
|
Quote:
Originally Posted by damianpesta
Im still Waiting to get hacked Mr.(Hacker) lol And Still i didnt Get it ... hmm lets see ,maybe your just full of ****?
|
wanne try Give me ur IP and tell Bye bye to ur PC
|
|
|
12/10/2008, 09:58
|
#6
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,160
|
Press thanks if you liked this, e.x used it, got ideas, or just like it.
And for the timer, thats very easy. Add a timer in the SingleNPC class as I call it, of lets say 10 minutes. Now, start the NPC + the timer by using a command, like this:
if (Splitter[0] == "/start")
{
SingleNPC G = new SingleNPC(INFO HERE, ALSO THE TIMER HERE);
Spawn G;
}
Now a timer is started, on what time you defined it to in the code above. Now you can do like this for the timer:
if (Timer_Elapsed)
{
foreach (DictionaryEntry DE in NPCs.AllNPCs)
{
SingleNPC Npc = (SingleNPC)DE.Value;
if (Npc.UID == NPCUIDHERE)
Npc.X == 999;
Npc.Y == 999;
Npc.Map == 999;
}
}
Well something like that, I never actually did this and it was directly coded in e*pvp
|
|
|
12/10/2008, 14:56
|
#7
|
elite*gold: 0
Join Date: Sep 2008
Posts: 259
Received Thanks: 64
|
Emme i love u so much
that was much easier then i thought
i thought it was so difficult xD
|
|
|
12/10/2008, 15:06
|
#8
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,160
|
press thanks then..
|
|
|
12/10/2008, 15:07
|
#9
|
elite*gold: 0
Join Date: Sep 2008
Posts: 259
Received Thanks: 64
|
rofl forgot to do that
tnx for remembering
keep up the good work
ps: u gonna release more these days?
|
|
|
12/10/2008, 15:34
|
#10
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,160
|
Sure,just gimme ideas.
|
|
|
12/10/2008, 15:40
|
#11
|
elite*gold: 0
Join Date: Sep 2008
Posts: 259
Received Thanks: 64
|
well about the treasure hunt when the box drops something u can't pick it up
how to fix that?
|
|
|
12/10/2008, 19:06
|
#12
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,160
|
You cant pick it up? Wierd, well lets see if someone else got that error. Besides, post in the thread for that subject.
|
|
|
12/10/2008, 19:14
|
#13
|
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
|
Quote:
Originally Posted by E*PvPers
wanne try Give me ur IP and tell Bye bye to ur PC
|
What Kind of Hacker Needs IP to Pwn Someones Comp? I lol'd now ... seriously get a life rather than talking **** just like 10 year old kid
|
|
|
12/10/2008, 22:17
|
#14
|
elite*gold: 0
Join Date: Sep 2008
Posts: 259
Received Thanks: 64
|
Quote:
Originally Posted by EmmeTheCoder
You cant pick it up? Wierd, well lets see if someone else got that error. Besides, post in the thread for that subject.
|
kk posted in treasure hunt topic
|
|
|
12/10/2008, 22:30
|
#15
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
You can't do **** with only an IP.
The only way you can even connect to the host is through an open port, or a bridging program. If they're blocking their router, you have no access.
Even then, you can't connect unless a program is running on the port, which means you'd have to install it some way.
|
|
|
 |
|
Similar Threads
|
[please]help me to activate any hack
07/26/2010 - Dekaron - 12 Replies
i downloaded a lot of hacks and follow the explanations and dont sucsses to activate any hack.
i faild all
please help me in this.
im very want thats but im amateur in this.
i need a good and detailed guide.
please help me guys.
thanks
|
[Release] Activate Fireworks
02/25/2010 - CO2 PServer Guides & Releases - 28 Replies
this is 100% my work don't spam with useless posts
since so many requests i decided to make it very simple just place the code in character.cs below the use item void
#region Firwork EndlessLove
case 720031:
{
RemoveItem(I);
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "firework-1love"));
}
|
Activate Items???????????
02/01/2010 - Conquer Online 2 - 3 Replies
Haven't played CO for a month, installed win 7 and took a bit to get CO running again. Started playing today and I click on a pot and I get a message to activate it. I click ok and it does nothing. Same with scrolls.
WTF is this?
|
sf new patched how to activate the old WH
01/22/2009 - Soldier Front - 2 Replies
how to make new WH because i'm seek and tired beeing seen by those waller that i've been playing with i need to make revenge...
pls help:rtfm:
|
An1 know how to activate multiclient now?
01/27/2006 - Silkroad Online - 1 Replies
hey guys.. before the 3rd beta.. the trick to open another client for sro is to right click on the icon and choose run as.. it perfectly work.. but now that the 3rd beta is out and there's the hacking prevent system working now.. u won't b able to do it anymore.. i wanna ask if an1 find out how to open more clients in the game on other ways or if they have other programs that they are using and wanna share to the community.. thats all ty
|
All times are GMT +2. The time now is 01:22.
|
|