モンスター召喚NPC

Go down

モンスター召喚NPC

投稿 by 構築さん on 2014-05-30, 09:02

package.scripting.npc;

import.server.maps.MapleMap;
import.server.life.MapleMonsterInformationProvider;
NPCConversationManager.java


Code:
public void summonMob(int mobid, int customHP, int customEXP, int amount) {
MapleMonsterStats newStats = new MapleMonsterStats();
if (customHP > 0) {
newStats.setHp(customHP);
}
if (customEXP >= 0) {
newStats.setExp(customEXP);
}
if (amount <= 1) {
MapleMonster npcmob = MapleLifeFactory.getMonster(mobid);
npcmob.setOverrideStats(newStats);
npcmob.setHp(npcmob.getMaxHp());
getPlayer().getMap().spawnMonsterOnGroudBelow(npcmob, getPlayer().getPosition());
} else {
for (int i = 0; i <amount>= 2 && mode == 0) {
cm.sendOk("Goodbye");
cm.dispose();
return;
}

if (mode == 1) {
status++;
}
else {
status--;
}

if (status == 0) {
cm.sendNext("I summon Bosses for #bFantasyStory#l. I summon 10 monsters at a time for free.");
}
else if (status == 1) {
cm.sendSimple("Please remember I will summon 10. \r\nPlease choose #b\r\n#L0#Papulatus clock#l\r\n#L1#Headless Horseman#l\r\n#L2#Black Crow#l\r\n#L3#Anego#l\r\n#L4#Rooster#l\r\n#L5#BigFoot#l\r\n#L6#MushMom#l#r\r\n#L7#Clear Drops#l\r\n#L8#Kill All Monsters#l");
}
else if (status == 2) {

if (selection == 0) {
cm.summonMob(8500001, 23000000, 596000, 10);
cm.dispose();
}

else if (selection == 1) {
cm.summonMob(9400549, 3500000, 300000, 10);
cm.dispose();
}
else if (selection == 2) {
cm.summonMob(9400014, 35000000, 1780000, 10);
cm.dispose();
}
else if (selection == 3) {
cm.summonMob(9400121, 75000000, 3900000, 10);
cm.dispose();
}
else if (selection == 4) {
cm.summonMob(9600001, 340, 33, 10);
cm.dispose();
}
else if (selection == 5) {
cm.summonMob(9400575, 32000000, 2660000, 10);
cm.dispose();
}
else if (selection == 6) {
cm.summonMob(9500124, 20000, 1200, 10);
cm.dispose();
}
else if (selection == 7) {
cm.cleardrops();
cm.dispose();
}
else if (selection ==  {
cm.killAllMonsters(true);
cm.dispose();
}
}
}
}
avatar
構築さん
Admin

Posts : 193
Join date : 2014/05/29

http://maplescience.forumjap.com

トップに戻る Go down

トップに戻る


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