Register for your free account! | Forgot your password?

You last visited: Today at 21:30

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

Advertisement



[SimpleRelease]NPC Creator

Discussion on [SimpleRelease]NPC Creator within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
[SimpleRelease]NPC Creator

This is for hybrids source.
You can use it to create NPC's fast and simple.
It already have the standard things as you can see.

I will implent more functions later, to make it more userfriendly, but this is what I got now.

It can also load npcs. If you write the general things, then it won't make them automatical, but if it detects, that you haven't made it, then it will automatical write them in.

Features now:
Code:
-Save warning before you're making a new npc.
-Madeby, NPCID & NPCName defined by textboxes.
-Standard class for NPCScripting in vb.
-Open NPCScripts (.vb).
-SaveNPCScripts in the default folder NPCScripts\file.vb.
What I'm planning to make:
Code:
Autoscripting for LUA, with eg. Moneys, Items, Levels etc.
Create dialog automatical.
Add npc's automatical into process.vb, once they are saved.
More functions, then only NPCScripting.
Screenshot:


Download:


is not obfuscated, so you can deobfuscate it, if you want.
It requires .NET Framework 4, didn't bother to make it lower.

Sourcecode:
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;

namespace NPCDialogCreator
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (txtDialog.Text.Length > 2)
            {
                DialogResult dlgResult = MessageBox.Show("Do you want to save current NPCFirst?",
        "SAVE WARNING",
        MessageBoxButtons.YesNoCancel);

                if (dlgResult == System.Windows.Forms.DialogResult.Yes)
                {
                    MadeBy = txtMade.Text;
                    NPCID = txtID.Text;
                    NPCName = txtName.Text;
                    WriteDialog();

                    txtDialog.Text = "";
                }
                else if (dlgResult == System.Windows.Forms.DialogResult.Cancel)
                {
                }
                else if (dlgResult == System.Windows.Forms.DialogResult.No)
                {
                    txtDialog.Text = "";
                }
            }
            else
                txtDialog.Text = "";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            bool Have = false;
            OpenFileDialog ofn = new OpenFileDialog();
            ofn.Filter = "VisualBasic Files (*.vb)|*.vb";
            ofn.Title = "Open NPCDialog";
            while (Have == false)
            {
                if (ofn.ShowDialog() == DialogResult.Cancel)
                    return;

                string file = ofn.FileName;

                try
                {
                    FileStream fs = new FileStream(@"" + file, FileMode.Open);
                    StreamReader sr = new StreamReader(fs);

                    string text = sr.ReadToEnd();

                    sr.Close();
                    fs.Close();

                    txtDialog.Text = text;

                    Have = true;
                }
                catch (IOException io)
                {
                    MessageBox.Show(io.ToString());
                }
            }
        }
        private string MadeBy = "";
        private string NPCID = "";
        private string NPCName = "";
        private string General = "\nImports System\nImports ConquerScriptLinker\n\nPartial Public Class NpcEngine\n";
        private string End = "\nEnd Class";
        private void WriteDialog()
        {
            string dialog = MadeBy +
            "\n' Npc: " + NPCID +
            NPCName + "\n" +
            General + "\n";

            if (txtDialog.Text.Contains(dialog) && dialog.Length > 10)
            {
                dialog = txtDialog.Text;
            }
            else
                dialog = dialog + txtDialog.Text + "\n" + End;

            try
            {
                FileStream fs = new FileStream(@"NPCScripts\" + NPCID + ".vb", FileMode.CreateNew);
                StreamWriter sw = new StreamWriter(fs);
                sw.WriteLine(dialog);
                sw.Flush(); fs.Flush();
                sw.Close(); fs.Close();
            }
            catch
            {
                FileStream fs = new FileStream(@"NPCScripts\" + NPCID + ".vb", FileMode.Truncate);
                StreamWriter sw = new StreamWriter(fs);
                sw.WriteLine(dialog);
                sw.Flush(); fs.Flush();
                sw.Close(); fs.Close();
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            MadeBy = "' By: " + txtMade.Text;
            NPCID = txtID.Text;
            NPCName = "\n' Name: " + txtName.Text;
            WriteDialog();
        }
    }
}
Syst3m_W1z4rd is offline  
Thanks
3 Users
Old 01/17/2011, 01:27   #2
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
looks nice.
would you happen to have a open source version of it i can get?


i would like to see how this little things are made.
and try to make a more adv vs of it to release to you all just to see if i can.
taylor2846 is offline  
Old 01/17/2011, 01:40   #3
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Posted sourcecode, I found some mistakes in it, I will update them tomorrow. Thank you
Syst3m_W1z4rd is offline  
Thanks
1 User
Old 01/17/2011, 20:52   #4
 
JobvdH's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
Well its very nice, only i wouldnt release the source code too.
Because some people might copy it, remove copyrights (If included) and add their own to claim its their work
JobvdH is offline  
Thanks
1 User
Old 01/17/2011, 21:19   #5
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
They can't just copy + paste it, they also need to know where to paste it, also they need to make the design etc. by them self.
Syst3m_W1z4rd is offline  
Old 01/17/2011, 21:24   #6
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
Quote:
Originally Posted by Syst3m_W1z4rd View Post
They can't just copy + paste it, they also need to know where to paste it, also they need to make the design etc. by them self.
Let em copy and paste, Syst3m can just be like hey its mine and send em to this post if they don't give him his credit.
BioHazarxPaul is offline  
Old 01/17/2011, 21:31   #7
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
I wouldn't even do. I don't care if peoples take my work.
Syst3m_W1z4rd is offline  
Old 01/17/2011, 21:40   #8
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314


Easy to embed, provides built in parsers for VB, C#, and python (among others)

It'll make it easier for people to program with rather than a plain old richTextBox.
_tao4229_ is offline  
Thanks
2 Users
Old 01/18/2011, 08:26   #9
 
JobvdH's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
thats nice
JobvdH is offline  
Reply


Similar Threads Similar Threads
map creator
10/27/2010 - Metin2 Private Server - 0 Replies
I really need to find a map creator for a new quest i'm making. if you are interested , let me know
acc creator v2
09/27/2010 - S4 League Hacks, Bots, Cheats & Exploits - 4 Replies
acc creator v2 hack trail cnt detect your hacks so no ban for 1 day.. but u can still get x-trap crap ..gl ;) 1. Extracting executable file in the S4League. 2.Exécutez as administrator. Login 3.Choose a non-existent and a password.
[SimpleRelease]NobilityChief
07/28/2010 - CO2 PServer Guides & Releases - 8 Replies
I got no serious idea, if this is released or not. But I thought I would release it for fun lol. #region NobilityChief case 338547: { if (Control == 0) { GC.AddSend(Packets.NPCSay("So you want to upgrade your nobility fast?. Well I can charge CPs to increas it.")); ...
[SimpleRelease]RebornWeapons
02/21/2010 - CO2 PServer Guides & Releases - 19 Replies
Agh well it amazes me how simple this is and people continually ask for it so here it is. Go to attack.cs and search for if (Game.World.H_Mobs.Contains(GC.MyChar.Loc.Map)) Above it add this: if (GC.MyChar.Equips.RightHand.Effect == NewestCOServer.Game.Item.RebornEffect.MP)//ManaBS { MyMath.ChanceSuccess(1000000); GC.AddSend(Packets.String(GC.MyChar.EntityID, 10, "magicfull")); ...
GM name creator
01/17/2008 - Silkroad Online - 5 Replies
hi all =), can any one tell me how can i creat GM name for Ex:GM_XXXXXX. Thx:D



All times are GMT +1. The time now is 21:31.


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.