次元のミラー実装

Go down

次元のミラー実装

投稿 by 構築さん on 2014-05-31, 17:42

SavedLocationType.java

Code:
MIRROR

を追加

MapleCharacter.java

を追加

Code:
/*
* 1: Mu Lung Dojo, 25+
* 2: Monster Carnival 1, 30-50
* 3: Monster Carnival 2, 51-70
* 4: Ghost Ship PQ, 60-80?
* 5: Astaroth PQ, 20-40 // I THINK ITS 5, IDK
* 6: Construction Site, 20-30
* 9: Moon Bunny, 10+
* 10: KPQ 'First Time Together', 20+
* 11: LPQ 'Dimensional Schism' <-- Stupid name, 20+
* 12: Forest of Poison Haze, 70+
* 13: OPQ 'Remnants of the Goddess', 70+
* 14: Lord Pirate, 70+
* 15: Romeo and Juliet, 70+
* 16: Ressurection of the Hob Goblin, 80+?
* 17: Dragon's Nest, 100+
* 21: Kenta in Danger, 120+
* 22: Escape //idk, 120+
* 23: Ice Knight's Curse, 30+
*
*/
public String getMirrorString() {
StringBuilder ret = new StringBuilder();
if (getLevel() <10> 19 && level <31> 24) return true;
case 10:
case 11: if (level > 19) return true;
case 2: if (level > 29 && level <51> 50 && level <71> 59 && level <81> 19 && level <41> 10) return true;
case 12:
case 13:
case 14:
case 15: if (level > 69) return true;
case 16: if (level > 79) return true;
case 17: if (level > 99) return true;
case 21:
case 22: if (level > 119) return true;
case 23: if (level > 29) return true;

default: return false;
}
}

ServerConstants.java

Code:
//mapid, index - Note: Some may be wrong (id)
public static final int[][] MIRROR_CONSTANTS = {{925020000, 1}, {980000000, 2}, {980030000, 3}, {923020000, 4}, {677000013, 5}, {910320000, 6}, {910010500, 9}, {103000805, 10}, {221023300, 11}, {300030100, 12}, {200080101, 13}, {251010404, 14}, {261000021, 15}, {211000002, 16}, {240080000, 17}, {707144890, 21}, {921160000, 22}, {539722730, 23}};

を追加

Code:
/**
*
*@npc Dimensional Mirror [9010022]
*@author Soulfist
*/
function start() {
cm.getClient().getSession().write(Packages.tools.MaplePacketCreator.sendDimensionalMirror(cm.getPlayer()));
if (cm.getLevel() <10> 0) cm.getPlayer().mirrorWarp(s);
}

MaplePacketCreator.java

Code:
//header - 0x1F5
public static MaplePacket sendDimensionalMirror(MapleCharacter player) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.NPC_TALK.getValue());
mplew.write(4); //in every npc talking thing
mplew.writeInt(9010022); //npc id
mplew.write(0x11); //0x0E (14) in v83
mplew.writeInt(0);
mplew.writeShort((short) Math.floor(Math.random() * 4) + 1); //changes 1~4, stupid way to handle for now
mplew.write0(3); //always
mplew.write(new byte[]{(byte) 0xC2, (byte) 0}); //no clue, but occasionally changes...
mplew.writeMapleAsciiString(player.getMirrorString()); //the selections

return mplew.getPacket();
}

を追加
avatar
構築さん
Admin

Posts : 193
Join date : 2014/05/29

http://maplescience.forumjap.com

トップに戻る Go down

トップに戻る


 
Permissions in this forum:
返信投稿: 不可