GMS-like Wedding + Scissors of Karma + Maple Life + Buyback
Properly developed the Marriage feature in the source. Added TRAVEL_RATE server flag, a modifier for the travel frequency rate. Corrected stance for players in 3rd party view when entering a map to work similarly as GMS. Fixed mobs spamming skills incoherently. Added code support for old GMS-like PQ NPCs, where party leaders just need to click once to start a new PQ. Implemented podium system for the Hall of Fame PlayerNPCs. Improved character load-out system, now using way less queries to the DB in the process. Fixed birthday field for accounts not being read correctly. Further implemented the incomplete yet-existing Scissors of Karma mechanic. Fixed Duey not propagating item flags when packaging an item. Added a custom buyback system. Refactored the character creation system, now offering support for Maple Life. Fixed some issues with the PlayerNPC positioning system. Added server flag allowing AP assignment for novices (beginners under level 11). Fixed Strategy Time (GPQ) announcement being sent twice to guilds in certain cases. Tweaked mount EXP system now awarding it accordingly with the amount of tiredness healed. Removed the randomness aspect of closeness gain when feeding the pet, now acting accordingly with amount of fullness gained. Fixed an exploit with Arwen script. Fixed travel-back from Florina forcefully sending players to Lith Harbor in certain situations. Thoroughly reviewed job skill questlines for Explorers and Aran. Localhost edit: removed MTS block in certain maps (useful for the buyback system). Localhost edit: removed party blocks for novices. Localhost edit: removed AP assigning block for novices. Localhost edit: removed speed cap. Localhost edit: removed Maker block popping up when inputting ATK gems on non-weapons.
This commit is contained in:
94
src/client/creator/CharacterFactory.java
Normal file
94
src/client/creator/CharacterFactory.java
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleSkinColor;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventory;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import net.server.Server;
|
||||
import server.MapleItemInformationProvider;
|
||||
import tools.MaplePacketCreator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public abstract class CharacterFactory {
|
||||
|
||||
protected synchronized static int createNewCharacter(MapleClient c, String name, int face, int hair, int skin, int gender, CharacterFactoryRecipe recipe) {
|
||||
if (!MapleCharacter.canCreateChar(name)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
MapleCharacter newchar = MapleCharacter.getDefault(c);
|
||||
newchar.setWorld(c.getWorld());
|
||||
newchar.setSkinColor(MapleSkinColor.getById(skin));
|
||||
newchar.setGender(gender);
|
||||
newchar.setName(name);
|
||||
newchar.setHair(hair);
|
||||
newchar.setFace(face);
|
||||
|
||||
newchar.setLevel(recipe.getLevel());
|
||||
newchar.setJob(recipe.getJob());
|
||||
newchar.setMapId(recipe.getMap());
|
||||
|
||||
MapleInventory equipped = newchar.getInventory(MapleInventoryType.EQUIPPED);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
int top = recipe.getTop(), bottom = recipe.getBottom(), shoes = recipe.getShoes(), weapon = recipe.getWeapon();
|
||||
|
||||
if(top > 0) {
|
||||
Item eq_top = ii.getEquipById(top);
|
||||
eq_top.setPosition((byte) -5);
|
||||
equipped.addFromDB(eq_top);
|
||||
}
|
||||
|
||||
if(bottom > 0) {
|
||||
Item eq_bottom = ii.getEquipById(bottom);
|
||||
eq_bottom.setPosition((byte) -6);
|
||||
equipped.addFromDB(eq_bottom);
|
||||
}
|
||||
|
||||
if(shoes > 0) {
|
||||
Item eq_shoes = ii.getEquipById(shoes);
|
||||
eq_shoes.setPosition((byte) -7);
|
||||
equipped.addFromDB(eq_shoes);
|
||||
}
|
||||
|
||||
if(weapon > 0) {
|
||||
Item eq_weapon = ii.getEquipById(weapon);
|
||||
eq_weapon.setPosition((byte) -11);
|
||||
equipped.addFromDB(eq_weapon.copy());
|
||||
}
|
||||
|
||||
if (!newchar.insertNewChar(recipe)) {
|
||||
return -2;
|
||||
}
|
||||
c.announce(MaplePacketCreator.addNewCharEntry(newchar));
|
||||
|
||||
Server.getInstance().createCharacterid(newchar.getAccountID(), newchar.getId(), newchar.getWorld());
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.sendYellowTip("[NEW CHAR]: " + c.getAccountName() + " has created a new character with IGN " + name));
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
184
src/client/creator/CharacterFactoryRecipe.java
Normal file
184
src/client/creator/CharacterFactoryRecipe.java
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator;
|
||||
|
||||
import client.MapleJob;
|
||||
import client.Skill;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import tools.Pair;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class CharacterFactoryRecipe {
|
||||
private MapleJob job;
|
||||
private int level, map, top, bottom, shoes, weapon;
|
||||
private int str = 4, dex = 4, int_ = 4, luk = 4;
|
||||
private int maxHp = 50, maxMp = 5;
|
||||
private int ap = 0, sp = 0;
|
||||
private int meso = 0;
|
||||
private List<Pair<Skill, Integer>> skills = new LinkedList<>();
|
||||
|
||||
private List<Pair<Item, MapleInventoryType>> itemsWithType = new LinkedList<>();
|
||||
private Map<MapleInventoryType, AtomicInteger> runningTypePosition = new LinkedHashMap<>();
|
||||
|
||||
public CharacterFactoryRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
this.job = job;
|
||||
this.level = level;
|
||||
this.map = map;
|
||||
this.top = top;
|
||||
this.bottom = bottom;
|
||||
this.shoes = shoes;
|
||||
this.weapon = weapon;
|
||||
}
|
||||
|
||||
public void setStr(int v) {
|
||||
str = v;
|
||||
}
|
||||
|
||||
public void setDex(int v) {
|
||||
dex = v;
|
||||
}
|
||||
|
||||
public void setInt(int v) {
|
||||
int_ = v;
|
||||
}
|
||||
|
||||
public void setLuk(int v) {
|
||||
luk = v;
|
||||
}
|
||||
|
||||
public void setMaxHp(int v) {
|
||||
maxHp = v;
|
||||
}
|
||||
|
||||
public void setMaxMp(int v) {
|
||||
maxMp = v;
|
||||
}
|
||||
|
||||
public void setRemainingAp(int v) {
|
||||
ap = v;
|
||||
}
|
||||
|
||||
public void setRemainingSp(int v) {
|
||||
sp = v;
|
||||
}
|
||||
|
||||
public void setMeso(int v) {
|
||||
meso = v;
|
||||
}
|
||||
|
||||
public void addStartingSkillLevel(Skill skill, int level) {
|
||||
skills.add(new Pair<>(skill, level));
|
||||
}
|
||||
|
||||
public void addStartingEquipment(Item eqpItem) {
|
||||
itemsWithType.add(new Pair<>(eqpItem, MapleInventoryType.EQUIP));
|
||||
}
|
||||
|
||||
public void addStartingItem(int itemid, int quantity, MapleInventoryType itemType) {
|
||||
AtomicInteger p = runningTypePosition.get(itemType);
|
||||
if(p == null) {
|
||||
p = new AtomicInteger(0);
|
||||
runningTypePosition.put(itemType, p);
|
||||
}
|
||||
|
||||
itemsWithType.add(new Pair<>(new Item(itemid, (short) p.getAndIncrement(), (short) quantity), itemType));
|
||||
}
|
||||
|
||||
public MapleJob getJob() {
|
||||
return job;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public int getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public int getTop() {
|
||||
return top;
|
||||
}
|
||||
|
||||
public int getBottom() {
|
||||
return bottom;
|
||||
}
|
||||
|
||||
public int getShoes() {
|
||||
return shoes;
|
||||
}
|
||||
|
||||
public int getWeapon() {
|
||||
return weapon;
|
||||
}
|
||||
|
||||
public int getStr() {
|
||||
return str;
|
||||
}
|
||||
|
||||
public int getDex() {
|
||||
return dex;
|
||||
}
|
||||
|
||||
public int getInt() {
|
||||
return int_;
|
||||
}
|
||||
|
||||
public int getLuk() {
|
||||
return luk;
|
||||
}
|
||||
|
||||
public int getMaxHp() {
|
||||
return maxHp;
|
||||
}
|
||||
|
||||
public int getMaxMp() {
|
||||
return maxMp;
|
||||
}
|
||||
|
||||
public int getRemainingAp() {
|
||||
return ap;
|
||||
}
|
||||
|
||||
public int getRemainingSp() {
|
||||
return sp;
|
||||
}
|
||||
|
||||
public int getMeso() {
|
||||
return meso;
|
||||
}
|
||||
|
||||
public List<Pair<Skill, Integer>> getStartingSkillLevel() {
|
||||
return skills;
|
||||
}
|
||||
|
||||
public List<Pair<Item, MapleInventoryType>> getStartingItems() {
|
||||
return itemsWithType;
|
||||
}
|
||||
}
|
||||
48
src/client/creator/novice/BeginnerCreator.java
Normal file
48
src/client/creator/novice/BeginnerCreator.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.novice;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.MapleInventoryType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class BeginnerCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161001, 1, MapleInventoryType.ETC);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.BEGINNER, 1, 10000, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
48
src/client/creator/novice/LegendCreator.java
Normal file
48
src/client/creator/novice/LegendCreator.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.novice;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.MapleInventoryType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class LegendCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161048, 1, MapleInventoryType.ETC);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.LEGEND, 1, 914000000, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
48
src/client/creator/novice/NoblesseCreator.java
Normal file
48
src/client/creator/novice/NoblesseCreator.java
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.novice;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.MapleInventoryType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class NoblesseCreator extends CharacterFactory {
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
giveItem(recipe, 4161047, 1, MapleInventoryType.ETC);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int top, int bottom, int shoes, int weapon, int gender) {
|
||||
int status = createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.NOBLESSE, 1, 130030000, top, bottom, shoes, weapon));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
75
src/client/creator/veteran/BowmanCreator.java
Normal file
75
src/client/creator/veteran/BowmanCreator.java
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class BowmanCreator extends CharacterFactory {
|
||||
private static int[] equips = {1040067, 1041054, 1060056, 1061050, 1072081};
|
||||
private static int[] weapons = {1452005, 1462000};
|
||||
private static int[] startingHpMp = {797, 404};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
recipe.setDex(25);
|
||||
recipe.setRemainingAp(133);
|
||||
recipe.setRemainingSp(61);
|
||||
|
||||
recipe.setMaxHp(startingHpMp[0]);
|
||||
recipe.setMaxMp(startingHpMp[1]);
|
||||
|
||||
recipe.setMeso(100000);
|
||||
|
||||
for(int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveEquipment(CharacterFactoryRecipe recipe, MapleItemInformationProvider ii, int equipid) {
|
||||
Item nEquip = ii.getEquipById(equipid);
|
||||
recipe.addStartingEquipment(nEquip);
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.BOWMAN, 30, 100000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
98
src/client/creator/veteran/MagicianCreator.java
Normal file
98
src/client/creator/veteran/MagicianCreator.java
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import constants.skills.Magician;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class MagicianCreator extends CharacterFactory {
|
||||
private static int[] equips = {0, 1041041, 0, 1061034, 1072075};
|
||||
private static int[] weapons = {1372003, 1382017};
|
||||
private static int[] startingHpMp = {405, 729};
|
||||
private static int[] mpGain = {0, 40, 80, 118, 156, 194, 230, 266, 302, 336, 370};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon, int gender, int improveSp) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
recipe.setInt(20);
|
||||
recipe.setRemainingAp(138);
|
||||
recipe.setRemainingSp(67);
|
||||
|
||||
recipe.setMaxHp(startingHpMp[0]);
|
||||
recipe.setMaxMp(startingHpMp[1] + mpGain[improveSp]);
|
||||
|
||||
recipe.setMeso(100000);
|
||||
|
||||
if(gender == 0) {
|
||||
giveEquipment(recipe, ii, 1050003);
|
||||
}
|
||||
|
||||
for(int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2000001, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 2000006, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
|
||||
|
||||
if(improveSp > 0) {
|
||||
improveSp += 5;
|
||||
recipe.setRemainingSp(recipe.getRemainingSp() - improveSp);
|
||||
|
||||
int toUseSp = 5;
|
||||
Skill improveMpRec = SkillFactory.getSkill(Magician.IMPROVED_MP_RECOVERY);
|
||||
recipe.addStartingSkillLevel(improveMpRec, toUseSp);
|
||||
improveSp -= toUseSp;
|
||||
|
||||
if(improveSp > 0) {
|
||||
Skill improveMaxMp = SkillFactory.getSkill(Magician.IMPROVED_MAX_MP_INCREASE);
|
||||
recipe.addStartingSkillLevel(improveMaxMp, improveSp);
|
||||
}
|
||||
}
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveEquipment(CharacterFactoryRecipe recipe, MapleItemInformationProvider ii, int equipid) {
|
||||
Item nEquip = ii.getEquipById(equipid);
|
||||
recipe.addStartingEquipment(nEquip);
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.MAGICIAN, 30, 101000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
}
|
||||
}
|
||||
79
src/client/creator/veteran/PirateCreator.java
Normal file
79
src/client/creator/veteran/PirateCreator.java
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class PirateCreator extends CharacterFactory {
|
||||
private static int[] equips = {0, 0, 0, 0, 1072294};
|
||||
private static int[] weapons = {1482004, 1492004};
|
||||
private static int[] startingHpMp = {846, 503};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
recipe.setDex(20);
|
||||
recipe.setRemainingAp(138);
|
||||
recipe.setRemainingSp(61);
|
||||
|
||||
recipe.setMaxHp(startingHpMp[0]);
|
||||
recipe.setMaxMp(startingHpMp[1]);
|
||||
|
||||
recipe.setMeso(100000);
|
||||
|
||||
giveEquipment(recipe, ii, 1052107);
|
||||
|
||||
for(int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2330000, 800, MapleInventoryType.USE);
|
||||
|
||||
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveEquipment(CharacterFactoryRecipe recipe, MapleItemInformationProvider ii, int equipid) {
|
||||
Item nEquip = ii.getEquipById(equipid);
|
||||
recipe.addStartingEquipment(nEquip);
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.PIRATE, 30, 120000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
77
src/client/creator/veteran/ThiefCreator.java
Normal file
77
src/client/creator/veteran/ThiefCreator.java
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class ThiefCreator extends CharacterFactory {
|
||||
private static int[] equips = {1040057, 1041047, 1060043, 1061043, 1072032};
|
||||
private static int[] weapons = {1472008, 1332012};
|
||||
private static int[] startingHpMp = {794, 407};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
recipe.setDex(25);
|
||||
recipe.setRemainingAp(133);
|
||||
recipe.setRemainingSp(61);
|
||||
|
||||
recipe.setMaxHp(startingHpMp[0]);
|
||||
recipe.setMaxMp(startingHpMp[1]);
|
||||
|
||||
recipe.setMeso(100000);
|
||||
|
||||
for(int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
giveItem(recipe, 2070000, 500, MapleInventoryType.USE);
|
||||
|
||||
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveEquipment(CharacterFactoryRecipe recipe, MapleItemInformationProvider ii, int equipid) {
|
||||
Item nEquip = ii.getEquipById(equipid);
|
||||
recipe.addStartingEquipment(nEquip);
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.THIEF, 30, 103000000, equips[gender], equips[2 + gender], equips[4], weapons[0]));
|
||||
}
|
||||
}
|
||||
98
src/client/creator/veteran/WarriorCreator.java
Normal file
98
src/client/creator/veteran/WarriorCreator.java
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server
|
||||
Copyleft (L) 2016 - 2018 RonanLana
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation version 3 as published by
|
||||
the Free Software Foundation. You may not use, modify or distribute
|
||||
this program under any other version of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package client.creator.veteran;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.MapleJob;
|
||||
import client.Skill;
|
||||
import client.SkillFactory;
|
||||
import client.creator.CharacterFactory;
|
||||
import client.creator.CharacterFactoryRecipe;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.MapleInventoryType;
|
||||
import constants.skills.Warrior;
|
||||
import server.MapleItemInformationProvider;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author RonanLana
|
||||
*/
|
||||
public class WarriorCreator extends CharacterFactory {
|
||||
private static int[] equips = {1040021, 0, 1060016, 0, 1072039};
|
||||
private static int[] weapons = {1302008, 1442001, 1422001, 1312005};
|
||||
private static int[] startingHpMp = {905, 208};
|
||||
private static int[] hpGain = {0, 72, 144, 212, 280, 348, 412, 476, 540, 600, 660};
|
||||
|
||||
private static CharacterFactoryRecipe createRecipe(MapleJob job, int level, int map, int top, int bottom, int shoes, int weapon, int gender, int improveSp) {
|
||||
CharacterFactoryRecipe recipe = new CharacterFactoryRecipe(job, level, map, top, bottom, shoes, weapon);
|
||||
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
|
||||
|
||||
recipe.setStr(35);
|
||||
recipe.setRemainingAp(123);
|
||||
recipe.setRemainingSp(61);
|
||||
|
||||
recipe.setMaxHp(startingHpMp[0] + hpGain[improveSp]);
|
||||
recipe.setMaxMp(startingHpMp[1]);
|
||||
|
||||
recipe.setMeso(100000);
|
||||
|
||||
if(gender == 1) {
|
||||
giveEquipment(recipe, ii, 1051010);
|
||||
}
|
||||
|
||||
for(int i = 1; i < weapons.length; i++) {
|
||||
giveEquipment(recipe, ii, weapons[i]);
|
||||
}
|
||||
|
||||
if(improveSp > 0) {
|
||||
improveSp += 5;
|
||||
recipe.setRemainingSp(recipe.getRemainingSp() - improveSp);
|
||||
|
||||
int toUseSp = 5;
|
||||
Skill improveHpRec = SkillFactory.getSkill(Warrior.IMPROVED_HPREC);
|
||||
recipe.addStartingSkillLevel(improveHpRec, toUseSp);
|
||||
improveSp -= toUseSp;
|
||||
|
||||
if(improveSp > 0) {
|
||||
Skill improveMaxHp = SkillFactory.getSkill(Warrior.IMPROVED_MAXHP);
|
||||
recipe.addStartingSkillLevel(improveMaxHp, improveSp);
|
||||
}
|
||||
}
|
||||
|
||||
giveItem(recipe, 2000002, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 2000003, 100, MapleInventoryType.USE);
|
||||
giveItem(recipe, 3010000, 1, MapleInventoryType.SETUP);
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
private static void giveEquipment(CharacterFactoryRecipe recipe, MapleItemInformationProvider ii, int equipid) {
|
||||
Item nEquip = ii.getEquipById(equipid);
|
||||
recipe.addStartingEquipment(nEquip);
|
||||
}
|
||||
|
||||
private static void giveItem(CharacterFactoryRecipe recipe, int itemid, int quantity, MapleInventoryType itemType) {
|
||||
recipe.addStartingItem(itemid, quantity, itemType);
|
||||
}
|
||||
|
||||
public static int createCharacter(MapleClient c, String name, int face, int hair, int skin, int gender, int improveSp) {
|
||||
return createNewCharacter(c, name, face, hair, skin, gender, createRecipe(MapleJob.WARRIOR, 30, 102000000, equips[gender], equips[2 + gender], equips[4], weapons[0], gender, improveSp));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user