Jump to content

The RuneLocus forum has been archived and does not accept new registrations.
Click here for more information, and click here to join the community on Discord.

Search the Community

Showing results for tags 'dialogue'.

The search index is currently processing. Current results may not be complete.
  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 4 results

  1. Okay so im trying to get my dialogue to display only if the player is at the correct stage in the quest or has done the task for the quest E.I [code] case 20: if (Player.BlackDemon == 1); if (Player.Doricsquest == 6); sendNpcChat4( "You haven't completed my task", "Please do so before claiming your reward","remember you have to kill 10 black demons", "and 10 dagganoths", 284, "Doric"); break; [/code] But at the moment if completely skips over the start of the quest and shows this line which i dont want it to show unless they have already started the quest and haven't done the required task. [code] case 24:{ if (Player.Doricsquest == 0) sendNpcChat4( "Hello Traveller", "may i ask you do to a small favor for me?", "Can you slay 10 Black Demons and 10 Dagganoths please?", "I'll make it worth the trouble.", 284, "Doric"); c.nextChat = 21; break;}[/code] Is someone able to help me with this? I'm far from the best at coding but i have never written or attempted to implement a quest into my server before. Heres the rest of the code for dialogue code [code] case 20: if (Player.BlackDemon == 1); if (Player.Doricsquest == 6); sendNpcChat4( "You haven't completed my task", "Please do so before claiming your reward","remember you have to kill 10 black demons", "and 10 dagganoths", 284, "Doric"); break; case 24:{ if (Player.Doricsquest == 0) sendNpcChat4( "Hello Traveller", "may i ask you do to a small favor for me?", "Can you slay 10 Black Demons and 10 Dagganoths please?", "I'll make it worth the trouble.", 284, "Doric"); c.nextChat = 21; break;} case 21: sendPlayerChat2( "A reward you say?", "I definitely cannot turn down an offer like that, ill do it."); c.nextChat = 22; break; case 22: Player.Doricsquest = 6; sendNpcChat4( "Ok great", "If you have any troubles please report back to me", "don't forget that Demons are week to magic", "and Dagganoths are also weak to magic", 284, "doric"); break; case 23: if (Player.Doricsquest == 6); if (Player.BlackDemon == 10 ); sendNpcChat4( "Have you completed my task?", "whats this you have?", "wow you must be a fierce warrior", "im a man of my word heres the reward", 284, "Doric"); break; } }[/code]
  2. omniex

    Npc Dialogue

    I'm still learning and reading what I can all the help is appreciated. [B]This is what it looked like before and it worked but i wanted to make it more simple and less bulky[/B] [code] if(componentId == OPTION_2) { stage = 13; if (player.getInventory().containsItem(####, 1)); if (player.getInventory().containsItem(#, 1)); if (player.getInventory().containsItem(####, 125)); player.getInventory().deleteItem(####, 1); player.getInventory().deleteItem(#, 1); player.getInventory().deleteItem(####, 125); sendNPCDialogue(npcId, 9827, "Alright thank you!, let me see what this design does for this particular item!"); } else if (player.getInventory().containsItem(####, 1));{ player.getInventory().deleteItem(####, 1); stage = 14; sendNPCDialogue(npcId, 9827, "OH you have a abyssal whip! may i see!"); break; } [/code] [B]This is what it looks like now but for some reason shes doing the else option but is skippiing the dialogue and going to another dialogue stage,[/B] [code] [B][I][COLOR="#00FF00"] } if(componentId == OPTION_2) { stage = 13; if (player.getInventory().containsItem(4151, 1) && player.getInventory().containsItem(1, 1) && player.getInventory().containsItem(20269, 125)){ player.getInventory().deleteItem(4151, 1); player.getInventory().deleteItem(1, 1); player.getInventory().deleteItem(20269, 125); sendNPCDialogue(npcId, 9827, "Alright thank you!, let me see what this design does for the whip"); } else if (player.getInventory().containsItem(4151, 1) && player.getInventory().containsItem(1, 1) && player.getInventory().containsItem(20269, 0)); stage = -2; sendNPCDialogue(npcId, 9827, "You are missing 125 noted infernal ashes"); }[/COLOR][/I][/B] < this works. [COLOR="#FF0000"]/**else if (player.getInventory().containsItem(4151, 1) && player.getInventory().containsItem(1, 0) && player.getInventory().containsItem(20269, 125)){ stage = -2; sendNPCDialogue(npcId, 9827, "Come back to me when you have a tool-kit"); } else if (player.getInventory().containsItem(451, 0) && player.getInventory().containsItem(1, 1) && player.getInventory().containsItem(20269, 125)){ stage = -2; sendNPCDialogue(npcId, 9827, "You are missing the Abyssal whip please come back you have one."); } else if (player.getInventory().containsItem(4151, 0) && player.getInventory().containsItem(1, 0) && player.getInventory().containsItem(20269, 0)){ stage = -2; sendNPCDialogue(npcId, 9827, "You are missing the abyssal whip, 1 tool-kit and 125 noted infernal ashes please come back you have them."); break; }**/[/COLOR][B]But I can't get her to do this I compile with no errors but if I add it in she skips all of this and goes straight to Stage 11.[/B] case 11: stage = 12; player.getInventory().addItem(####, #); sendNPCDialogue(npcId, 9827, "I've binded the items together and this is what happend to the staff it is truly remarkable"); break; case 12: stage = -2; sendNPCDialogue(npcId, 9827, "Please if you find any more please bring them to me!"); break; case 13: stage = 12; player.getInventory().addItem(4153, 1); sendNPCDialogue(npcId, 9827, "I've binded the items together and this is what happend to the whip it is truly remarkable"); break; default: end(); break; } } [MENTION=15855]Over[/MENTION]ride public void finish() { // TODO Auto-generated method stub } } [/code] [B]Another thing is IF you do have all the items then she is doing the main option's[/B] [code] player.getInventory().deleteItem(4151, 1); player.getInventory().deleteItem(1, 1); player.getInventory().deleteItem(20269, 125); [/code] [B]But then skips to and says[/B] [code] sendNPCDialogue(npcId, 9827, "You are missing 125 noted infernal ashes"); break; [/code]
  3. I'm trying to make an Npc talk along with take an item from someones inventory and exchange it for something else. With different options depending on the item you have . I understand the basic dialogue with cases and stages and options to select but how do I add in item exchange as well. I'm not talking about a shop either. I just want the npc to talk a certain way depending on which item or items you have and be able to exchange it with something else. I am new to 718 coding i'm reading all the tutorials I can and i've searched the forums and have found "item repairs and just normal dialogue and dialogue that opens up shops but not anything with dialogue with item exchange and if it is its a repair that just opens Options to select one you talk to the npc yeah that's close but that's not quite what i'm looking for lets say if you have a abyssal whip in your inventory and you want to have a different color idk i'm just throwing this out there and you talk to the npc and dialogue starts [CODE] Npc - Hello "name" I am "NpcName" I recolor whips for players! Player - Good that's why I am here! Npc - Checks which whip you have and dialogue starts depending on if you have a whip With recoloring dye or Req item Npc - Different dialogue if you have a colored whip to recolor NPC - Dialogue if you have no whip or no colored whip with you to recolor with required dye or item NPC - Dialogue if you do not have the dye or other REQ item. [/CODE] [B]If has a whip or colored whip[/B] [CODE] Player - I have this whip or *Color* whip NPC- Options Normal, Red, Blue, White, Orage, Purple - just putting options to give an example. NPC - Takes either whip or *Colored* whip and exchanges it for another color Player - Says thank you and goodbye [/CODE]
  4. Hi there, Well my problem is: I can't get the dialogues to work. All the dialogues that are in rune-evo v3 already have their classes made. But any new Dialogue i add, Wont get a class made. So my dialogue's won't work. I tried replacing the dialogue handler, and dialogue.java with the matrix ones. and re assigning the file paths. But only ends up in trillion of errors. The Path for rune-evo v3 is [QUOTE] src\com\rs\game\player\dialogues\impl[/QUOTE] in most servers i've seen, the path go's directly in the dialogue folder. Why fox made a impl i would happy to get a explanation for it. All help is welcome! Dialogue Handler. [CODE]package com.rs.game.player.dialogues; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import com.rs.utils.Logger; public final class DialogueHandler { private static final HashMap<Object, Class<Dialogue>> handledDialogues = new HashMap<Object, Class<Dialogue>>(); [MENTION=19271]supp[/MENTION]ressWarnings("rawtypes" ) private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException { List<Class> classes = new ArrayList<Class>(); if (!directory.exists()) { return classes; } File[] files = directory.listFiles(); for (File file : files) { if (file.isDirectory()) { assert !file.getName().contains("."); classes.addAll(findClasses(file, packageName + "." + file.getName())); } else if (file.getName().endsWith(".class")) { classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6))); } } return classes; } [MENTION=19271]supp[/MENTION]ressWarnings({ "unchecked", "rawtypes" }) public static final void init() { String fileLoc = "bin/com/rs/game/player/dialogues/impl"; String packageDir = "com.rs.game.player.dialogues.impl"; try { List<Class> files = findClasses(new File(fileLoc) , packageDir); for (Class<Dialogue> c : files) { if (Dialogue.class.isAssignableFrom(c)) { handledDialogues.put(""+c.getSimpleName()+"", (Class<Dialogue>) Class.forName(c.getCanonicalName())); } } } catch (ClassNotFoundException e) { e.printStackTrace(); } } public static final void reload() { handledDialogues.clear(); init(); } public static final Dialogue getDialogue(Object key) { if (key instanceof Dialogue) return (Dialogue) key; Class<Dialogue> classD = handledDialogues.get(key); if (classD == null) return null; try { return classD.newInstance(); } catch (Throwable e) { Logger.handle(e); } return null; } private DialogueHandler() { } } [/CODE]
×
×
  • Create New...