mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
added a command for setting quest stages
This commit is contained in:
parent
c4d742a3a4
commit
89b5228eba
1 changed files with 23 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ import org.crandor.game.node.entity.player.ai.resource.ResourceAIPManager;
|
|||
import org.crandor.game.node.entity.player.info.login.PlayerParser;
|
||||
import org.crandor.game.node.entity.player.link.IronmanMode;
|
||||
import org.crandor.game.node.entity.player.link.appearance.Gender;
|
||||
import org.crandor.game.node.entity.player.link.quest.Quest;
|
||||
import org.crandor.game.node.entity.player.link.skillertasks.Difficulty;
|
||||
import org.crandor.game.node.entity.state.EntityState;
|
||||
import org.crandor.game.node.item.Item;
|
||||
|
|
@ -50,6 +51,7 @@ import org.crandor.plugin.InitializablePlugin;
|
|||
import org.crandor.plugin.Plugin;
|
||||
import org.crandor.plugin.PluginManager;
|
||||
import org.crandor.tools.RandomFunction;
|
||||
import org.crandor.tools.StringUtils;
|
||||
import plugin.skill.herblore.PotionDecantingPlugin;
|
||||
|
||||
import java.awt.*;
|
||||
|
|
@ -524,7 +526,27 @@ public final class DeveloperCommandPlugin extends CommandPlugin {
|
|||
case "roar":
|
||||
player.getPacketDispatch().sendInterfaceConfig(762, 20, false);
|
||||
break;
|
||||
}
|
||||
case "setstage":
|
||||
if(args.length < 2) {
|
||||
player.getPacketDispatch().sendMessage("Syntax: setstage stage# quest name");
|
||||
} else {
|
||||
int stageId = 0;
|
||||
stageId = toInteger(args[1]);
|
||||
String questName = "";
|
||||
for (int i = 2; i < args.length; i++) {
|
||||
questName += (i == 2 ? "" : " ") + args[i];
|
||||
}
|
||||
questName = StringUtils.formatDisplayName(questName);
|
||||
Quest quest = player.getQuestRepository().getQuest(questName);
|
||||
if (quest == null) {
|
||||
player.debug("err or: invalid quest - " + questName);
|
||||
return true;
|
||||
}
|
||||
player.debug("Setting quest " + questName + " to stage " + stageId);
|
||||
player.getQuestRepository().setStage(quest,stageId);
|
||||
player.getQuestRepository().syncronizeTab(player);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue