Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Add-on] Fix for Horntail for MetroMS (summoned & message when killed)

Newbie Spellweaver
Joined
Apr 28, 2010
Messages
41
Reaction score
11
There is a bug when you summon horntail from his reactor either message "To the crew that have finally conquered Horned Tail after numerous a.." that pops up or 2x or more horntails spawn from his reactor.

These method are Temp fix not the proper way.

These method fix the message pops up when horntail killed and horntail spawned.

in MapleCharacter.java
Add:
Code:
private int state;

Add:
Code:
    public int getState() {
        return state;
    }

    public void setState(int s) {
        state = s;
    }

in NPCConversationManager.java
Add:
Code:
    public void resetState() {
        getPlayer().setState(0);
    }

in MapleMap.java
Replace whole function:
Code:
        if (monster.getId() == 8810018 || monster.getId() == 8810026) {

With:
Code:
        if (monster.getId() == 8810018 || monster.getId() == 8810026) {
            chr.setState(chr.getState() + 1);
            if (chr.getState() == 2) {
                for (ChannelServer cserv : ChannelServer.getAllInstances()) {
                    for (MapleCharacter player : cserv.getPlayerStorage().getAllCharacters()) {
                        if (player.getMapId() == 240000000) {
                            player.message("Mysterious power arose as I heard the powerful cry of the Nine Spirit Baby Dragon.");
                            player.getClient().getSession().write(MaplePacketCreator.showOwnBuffEffect(2022**** 13)); // The Breath of Nine Spirit
                            player.getMap().broadcastMessage(player, MaplePacketCreator.showBuffeffect(player.getId(), 2022**** 13), false); // The Breath of Nine Spirit
                            mii.getItemEffect(2022109).applyTo(player);
                        } else {
                            player.dropMessage("To the crew that have finally conquered Horned Tail after numerous attempts, I salute thee! You are the true heroes of Leafre!!");
                            if (player.isGM()) {
                                player.message("[GM-Message] Horntail was killed by : " + chr.getName());
                            }
                            if (player.isAlive()) {
                                player.getClient().getSession().write(MaplePacketCreator.showOwnBuffEffect(2022108, 11));
                            }
                            player.getMap().broadcastMessage(player, MaplePacketCreator.showBuffeffect(player.getId(), 2022108, 11), false); // HT nine spirit
                        }
                    }
                }
            }
        }

in MapleMap.java
Find then delete whole function:
Code:
                    if (monster.getId() == 9300166 || monster.getId() == 8810026) {

example:
Code:
//                    if (monster.getId() == 9300166 || monster.getId() == 8810026) {
//                        TimerManager.getInstance().schedule(new Runnable() {
//                            @Override
//                            public void run() {
//                                killMonster(monster, (MapleCharacter) getAllPlayer().get(0), false, false, 4);
//                            }
//                        }, 4500 + Randomizer.getInstance().nextInt(500));
//                    }
in MapleMonster.java
Find then delete whole function:
Code:
            if (this.getMap().countMonster(8810026) > 2 && this.getMap().getId() == 240060200) {

example:
Code:
//            if (this.getMap().countMonster(8810026) > 2 && this.getMap().getId() == 240060200) {
//                this.getMap().killAllMonsters();
//                return;
//            }

Reactor 2401000.js (horntail)
i use this:
PHP:
function act() {
	rm.changeMusic("Bgm14/HonTale");
	rm.spawnMonster(8810026, 71, 260);
	rm.killMonster(8810026);
	rm.mapMessage(6, "From the depths of his cave, Horntail emerge!");
	rm.createMapMonitor(240060200, true, 240060**** "sp", 240060**** 2408003);
	rm.getReactor().getMap().addMapTimer(1 * 22 * 60, 100000000);
}

NPC 2083002.js (Crystal of Roots)
use this script : modified from moogra version
Code:
/*
	This file is part of the OdinMS Maple Story Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
		       Matthias Butz <matze@odinms.de>
		       Jan Christian Meyer <vimes@odinms.de>

    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/>.
*/

/**
 *Crystal of Roots
 *@Author: Moogra
 *@NPC: Crystal of Roots
 */
function start() {
    cm.sendYesNo("Do you wish to leave?");
}

function action(mode, type, selection) {
    if (mode < 1)
        cm.dispose();
    else {
        cm.warp(240040700);
        if (cm.getPlayer().getMap().getCharacters().size() < 2){
            cm.getPlayer().getMap().killAllMonsters();
	}
	cm.resetState();
        cm.dispose();
    }
}

I'm not good in english :(:, i'm sorry if my grammar looks funny.
 
Last edited:
Skilled Illusionist
Joined
Feb 18, 2010
Messages
320
Reaction score
112
Re: Fix for Horntail for MetroMS (summoned & message when killed)

It wipes some of the codes.. Post them plawks!

EDIT: Found them.. 2022109
 
Last edited:
Experienced Elementalist
Joined
Mar 26, 2010
Messages
250
Reaction score
62
Re: Fix for Horntail for MetroMS (summoned & message when killed)

Why is only one of the code boxes PHP?
 
Skilled Illusionist
Joined
Jul 17, 2008
Messages
315
Reaction score
3
Re: Fix for Horntail for MetroMS (summoned & message when killed)

Great release. This will be usefull for some mebers here =)
 
Junior Spellweaver
Joined
Jan 12, 2010
Messages
101
Reaction score
4
Re: Fix for Horntail for MetroMS (summoned & message when killed)

Nice Release!!
 
Junior Spellweaver
Joined
Jan 29, 2009
Messages
187
Reaction score
2
Re: Fix for Horntail for MetroMS (summoned & message when killed)

no killmonster func D:
 
Junior Spellweaver
Joined
Nov 23, 2010
Messages
173
Reaction score
9
Re: Fix for Horntail for MetroMS (summoned & message when killed)

is now have the fully fixed horntail?
 
8===D
Loyal Member
Joined
Jan 19, 2009
Messages
613
Reaction score
96
Re: Fix for Horntail for MetroMS (summoned & message when killed)

Pretty good.
 
Junior Spellweaver
Joined
Nov 19, 2010
Messages
110
Reaction score
52
Re: Fix for Horntail for MetroMS (summoned & message when killed)

"Looks" nice.
But i don't know its work or not :)
Btw i want to ask,who the fag bumps this OLD OLD OLD OLD Thread?
 
Last edited:
Back
Top