Re: Shop maker (uses zitem)
Re: Shop maker (uses zitem)
Re: Shop maker (uses zitem)
Re: Shop maker (uses zitem)
Pass me source code please Tranks.
Re: Shop maker (uses zitem)
as requested source code released do whatever you want with it but give me credit it took me like 20 mins to code lol
Re: Shop maker (uses zitem)
Gimme your msn, it's steven from fatalgunz ?
Re: Shop maker (uses zitem)
Re: Shop maker (uses zitem)
Quote:
Originally Posted by
steven1234
its been awile since ive released something so i just made this because i couldnt be asked to get all the item ids outta zitem to put in shop.xml on 2008 files (lol im lazy)
p.s when including item names make sure you have strings.xml in the same dictionary as zitem.xml
http://i45.tinypic.com/1r9hl2.jpg
C# 2010 source code should work with all other versions
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;
namespace Shop_Maker
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void scanzitem(string dict, string filename)
{
richTextBox1.AppendText(label1.Text + Environment.NewLine);
richTextBox1.AppendText(label2.Text + Environment.NewLine);
string line;
string line2;
if (File.Exists(dict + filename) && File.Exists(dict + "strings.xml"))
{
char[] splits = { '"' };
char[] splits2 = { '>', '<' };
StreamReader file = null;
StreamReader file2 = null;
try
{
file = new StreamReader(dict + filename);
while ((line = file.ReadLine()) != null)
{
if (checkzitem(line) == true)
{
string[] splitter = line.Split(splits);
string scanstrings = splitter[3].Replace("STR:ZITEM_NAME_", "");
if (checkBox1.Checked == true)
{
try
{
file2 = new StreamReader(dict + "strings.xml");
while ((line2 = file2.ReadLine()) != null)
{
if (checkstring(line2, scanstrings) == true)
{
string[] split = line2.Split(splits2);
richTextBox1.AppendText(label3.Text + splitter[1] + label4.Text + " <!-- " + split[2] + " -->" + Environment.NewLine);
}
}
}
finally
{
if (file2 != null)
file2.Close();
}
}
else
{
richTextBox1.AppendText(label3.Text + splitter[1] + label4.Text + Environment.NewLine);
}
}
}
}
finally
{
if (file != null)
file.Close();
}
richTextBox1.AppendText("</XML>" + Environment.NewLine);
}
else
{
MessageBox.Show("Zitem.xml or Strings.xml were not found, please make sure there in the same foler.");
}
}
public Boolean checkzitem (string text){
if(Regex.IsMatch(text,"<ITEM")){
return true;
} else {
return false;
}
}
public Boolean checkstring(string text, string numb)
{
if (Regex.IsMatch(text, "ZITEM_NAME_" + numb + label5.Text))
{
return true;
}
else
{
return false;
}
}
private void closeToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog OpenFile = new OpenFileDialog();
OpenFile.FileName = "zitem.xml";
OpenFile.DefaultExt = "*.xml";
OpenFile.Filter = "XML Files|*.xml";
if (OpenFile.ShowDialog() == DialogResult.OK)
{
richTextBox1.Clear();
scanzitem(OpenFile.FileName.Replace(OpenFile.SafeFileName, ""), OpenFile.SafeFileName);
}
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog saveFile1 = new SaveFileDialog();
saveFile1.DefaultExt = "*.xml";
saveFile1.Filter = "XML Files|*.xml";
saveFile1.FileName = "shop.xml";
if (saveFile1.ShowDialog() == DialogResult.OK)
{
if (File.Exists(saveFile1.FileName))
{
File.Delete(saveFile1.FileName);
}
richTextBox1.SaveFile(saveFile1.FileName, RichTextBoxStreamType.PlainText);
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
god dam u back, Any way welcome back 4>
Re: Shop maker (uses zitem)
Outstanding work, names on the shop makes it much easier.
Re: Shop maker (uses zitem)
great release 10/10 keep it up and welcome back xD.. what is the source code for?
Re: Shop maker (uses zitem)
updated gender and level added the source is for people (if they want to work on it)
Re: Shop maker (uses zitem)
Not bad ^.^ thanks for this.
Posted via Mobile Device
Re: Shop maker (uses zitem)
how the heck u use it lol O.o?
Re: Shop maker (uses zitem)
Quote:
Originally Posted by
[Azn]iPurps
how the heck u use it lol O.o?
lol if you cant use this you are ...nevermind...
file>open>zitem.xml