Jump to content

NPC Duplicates Generator


kenedos

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   42
  • Joined:  02/19/12
  • Last Seen:  

First off :

I did not make this script completely by myself. I am rather new to PHP (this is my first php code ever) so I had some help to finish this. Although the functionality is completely different, you may find some similarities in the HTML code. Therefore I'd like to thank and give credits to the Author: Aaron Sinclair for helping with this release indirectly

Another Thing :

I couldn't make a new topic in the 3rd party tool downloads section, therefore this might not be the most appropriate place to be releasing this, but I had nowhere else to go. If a mod could perhaps move this later, that would be great.

Enough Talk.

Here's what it does :

At first it may look a bit tricky but then you figure it's just pretty simple. I made a php code that allows you to set up multiple NPC duplicates at the same time, just by pointing out the NPC names, and a few more things...

Well, in short, it makes a cartesian product between all the maps listed and all the npcs listed, so you can for example, easily set up all the NPCs you need in your towns without having to go through the towns and typing '/where' all the time.

The X and Y Modified Coords refer to that specific map center location. For example, if you list in the map "prontera, 150, 150" in the map format list, you will have all the npcs duplicate in prontera, and their new X and Y coords will depend on their X and Y modified coords. If you have X Mod = 3 and Y Mod = -5 used in the example above, your npc specific location would be "prontera, 153, 145".

The X and Y Modified Coords are meant to make it easy to make NPCs circle around a specific area, you can draw any kind of shapes you want, given you know how to do it using this tool. This makes it a lot easier to set up many different NPCs duplicates among many towns at the same time.

I suppose an example explain this better than anything.

Example :

Npc Format (Npc Name, Map Center + X Coord, Map Center + Y Coord, Facing Direction, Sprite Number) :

Healer, 2, -3, 5, 880
Warper, -5, -5, 3, 660
Kafra, -2, -3, 4, 110
Jobchanger, 0, 0, 2, 550
...

Map Format (Map Name, Center X, Center Y) :

(Note : Center is not the center of the map...)

prontera, 156, 181
alberta, 50, 238
payon, 200, 150
morocc, 150, 100
geffen, 200, 100
aldebaran, 50, 70
splendide, 90, 180
dicastes01, 201, 165
mora, 151, 214
...

Output :

(All the four NPCs will be duplicated in every given town, with their respective variables)

(The total amount of duplicates is the product between the number of towns and number of NPCs)

// Healer ----------------------------------------------
prontera,158,178,5{TAB}duplicate(Healer){TAB}Healer#d1{TAB}880
alberta,52,235,5{TAB}duplicate(Healer){TAB}Healer#d2{TAB}880
payon,202,147,5{TAB}duplicate(Healer){TAB}Healer#d3{TAB}880
morocc,152,97,5{TAB}duplicate(Healer){TAB}Healer#d4{TAB}880
geffen,202,97,5{TAB}duplicate(Healer){TAB}Healer#d5{TAB}880
aldebaran,52,67,5{TAB}duplicate(Healer){TAB}Healer#d6{TAB}880
splendide,92,177,5{TAB}duplicate(Healer){TAB}Healer#d7{TAB}880
dicastes01,203,162,5{TAB}duplicate(Healer){TAB}Healer#d8{TAB}880
mora,153,211,5{TAB}duplicate(Healer){TAB}Healer#d9{TAB}880


// Warper ----------------------------------------------
prontera,151,176,3{TAB}duplicate(Warper){TAB}Warper#d1{TAB}660
alberta,45,233,3{TAB}duplicate(Warper){TAB}Warper#d2{TAB}660
payon,195,145,3{TAB}duplicate(Warper){TAB}Warper#d3{TAB}660
morocc,145,95,3{TAB}duplicate(Warper){TAB}Warper#d4{TAB}660
geffen,195,95,3{TAB}duplicate(Warper){TAB}Warper#d5{TAB}660
aldebaran,45,65,3{TAB}duplicate(Warper){TAB}Warper#d6{TAB}660
splendide,85,175,3{TAB}duplicate(Warper){TAB}Warper#d7{TAB}660
dicastes01,196,160,3{TAB}duplicate(Warper){TAB}Warper#d8{TAB}660
mora,146,209,3{TAB}duplicate(Warper){TAB}Warper#d9{TAB}660


// Kafra ----------------------------------------------
prontera,154,178,4{TAB}duplicate(Kafra){TAB}Kafra#d1{TAB}110
alberta,48,235,4{TAB}duplicate(Kafra){TAB}Kafra#d2{TAB}110
payon,198,147,4{TAB}duplicate(Kafra){TAB}Kafra#d3{TAB}110
morocc,148,97,4{TAB}duplicate(Kafra){TAB}Kafra#d4{TAB}110
geffen,198,97,4{TAB}duplicate(Kafra){TAB}Kafra#d5{TAB}110
aldebaran,48,67,4{TAB}duplicate(Kafra){TAB}Kafra#d6{TAB}110
splendide,88,177,4{TAB}duplicate(Kafra){TAB}Kafra#d7{TAB}110
dicastes01,199,162,4{TAB}duplicate(Kafra){TAB}Kafra#d8{TAB}110
mora,149,211,4{TAB}duplicate(Kafra){TAB}Kafra#d9{TAB}110


// Jobchanger ----------------------------------------------
prontera,156,181,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d1{TAB}550
alberta,50,238,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d2{TAB}550
payon,200,150,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d3{TAB}550
morocc,150,100,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d4{TAB}550
geffen,200,100,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d5{TAB}550
aldebaran,50,70,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d6{TAB}550
splendide,90,180,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d7{TAB}550
dicastes01,201,165,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d8{TAB}550
mora,151,214,2{TAB}duplicate(Jobchanger){TAB}Jobchanger#d9{TAB}550

Note:

The given values for this example were completely random.

I don't even know if those are valid sprite IDs or real coords.

IMPORTANT THINGS :

- This tool ignores spaces between NPC names, as well as comas or any given space at all. If your NPC has a space in it's name, it will be lost.

- This tool cannot generate {TAB} characters, therefore you gotta go on notepad++ or a text editor and replace all the {TAB} symbols with real tabs.

(Notepad++ does that with the extended search mode, by inputting to replace {TAB} with t)

- This tool always increment the NPC new name by the using the symbol 'd' together with an incremental number. If the npc name has a # sign, it will not put another.

If the hidden name symbol is not used, it will just add the '#d' symbols together with the incremental number after the current NPC hidden name.

- This tool is limited to only work within a certain area around the specified center of the map, therefore if you need to place the NPCs in completely chaotic places, or

places that are very specific, this tool will not help you at all, it helps with generalizing the locations, and making duplication job faster and easier.

- This tool is meant to be used with many NPCs to be duplicated at the same time, if you wish you duplicate only one, of course its possible, but it won't make your

job much easier. You'll still have to find every single map coords for that one NPC.

Link :

http://duplicategen....upgenerator.php

Edited by kenedos
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...