Register for your free account! | Forgot your password?

You last visited: Today at 18:15

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

Advertisement



[Release]2 NPCS

Discussion on [Release]2 NPCS within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 05/24/2009, 16:10   #16
 
ih8you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 146
Received Thanks: 38
Lol im new too, You add these to Client.cs where the npcs are...

The dialog goes where the NPC dialog is in Client.cs, and the controls goes where the controld are in dialog, To find them search for a NPC ID that is already in your server, thats where the dialog goes.

Then search the same ID again and thats where Controls go
ih8you is offline  
Old 05/26/2009, 19:44   #17
 
elite*gold: 0
Join Date: Mar 2006
Posts: 7
Received Thanks: 0
Hmm. my scripts are a little different.

I'm still have a small issue. Im using TheCOServer and I have attached both my Client.cs and my NPCStuff/Dialog.ini In the npc dialogs the coding is different. So not exactly sure where to add the Dialog or the Controls for this script. Sorry for the long post!

My Client.cs
Quote:
using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.Net;
using System.Net.Sockets;
using TheCOServer.PacketHandler;
using TheCOServer;
using System.Timers;

namespace TheCOServer
{
public class Client : object
{
public Cryptographer Crypto;
public Character MyChar;
public Socket ListenSock;
public Hashtable ServerClients;
public string Account = "";
public byte Status = 0;
public uint MessageId = 0;
public int MyClientId;
public string Address;
public int Port;
public Packets ThePackets = new Packets();
public bool Online = true;
public Timer CheckIfOnline = new Timer();
public bool InWorld = false;

public Client()
{
Crypto = new Cryptographer();
CheckIfOnline.Interval = 1000;
CheckIfOnline.Elapsed += new ElapsedEventHandler(Check);
CheckIfOnline.Start();
}

void Check(object source, ElapsedEventArgs e)
{
SendPacket(new byte[0]);
if (ListenSock != null)
if (!ListenSock.Connected)
{
if (MyChar != null)
MyChar.SaveChar();
Online = false;

CheckIfOnline.Stop();

if (TheMain.GameClients.Contains(Address + ":" + Port))
TheMain.GameClients.Remove(Address + ":" + Port);

if (WorldHandler.AllClients.Contains(MyClientId))
WorldHandler.AllClients.Remove(MyClientId);

if (MyChar != null)
if (InWorld)
WorldHandler.RemovePlayer(this);
}
}


public void SendPacket(byte[] Dat)
{
try
{
if (ListenSock.Connected)
if (Online)
{

byte[] TheData = new byte[Dat.Length];
Dat.CopyTo(TheData, 0);
Crypto.Encrypt(ref TheData);
ListenSock.Send(TheData);
}
}
catch (Exception) {}
}

public void ReceivePacket(byte[] Dat)
{
if (ListenSock.Connected)
if (Online)
{
byte[] Data = Dat;
Crypto.Decrypt(ref Data);
PacketHandlerData Handle = new PacketHandlerData();
Handle.HandlePacket(Data, this);
}
}

public void Drop()
{
TheMain.GameServer.DropClient(Address,Port);
}
}
}
My NPCStuff/Dialog.ini

Quote:
[200]
face=3
txt0=I'll be the soreing things for you hopefully
opt0=ok

[65224]
face=3
txt0=I'll be the one giveing you hp and mp pots.
opt0=ok

[65223]
face=3
txt0=Hello want me to bring you to Twin City
txt1=cya
opt0=Yes Please-No thanks!
opt1=thank you
req=0
rew=teleport, 1002,439,389

[1060]
face=3
txt0=Welcome to Vanquish Online Would you like me to sent you acroose the bridge
txt1=well done u got it
opt0=Yes Please-No thanks i'd like to jump!
opt1=thank you
req=0
rew=teleport, 1010,093,065

[10053]
face=2
txt0=Hello there how are you i am the teleporter magician where do u want to go
opt0=Bird Island-Phoenix Castle-Desert City-Mine Cave-Market-Lottory-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1015,723,573-teleport,1011,190,271-teleport,1000,500,650-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47

[10063]
face=3
txt0=I have great armor items for starters! Elite+2 cost 215 cps
txt1=enjoy compliments of ghett0
opt0=Elite war armor-Elite tro armor-Elite tao armor-Elite Archer armor-I'm Broke!
opt1=Ok thank you
req=cps,215-cps,215-cps,215-cps,215-cps,cps,645-cps,645-cps,645-cps,645-
rew=item,131208,2,1,1,1,1-item,130908,2,0,0,1,1-item,134208,2,0,0,1,1-item,133908,2,0,0,1,1

[99999]
face=2
txt0=Would you Like to Go Fight(PK)
opt0=No Thanks-O.K.
rew=teleport,1005

[10050]
face=2
txt0=Hello there how are you i am the teleporter magician where do u want to go
opt0=Ape Mountain-Bird Island-Phoenix Castle-Desert City-Mine Cave-Market-Lottory-Just passing by.
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1015,723,573-teleport,1011,190,271-teleport,1000,500,650-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47
[923]
face=4
txt0=Hey , u feel lucky today :P ,ok i will let you try your luck if you give me 27CPs
opt0=Ok here you are the 27 CPs-No thanks
req=cps,27
rew=teleport,700,40,47

[924]
face=4
txt0=So had a good luck ?, hope u a better one next time
opt0=Yes i wanna leave-No i will try it again-
req=0-cps,1
rew=teleport,1036,220,190

[300010]
face=6
txt0=I'm not a working Exorcist yet!
opt0=-ok

[1061]
face=7
txt0=I'm not a WhsGuardian yet!
opt0=-ok

[10003]
face=7
txt0=I'm not a GuildDirector yet!
opt0=-ok

[30161]
face=7
txt0=I'm not a FurnitureNPC yet!
opt0=-ok

[10060]
face=7
txt0=I'm not a Sunfer yet!
opt0=-ok

[104851]
face=6
txt0=I'm not a Bird Island Boxerhao yet!
opt0=-ok

[65221]
face=6
txt0=Would you Like to go somewhere cool?
opt0=somewhere cool-No I will stay
req=gold,100
rew=teleport,1037, 228, 232

[380]
face=6
txt0=Would you like to go to the guild area?
opt0=Yes-No Thanks
req=
rew=teleport,1038, 228, 232

[7000]
face=6
txt0=Would you like to exit the guild area?
opt0=Yes-No Thanks
req=
rew=teleport,1002, 438,377

[300000]
face=7
txt0=I'm not a Shelby yet!
opt0=-ok

[435]
face=6
txt0=Would You Like a free 500k? Well you'll have to lvl to 15
opt0=Cool-No thanks
req=lvl,15
rew=gold,500000

[3381]
face=7
txt0=I'm not a SurgeonMiracle yet!
opt0=-ok

[5004]
face=7
txt0=I'm not a Millionairelee yet!
opt0=-ok

[7050]
face=5
txt0=I'm not a WeaponMaster yet!
opt0=-ok

[2071]
face=5
txt0=Hi I'm CPAdmin I'll sell you some cps
opt0=I'll buy 27 cps for 1kk-I'll buy 270 for 10kk-No thanks
req=gold,1000000-gold,10000000
rew=cps,50-cps,600

[3825]
face=6
txt0=I'm not a UnknownMan yet!
opt0=-ok

[10065]
face=7
txt0=I'm not a GodlyArtisan yet!
opt0=-ok


[35502]
face=7
txt0=I'm not a ProficiencyGod yet!
opt0=-ok

[35501]
face=5
txt0=I'm not a ArtisanRow yet!
opt0=-ok

[2070]
face=5
txt0=I'm not a CollectorZhao yet!
opt0=-ok

[10151]
face=2
txt0=Would you Like to Go Fight(PK)
opt0=No Thanks-O.K.
rew=teleport,1005

[390]
face=4
txt0=Do You Wish to get married?
opt0=Yes-No
req= level 20
rew=

[7]
face=2
txt0=Where do u want to go out Training Ground ?
opt0=Arena-No I will stay
req=gold,100
rew=teleport,1005,052,057

[104798]
face=2
txt0=Where do u want to go out Training Ground ?
opt0=Ape Mountain-Bird Island-Phoenix Castle-Twin City-Mine Cave-Market-Lottory-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1015,723,573-teleport,1011,190,271-teleport,1002,438,377-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47

[45]
face=2
txt0=Where do u want to go out market ?
opt0=Ape Mountain-Bird Island-Phoenix Castle-Twin City-Mine Cave-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1015,723,573-teleport,1011,190,271-teleport,1002,438,377-teleport,1003,70,50

[47]
face=3
txt0=I will get u to level 30
txt1=well done u got it
opt0=sure-no I'd Rather do it my self.
opt1=thank you
req=lvl,>29
rew=lvl,30

[10161]
face=2
txt0=Hello there how are you i am the teleporter magician where do u want to go
opt0=Ape Mountain-Bird Island-Phoenix Castle-Desert City-Mine Cave-Market-Lottory-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1015,723,573-teleport,1011,190,271-teleport,1000,500,650-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47

[10051]
face=2
txt0=Hello there how are you i am the teleporter magician where do u want to go
opt0=Ape Mountain-Bird Island-Phoenix Castle-Twin City-Mine Cave-Market-Lottory-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1015,723,573-teleport,1011,190,271-teleport,1002,438,377-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47

[10056]
face=2
txt0=Hello there how are you i am the teleporter magician where do u want to go
opt0=Ape Mountain-Twin City-Phoenix Castle-Desert City-Mine Cave-Market-Lottory-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1002,438,377-teleport,1011,190,271-teleport,1000,500,650-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47

[10052]
face=2
txt0=Hello there how are you i am the teleporter magician where do u want to go
opt0=Ape Mountain-Bird Island-Phoenix Castle-Desert City-Mine Cave-Market-Lottory-No I will stay
req=gold,100-gold,100-gold,100-gold,100-gold,100-gold,100-cps,27
rew=teleport,1020,567,576-teleport,1015,723,573-teleport,1011,190,271-teleport,1000,500,650-teleport,1003,70,50-teleport,1036,210,195-teleport,700,40,47

[10002]
face=3
txt0=Would you like to change your hair?
opt0=Hair1-Hair2-Hair3-Hair4-Hair5-Hair6-Nah I'm good.
opt1=Ok
req=0-0-0-0-0-0
rew=hair,421-hair,411-hair,430-hair,435-hair,436-hair,437
Any help will be greatly appreciated this is the only part of scripting i am getting stuck in at the present time.
sec0nd2n0ne is offline  
Old 05/26/2009, 20:19   #18
 
ih8you's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 146
Received Thanks: 38
You using A ini source. I did this in a Non-Ini source
ih8you is offline  
Old 05/26/2009, 21:24   #19
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
no hes using the 4351 source...this is for LOTF client version 5017 not the 4351 TheCoServer source
PeTe Ninja is offline  
Reply


Similar Threads Similar Threads
[Release]Basevendor+Mangos 3.3.3a Npcs
07/27/2012 - WoW Private Server - 10 Replies
Ich habe kürzlich im Internet ein nettes Tool gefunden und möchte es gerne mit euch teilen da ich auf viele Threads gestoßen bin in denen nach Lvl Mobs,Vendoren usw gefragt wurde.Ich weis nicht ob ihrs schon kennt,aber wenn nicht ist es auf jeden Fall was ganz nettes;).Also meine neuste Entdeckung nennt sich Basevendor: Was ist BaseVendor? BaseVendor bietet Dir die Funktion Deine individuell angepassen, eigenen Händler für Deinen Server zu erstellen. In wenigen Minuten hast Du Deine...
[Release]DisCity NPCs (5165)
09/17/2010 - CO2 PServer Guides & Releases - 43 Replies
first lets define our variables in Character.cs search for: public Nobility Nobility; then add these under it: public bool DisCityON = false; public int DisCityMobs = 0; now on to the npc's
[Release] Birth Village NPCs
08/10/2010 - CO2 PServer Guides & Releases - 9 Replies
-Deleted- People are so ungrateful of someones hard work and cba to contribute their own tiny piece. Might release these on a later dat with all the grammer correct for every class. But don't know yet. #Request Close
[Release] Xml Npcs
04/04/2010 - CO2 PServer Guides & Releases - 6 Replies
Honestly, was just bored so I thought I'd take a look at C# since I haven't for a few months. Hard-coded Npc's suck balls, so here's the starting code for Xml Npc's. Pretty sure it was done within CoEmu v2, but can easily be converted into any source. I haven't tested it, since I don't have a Conquer client. Instructions:
[Release]2 Npcs
07/08/2009 - CO2 PServer Guides & Releases - 9 Replies
These are my first 2 ever npcs. I coded them with the help of several other codes. This code will Trade in the amulet for the gear. case 10062: //Magic Artisan { if (LinkBack == 0) { Text("Hi. Gear here.", CSocket); Link("Trojan", 1, CSocket); Link("Warrior", 2, CSocket);



All times are GMT +2. The time now is 18:15.


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