When you say "how do i fix these" you don't help us at all. What's happening to make it not work correctly? Are they just not working at all? are you getting an error?
|
How do I fix these? it works fine on the spawn source??
thanks for your helpCode:case 2542: case 2543: case 2544: if(player.busy()) { player.getPacketSender().sendMessage("You cannot do that right now."); return; } if(itemId == 2542 && player.isPreserveUnlocked() || itemId == 2543 && player.isRigourUnlocked() || itemId == 2544 && player.isAuguryUnlocked()) { player.getPacketSender().sendMessage("You have already unlocked that prayer."); return; } DialogueManager.start(player, 9); player.setDialogueOptions(new DialogueOptions() { @Override public void handleOption(Player player, int option) { if(option == 1) { player.getInventory().delete(itemId, 1); if(itemId == 2542) player.setPreserveUnlocked(true); else if(itemId == 2543) player.setRigourUnlocked(true); else if(itemId == 2544) player.setAuguryUnlocked(true); player.getPacketSender().sendConfig(709, PrayerHandler.canUse(player, PrayerData.PRESERVE, false) ? 1 : 0); player.getPacketSender().sendConfig(711, PrayerHandler.canUse(player, PrayerData.RIGOUR, false) ? 1 : 0); player.getPacketSender().sendConfig(713, PrayerHandler.canUse(player, PrayerData.AUGURY, false) ? 1 : 0); player.getPacketSender().sendMessage("You have unlocked a new prayer."); } player.getPacketSender().sendInterfaceRemoval(); } }); break; case 2545: if(player.busy()) { player.getPacketSender().sendMessage("You cannot do that right now."); return; } if(player.isTargetTeleportUnlocked()) { player.getPacketSender().sendMessage("You have already unlocked that teleport."); return; } DialogueManager.start(player, 12); player.setDialogueOptions(new DialogueOptions() { @Override public void handleOption(Player player, int option) { if(option == 1) { player.getInventory().delete(itemId, 1); player.setTargetTeleportUnlocked(true); player.getPacketSender().sendMessage("You have unlocked a new teleport."); } player.getPacketSender().sendInterfaceRemoval(); } }); break;
When you say "how do i fix these" you don't help us at all. What's happening to make it not work correctly? Are they just not working at all? are you getting an error?
I would say make sure the item ids are correct. Also make sure the dialogues are added as if I'm not mistaken, the dialogues from OSRSPK release aren't in the economy release.
I've removed and put my old dialogues.json back and I'm still getting this error? :O
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5
at com.google.gson.JsonParser.parse(JsonParser.java:6 5)
at com.elvarg.game.definition.loader.impl.DialogueDef initionLoader.load(DialogueDefinitionLoader.java:2 3)
at com.elvarg.game.definition.loader.DefinitionLoader .run(DefinitionLoader.java:22)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5
at com.google.gson.stream.JsonReader.syntaxError(Json Reader.java:1505)
at com.google.gson.stream.JsonReader.checkLenient(Jso nReader.java:1386)
at com.google.gson.stream.JsonReader.doPeek(JsonReade r.java:531)
at com.google.gson.stream.JsonReader.peek(JsonReader. java:414)
at com.google.gson.JsonParser.parse(JsonParser.java:6 0)
... 5 more
Dec 13, 2017 4:39:01 PM com.elvarg.game.definition.loader.DefinitionLoader run
SEVERE: Loaded definitions for: ./data/definitions/dialogues.json
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5
at com.google.gson.JsonParser.parse(JsonParser.java:6 5)
at com.elvarg.game.definition.loader.impl.DialogueDef initionLoader.load(DialogueDefinitionLoader.java:2 3)
at com.elvarg.game.definition.loader.DefinitionLoader .run(DefinitionLoader.java:22)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 5
at com.google.gson.stream.JsonReader.syntaxError(Json Reader.java:1505)
at com.google.gson.stream.JsonReader.checkLenient(Jso nReader.java:1386)
at com.google.gson.stream.JsonReader.doPeek(JsonReade r.java:531)
at com.google.gson.stream.JsonReader.peek(JsonReader. java:414)
at com.google.gson.JsonParser.parse(JsonParser.java:6 0)
... 5 more
this is the first 4 lines
Even when I put my old .json file back in still gave me the same error that I didn't have before? very confusing haha thanks for your help[
{
"id": 0,
"type": "NPC_STATEMENT",
"anim": "DEFAULT",
"lines": 1,
"line1": "Hello. What do you need?",
"next": 1,
"npcId": 315
},
{
"id": 1,
"type": "OPTION",
"lines": 4,
"line1": "Open Shop",
"line2": "Sell Emblems",
"line3": "Skull me",
"line4": "Cancel",
"next": -1,
"npcId": 315
},
{
If this still hasnt been fixed;
If you look in the code you sent. It's trying to send dialogue id 12 and 9.
DialogueManager.start(player, 9);
DialogueManager.start(player, 12);
check id 9 and 12 in dialogues.json, see what they are. If they don't exist, add them.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |