[Help] Spawn Creation Tool

03/03/2009 23:50 Beta Limit#1
Ok well the basics of this is i want to create a tool that has a visual image of the map you choose. Then at the side an X and Y saying the max and min coordinates for each (would need to change for each map).

Choose mob etc.

Then on the map image you can draw out the spawn(probably going a bit far with this) with the cursor. The drawn area will then be converted into coordinates and then the whole thing will be dumped out to a MySQL query or .ini

If anyone can give me any idea about how to do any of this; please post here. I think i got the basic stuff covered, my main worry is the drawing on the map.

EDIT: Current Look of the program (Still unfinished)

[Only registered and activated users can see links. Click Here To Register...]
03/04/2009 02:23 kinshi88#2
This would be easy, except for the whole drawing it out part.

The Min+Max coords are which "draw out" the spawn, so thats all that would be needed.
03/04/2009 02:43 PeTe Ninja#3
question here, for what is this?

binaries?

lotf?

extremely bugless?
03/04/2009 07:52 tao4229#4
System.Drawing has a few classes for this, if you want help talk to me on MSN and I'll look through it.

[Edit #1]

Supposing you'll be using plain and simple System.Drawing, you're gunna need a System.Drawing.Graphics to render your shit. This example is just for a windows form, but you can do it over a picturebox(what you're using I presume to register the minimap or whatever pic of the map) or whatever the fuck you want(It works with any control I think). On the constructor just initialize a Graphics device using Graphics.FromHwnd(). Use CONTROLNAMEHERE.Handle for the parameter, and bam, you have a graphics device that will render on whatever control you want it to.
Example:

Code:
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.Graph = Graphics.FromHwnd(this.Handle);
        }
        Graphics Graph;
public void DrawRect(Rectangle Rect)
        {
            Graph.DrawRectangle(new Pen(Color.Black), Rect);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DrawRect(new Rectangle(50, 50, 10, 10));
        }
}

}
I suggest using the plain mini maps from CO if you're going to. You'll also need to figure out a way to get a scaling from the mini map to the ingame coords. (DMaps maybe?[To find the Maximum values for X and Y so you can scale the .jpg minimap] Or just find the min and max on your own and scale the mini map).
03/04/2009 08:41 Beta Limit#5
@Pete

This will be mainly for LOTF and Hybrids; though it can be adapted depending upon what is needed.

@Tao

Yeah i'm gonna use the Mini map images for this; but most of them come in 4 parts so i'm going to create a new image for each map with the 4 parts together. For the X and Y i was gonna find it in LOTF and just /tele till i'm right in the corners (Trial and Error FTW!). Still one thing that is gunna make it harder is that the spawns arent normal squares or rectangles; they are a Diamond shape (Square/Rectangle turned 45 Degrees).

Cant talk on msn atm I've g2g college Inna bit but i will defiantly pick your brain later :D

Thanks for the Help so far; im gunna start work on this in my college programming lessons.
03/04/2009 21:15 PeTe Ninja#6
cant you just use a /addspawn command made by emme, it works really good :D
03/04/2009 22:59 Beta Limit#7
Quote:
Originally Posted by PeTe Ninja View Post
cant you just use a /addspawn command made by emme, it works really good :D
and Emmes command allows you to choose the exact coords to place the mobs? how many to spawn? Spawn to any map you choose etc.?
03/05/2009 13:32 Hyberkill#8
its hard adding the coords manually... id prefer making a command inside the server that takes my char coords n places a monster at the current location for the spawn ;)
03/05/2009 14:27 Beta Limit#9
Quote:
Originally Posted by Hyberkill View Post
its hard adding the coords manually... id prefer making a command inside the server that takes my char coords n places a monster at the current location for the spawn ;)
its not really manually, you do 2 or 4 dots (or 4 lines) on the picture and it gives you the coords and stuff, you click Dump option and paste into into SQL or into a new INI.
03/05/2009 21:56 _Emme_#10
Quote:
Originally Posted by Beta Limit View Post
and Emmes command allows you to choose the exact coords to place the mobs? how many to spawn? Spawn to any map you choose etc.?
Nah, heres the way it works..

/addspawn MobID Area Amount

So if you do:
/addspawn 31 250 400

It would be a perfect mobspawn for birdisland, and it could easily be configured.
03/06/2009 02:36 Hello Kitty#11
Here is an idea for part of it, its not any code but its also kind of a question.

- Why do you have a drop down arrow for the Map ID? I'm sure you could have like a small button on the side saying View Map IDs and it will pop up and possibly have a search bar for finding like Twin City, i could probably give you most of the map ids with what it is and possible coordinates for landing there. But i think you should make it like a type in

Example: [____]

You type in 1002

[1002]

It shows up as

[1002] - Twin City

instead of the drop down arrow,

This is just a suggestion , either way good job and i hope it works out :)