Jump to content

Search the Community

Showing results for tags 'dialogue'.



More search options

  • 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 75 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]
  5. number 0 thought this would be helpful to members if this was posted on the forum. [TABLE="class: grid, width: 500, align: center"] [TR] [TD]Dialogue Type[/TD] [TD]Animation ID[/TD] [/TR] [TR] [TD]Happy / Joyful[/TD] [TD]588[/TD] [/TR] [TR] [TD]Speaking Calmly 1[/TD] [TD]589[/TD] [/TR] [TR] [TD]Calm talk[/TD] [TD]590[/TD] [/TR] [TR] [TD]Default Speach:[/TD] [TD]591[/TD] [/TR] [TR] [TD]Evil[/TD] [TD]592[/TD] [/TR] [TR] [TD]Evil Continued[/TD] [TD]593[/TD] [/TR] [TR] [TD]Delighted Evil[/TD] [TD]594[/TD] [/TR] [TR] [TD]Annoyed[/TD] [TD]595[/TD] [/TR] [TR] [TD]Distressed[/TD] [TD]596[/TD] [/TR] [TR] [TD]Distressed Continued[/TD] [TD]597[/TD] [/TR] [TR] [TD]Almost Crying[/TD] [TD]598[/TD] [/TR] [TR] [TD]Bows head while sad[/TD] [TD]599[/TD] [/TR] [TR] [TD]Drunk to left[/TD] [TD]600[/TD] [/TR] [TR] [TD]Drunk to right:[/TD] [TD]601[/TD] [/TR] [TR] [TD]Disinterested[/TD] [TD]602[/TD] [/TR] [TR] [TD]Sleepy[/TD] [TD]603[/TD] [/TR] [TR] [TD]Plain Evil:[/TD] [TD]604[/TD] [/TR] [TR] [TD]Laugh 1[/TD] [TD]605[/TD] [/TR] [TR] [TD]Laugh 2[/TD] [TD]606[/TD] [/TR] [TR] [TD]Laugh 3[/TD] [TD]607[/TD] [/TR] [TR] [TD]Laugh 4[/TD] [TD]608[/TD] [/TR] [TR] [TD]Evil laugh[/TD] [TD]609[/TD] [/TR] [TR] [TD]Sad[/TD] [TD]610[/TD] [/TR] [TR] [TD]More Sad[/TD] [TD]611[/TD] [/TR] [TR] [TD]On One Hand:[/TD] [TD]612[/TD] [/TR] [TR] [TD]Nearly crying[/TD] [TD]613[/TD] [/TR] [TR] [TD]Anger 1[/TD] [TD]614[/TD] [/TR] [TR] [TD]Anger 2[/TD] [TD]615[/TD] [/TR] [TR] [TD]Anger 3[/TD] [TD]616[/TD] [/TR] [TR] [TD]Anger 4[/TD] [TD]617[/TD] [/TR] [/TABLE] Credits http://pastebin.com/5Hyn305n
  6. "Removed" "None of you pieces of shit need it. :)"
  7. "Removed" "None of you pieces of shit need it. :)"
  8. Browser lagged and double posted this. Please remove and use this [URL="http://www.runelocus.com/forums/showthread.php?101778-Bugless-and-Better-Make-Over-Mage-Dialogue"]thread[/URL].
  9. :) niggas be hatin now :)
  10. Hi there, I was wondering if someone could help me and tell me about what i'm doing wrong. I made a dialogue its handled in cases, Its with a istalked statement So the npc says something different on a second approach. Now i made it, so you can claim a free mithril platebody When you have a level of 40 defence, and never talked to this npc before. But the trouble with the dialogue is, it stops when it checks for a level 40 defence, What needs to happen is. The npc needs to check if you are lvl 40 defence, If not then it will say come back when you are strong enough. If you have 40 defence then it will give you a mithril platebody+it will set the dialogue to istalkedwith. so they cannot claim another platebody. take a look. [CODE]package com.rs.game.player.dialogues; import com.rs.Settings; import com.rs.game.player.Skills; public class Dyingadv extends Dialogue { int npcId; [MENTION=15855]Over[/MENTION]ride public void start() { if (!player.isTalkedWithDyingadv()) { sendEntityDialogue(IS_NPC,"Dying Adventurer", 19251, 9827, "Wait!"); } else { sendEntityDialogue(IS_NPC,"Dying Adventurer", 19251, 9827, "I have nothing for you anymore."); } } [MENTION=15855]Over[/MENTION]ride public void run(int interfaceId, int componentId) { switch (stage) { case -1: if (!player.isTalkedWithDyingadv()) { stage = 0; sendPlayerDialogue(9827, "Who are you?"); } else { sendEntityDialogue(IS_NPC,"Dying Adventurer", 19251, 9827, "Leave me im finished."); } break; case 0: stage = 1; sendEntityDialogue(IS_NPC,"Dying Adventurer",19251,9827, "It doesn't matter who i am, The only thing that matters is, To defeat the Evil that lurks deep in these caverns."); break; case 1: stage = 2; sendEntityDialogue(IS_NPC,"Dying Adventurer",19251,9827, "*kugh* You must defeat the evil, Here take this."); break; case 2: if (player.getSkills().getLevel(Skills.DEFENCE) < 40) { sendEntityDialogue(IS_NPC,"Dying Adventurer",19251,9827, "*kugh* I'm sorry adventurer, Come back when You are strong enough."); } else { stage = 3; } break; case 3: stage = 4; player.getInventory().addItem(1121, 1); sendEntityDialogue(IS_NPC,"Dying Adventurer",19251,9827, "Wear this platebody, It wil help you with the fight."); player.setTalkedWithDyingadv(); break; case 4: sendPlayerDialogue(9827, "Thank you, i will do my best!"); break; } } [MENTION=15855]Over[/MENTION]ride public void finish() { } }[/CODE] All help is appreciated!!
  11. Thorin

    Skill tele dialogue

    I feel like im missing something somewhere, but i don't see it and neither does eclipse... When the person hits the skill tele button it pulls up the dialogue fine, but no matter what option they choose, it takes them to the falconry(hunter minigame) tele. [CODE] package com.rs.game.player.dialogues; import com.rs.Settings; import com.rs.cache.loaders.NPCDefinitions; import com.rs.game.WorldTile; import com.rs.game.minigames.CastleWars; import com.rs.game.player.Skills; import com.rs.game.player.content.Magic; import com.rs.game.player.controlers.FightCaves; import com.rs.game.player.controlers.FightKiln; public class SkillTeleports extends Dialogue { private int npcId; [MENTION=15855]Over[/MENTION]ride public void start() { npcId = (Integer) parameters[0]; sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Time for some skilling, Eh?" }, IS_NPC, npcId, 9827); } [MENTION=15855]Over[/MENTION]ride public void run(int interfaceId, int componentId) { if (stage == -1) { sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] { player.getDisplayName(), "Yup, Gotta get the comp cape..." }, IS_PLAYER, player.getIndex(), 9827); stage = 1; } else if (stage == 1) { sendOptionsDialogue("What skill will you do?", "Hunter", "Mining", "WoodCutting", "Fishing", "More Options"); stage = 2; } else if (stage == 2) { if (componentId == OPTION_1) { if(player.getEquipment().getWeaponId() != -1 || player.getEquipment().getShieldId() != -1) stage = 1; sendNPCDialogue(npcId, 9827, "Please remove your weapon and shield first, or they will be deleted."); return; }else if(player.getEquipment().getWeaponId() == -1 || player.getEquipment().getShieldId() == -1) { player.getControlerManager().startControler("Falconry"); }else if (componentId == OPTION_2) Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(4382, 5912, 2)); else if (componentId == OPTION_3) Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(3306, 5289, 0)); else if (componentId == OPTION_4) Magic.sendNormalTeleportSpell(player, 0, 0, new WorldTile(2862, 2584, 0)); [/CODE] thats the part that teles them, any ideas?
  12. Hi there i was wondering if it's possible to have more chatheads in a dialogue then just 2. Like if you start a dialogue. then this is defined in it. int npcId = 19010; = so it uses chathead 19010 wich is a werewolf chathead. SO when you start the dialogue then your chathead will apear if you make sendPlayerDialogue etc. and the 19010 chathead will appear after sendNPCDialogue but is it possible to have more then 1 npc chathead? such as example. chathead 19010, 2244, 14784 etc. if it is possible, could someone make an example or explain how it's done? thank you.
  13. McKlub

    NPC Name In Dialogue

    I was just wondering how I would change, for example, King Roald's name in his dialogue to King Fortis. I can't seem to figure it out myself or find any tutorials on it. Note that I'm looking for how to change it at the top of the dialogue box, not the NPC's actual name. I already did that part. Thanks!
  14. Hi there i had a issue with the chathead of the werewolf. Everytime if i make a dialogue with a new created npc *werewolf with the right chathat* then once you talk to him you will see a human mouth and a really tiny werewolf head. like this [ATTACH]10508[/ATTACH] how can i make it like, That the werewolf head is bigger, and the human head wont show?
  15. [ATTACH=CONFIG]10358[/ATTACH] That is what im trying to make but how do i make that?
  16. nmanpure

    Item Dialogue

    Does anyone know how to go upon fixing this? All Dialogues for things like smithing or crafting only show these blue boxes, not the actual items. [ATTACH=CONFIG]10239[/ATTACH]
  17. Nick

    Dialogue Help

    No errors or anything. I just don't get why when you get to the Options Menu, and click a component it doesn't go it? Do I have the elses in a wrong spot, or is the ordering messed up? [CENTER][B][I][U]Starting at case 2 is where nothing happens when you click.[/U][/I][/B][/CENTER] [CODE]package com.rs.game.player.dialogues.impl; import com.rs.game.player.dialogues.Dialogue; public class LumbSage extends Dialogue { private int npcId; @Override public void start() { npcId = (Integer) parameters[0]; sendNPCDialogue(npcId, 9827, "Hello there, " + player.getDisplayName() + ". " + " I'm the Lumbridge Sage, I have a vast knowledge of Defile," + " if you need help, I can usually help you out. " + " Is there anything you need help with?"); } @Override public void run(int interfaceId, int componentId) { switch (stage) { case -1: stage = 0; sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "Yes, there is something.", "No, thank you."); break; case 0: if (componentId == OPTION_1) { stage = 1; sendPlayerDialogue(9827, "Yes, there is something."); } else { stage = 2; sendPlayerDialogue(9827, "No, thank you, I'm fine."); } break; case 1: sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "Getting Started.", "Training.", "Skilling.", "Money Making."); stage = 3; break; case 2: if (componentId == OPTION_1) { stage = 4; sendNPCDialogue(npcId, 9827, "Getting around in Defile is pretty simple, let me explain it." + " You can get around by going to the Magic Tab and choosing the Home Teleport and" + " pick the lodestone you want to be teleported to, or you may be a teleport tablet" + " located in any General Store or Magic Shops."); } else { if (componentId == OPTION_2) { stage = 5; sendNPCDialogue(npcId, 9827, "To train your skills, you can find many monsters and beings" + " to sharpen your combat skills. You may purchase better armor and weapons as you" + " progress with your levels and the gold you have earned in the many shops around in" + " Defile."); } else { if (componentId == OPTION_3) { stage = 6; sendNPCDialogue(npcId, 9827, "To level up your non-combat skills, you may find this easy." + " There are multiple ways to train them, while also honing combat experience. I.E:" + " Killing cows for profit while also looting their hide to craft into leather with" + " the correct materials, which you can find in any General Store or Crafting Sotre" + " located within Defile."); } } } } } @Override public void finish() { // TODO Auto-generated method stub } } [/CODE]
  18. [QUOTE]if (componentId == OPTION_1) { if (player.getInventory().containsItem(995, 1000000000)); stage = 16; sendPlayerDialogue(9845, "Armadyl"); } else { stage = 14; sendPlayerDialogue(9845, "Aww, I cant afford it..."); break; } }[/QUOTE] What is wrong with that dialogue? It does not work properly, when i choose the option the dialogue wont continue it just freezes. Also sometimes it skippes the first line if (player.getInventory().containsItem(995, 1000000000)); and just continues to "Aww, I cant afford it..." even though the player got 1b cash... What's the problem?
  19. Hello! I am pretty new to this runescape private server thing, I've just downloaded the starter pack and ran the server and connect to it, and saw that slayer master dialogue. I wanted to change it, but can't find its location in the code/data. Does anybody know where it is? Thanks for help
  20. Just adding basic dialogue for some world NPCs. Nothing wrong with the handler or code. This is the current dialogue for an NPC. [SPOILER=code][CODE]package com.rs.game.player.dialogues.impl; import com.rs.game.player.dialogues.Dialogue; public class BurthRef extends Dialogue { int npcId; @Override public void start() { npcId = (Integer) parameters[0]; sendNPCDialogue(npcId, 9827, "Hi there. Have you heard any news of rebuilding Burthorpe lately?"); } @Override public void run(int interfaceId, int componentId) { switch (stage) { case -1: stage = 0; sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "I think I heard a few others talking about it.", "No, I haven't sorry."); break; case 0: if (componentId == OPTION_2) { stage = 1; sendPlayerDialogue(9827, "No, I haven't sorry."); } else { stage = 2; sendPlayerDialogue(9827, "I think I heard a few others talking about it."); } break; case 1: stage = -2; sendNPCDialogue(npcId, 9827, "Well, please return if you change your mind!"); end(); break; case 2: stage = 3; sendNPCDialogue(npcId, 9827, "Really? I hope we rebuild the city, my family is worried sick, and we" + " need a home."); break; case 3: stage = 4; sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "I'd like to see the city rebuilt.", "I'm sorry, I can't provide help at the time."); break; case 4: if (componentId == OPTION_1) { sendNPCDialogue(npcId, 9827, "Me too, me too."); break; } case 5: if (componentId == OPTION_2) { sendNPCDialogue(npcId, 9827, "It's ok, hopefully you can soon."); end(); break; } } } @Override public void finish() { } }[/CODE][/SPOILER] What I'm basically asking is that where case 4 and 5 are, when I add "end();", the dialogue ends (duh.) Is there a way to show the NPCs message then click the button to end the chat?
  21. izJosh

    Need Dialogue Help

    I tried added some dialogue to some npcs in lumbridge to talk and i've tried many different ways to get them to talk it won't work 718 loading 751 pre-eoc I believe i have everything i need. (pics) [url]http://gyazo.com/76e417cb80b2b80c947eadf61f82f8c6[/url] (The dialogue i tried to add) [url]http://gyazo.com/10bdbd1bc8821897fa2487bef01a3c43[/url] (^^^) [url]http://gyazo.com/8b18144c6dc529481dcf4389e473b75a[/url] *example* Dialogue for Donie
  22. Gripper

    Dialogue help!

    Ok so I have my own dialogue for Christmas and I need it to not give out multiple gifts to one player so it doesn't get boring after a while. Heres my class: [CODE] /*Author: Gripper*/ public class SantaClaus extends Dialogue { private int npcId; public boolean Santa = false; public void start() { if (Santa == true) { npcId = (Integer) parameters[0]; sendEntityDialogue( SEND_2_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello, " + player.getDisplayName() + ", nice to see you again.", "I hope you are doing great, and having a great christmas.", "Happy holidays, and please contact me if you need to report", "a player. I will add them to the naughty list!"}, IS_NPC, npcId, 9400); end(); } else { if (Santa == false) { Santa = true; npcId = (Integer) parameters[0]; sendEntityDialogue(SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello great warrior! I'm Santa Claus, and I give out", "presents! Would you like a present?" }, IS_NPC, npcId, 9400); } } } /*public void start() { if (Santa == false) { npcId = (Integer) parameters[0]; sendEntityDialogue(SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello great warrior! I'm Santa Claus, and I give out", "presents! Would you like a present?" }, IS_NPC, npcId, 9400); } else if (Santa == true) { npcId = (Integer) parameters[0]; sendEntityDialogue(SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello, " + player.getDisplayName() + ", nice to see you again.", "I hope you are doing great, and having a great christmas.", "Happy holidays, and please contact me if you need to report", "a player. I will add them to the naughty list!"}, IS_NPC, npcId, 9400); stage = 7; end(); } }*/ public void run(int interfaceId, int componentId) { if (stage == -1) { sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] { player.getDisplayName(), "It's wonderful to meet you. Yes I would." }, IS_PLAYER, player.getIndex(), 9827); stage = 1; Santa = true; } else if (stage == 1) { sendOptionsDialogue("Select your present", "10,000,000gp", "200 Squeal Spins", "Pet cat", "Lobster set", "Goodbye..."); stage = 2; } else if (stage == 2) { if (componentId == OPTION_1) player.getInventory().addItem(995, 10000000); Santa = true; end(); if (componentId == OPTION_2) player.setSpins(200); player.refreshSqueal(); Santa = true; end(); if (componentId == OPTION_3) //Engine.spawnNPC(1561, player, -1, true); player.getInventory().addItem(1567, 1); Santa = true; end(); if (componentId == OPTION_4) player.getInventory().addItem(379, 20); Santa = true; end(); if (componentId == OPTION_5) { end(); } else if (stage == 6) { player.setNextAnimation(new Animation(862)); stage = 7; } else if (stage == 7) { //controler.updateProgress(); end(); } } } public void finish() { Santa = true; sendEntityDialogue(SEND_3_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Thank you for visiting me, "+ player.getDisplayName() +", and Good luck."}, IS_NPC, npcId, 9400); } } [/CODE] Just paste the fix below or change the thread and paste it below as well! Thank you!
  23. Well, it literally took me 5 minutes to type this all up and I thought it could be semi-useful for some for whatever reason (If they only want to add 1 lamp instead of different statements for all one skill-oriented lamps). Here you go :P [code]package com.rs.game.player.dialogues; import com.rs.game.player.Skills; public class LargeLamp extends Dialogue { int XP = 1550; int LAMP = 23715; @Override public void start() { sendOptionsDialogue("What skill would you like to gain experience in?", "Attack", "Strength", "Defence", "Ranged", "More..."); } @Override public void run(int interfaceId, int componentId) { switch(stage) { case -1: if(componentId == OPTION_1) { player.getSkills().addXp(Skills.ATTACK, XP); destroyLamp(); } else if(componentId == OPTION_2) { player.getSkills().addXp(Skills.STRENGTH, XP); destroyLamp(); } else if(componentId == OPTION_3) { player.getSkills().addXp(Skills.DEFENCE, XP); destroyLamp(); } else if(componentId == OPTION_4) { player.getSkills().addXp(Skills.RANGE, XP); destroyLamp(); } else { sendOptionsDialogue("What skill would you like to gain experience in?", "Prayer", "Magic", "Constitution", "Summoning", "More..."); stage = 1; } break; case 1: if(componentId == OPTION_1) { player.getSkills().addXp(Skills.PRAYER, XP); destroyLamp(); } else if(componentId == OPTION_2) { player.getSkills().addXp(Skills.MAGIC, XP); destroyLamp(); } else if(componentId == OPTION_3) { player.getSkills().addXp(Skills.HITPOINTS, XP); destroyLamp(); } else if(componentId == OPTION_4) { player.getSkills().addXp(Skills.SUMMONING, XP); destroyLamp(); } else { sendOptionsDialogue("What skill would you like to gain experience in?", "Agility", "Herblore", "Thieving", "Crafting", "More..."); stage = 2; } break; case 2: if(componentId == OPTION_1) { player.getSkills().addXp(Skills.AGILITY, XP); destroyLamp(); } else if(componentId == OPTION_2) { player.getSkills().addXp(Skills.HERBLORE, XP); destroyLamp(); } else if(componentId == OPTION_3) { player.getSkills().addXp(Skills.THIEVING, XP); destroyLamp(); } else if(componentId == OPTION_4) { player.getSkills().addXp(Skills.CRAFTING, XP); destroyLamp(); } else { sendOptionsDialogue("What skill would you like to gain experience in?", "Fletching", "Runecrafting", "Construction", "Slayer", "More..."); stage = 3; } break; case 3: if(componentId == OPTION_1) { player.getSkills().addXp(Skills.FLETCHING, XP); destroyLamp(); } else if(componentId == OPTION_2) { player.getSkills().addXp(Skills.RUNECRAFTING, XP); destroyLamp(); } else if(componentId == OPTION_3) { player.getSkills().addXp(Skills.CONSTRUCTION, XP); destroyLamp(); } else if(componentId == OPTION_4) { player.getSkills().addXp(Skills.SLAYER, XP); destroyLamp(); } else { sendOptionsDialogue("What skill would you like to gain experience in?", "Hunter", "Mining", "Smithing", "Fishing", "More..."); stage = 4; } break; case 4: if(componentId == OPTION_1) { player.getSkills().addXp(Skills.HUNTER, XP); destroyLamp(); } else if(componentId == OPTION_2) { player.getSkills().addXp(Skills.MINING, XP); destroyLamp(); } else if(componentId == OPTION_3) { player.getSkills().addXp(Skills.SMITHING, XP); destroyLamp(); } else if(componentId == OPTION_4) { player.getSkills().addXp(Skills.FISHING, XP); destroyLamp(); } else { sendOptionsDialogue("What skill would you like to gain experience in?", "Cooking", "Firemaking", "Woodcutting", "Farming", "Back..."); stage = 5; } break; case 5: if(componentId == OPTION_1) { player.getSkills().addXp(Skills.COOKING, XP); destroyLamp(); } else if(componentId == OPTION_2) { player.getSkills().addXp(Skills.FIREMAKING, XP); destroyLamp(); } else if(componentId == OPTION_3) { player.getSkills().addXp(Skills.WOODCUTTING, XP); destroyLamp(); } else if(componentId == OPTION_4) { player.getSkills().addXp(Skills.FARMING, XP); destroyLamp(); } else { sendOptionsDialogue("What skill would you like to gain experience in?", "Attack", "Strength", "Defence", "Ranged", "More..."); stage = -1; } } } public void destroyLamp() { player.getInventory().deleteItem(LAMP, 1); } @Override public void finish() { } } [/code] Don't forget: [code]handledDialogues.put("LargeLamp", (Class<Dialogue>) Class.forName(LargeLamp.class.getCanonicalName()));[/code] [code]if (itemId == 23715) { player.getDialogueManager().startDialogue("LargeLamp"); }[/code] Enjoy ^^ Thank you, ~Derek
  24. I added a ticket system where I transfer 2b for 1 ticket, and 1 ticket for 2b.. but if i have over 140m in my inventory at the time of exchanging ticket the 2b will disappear so I was wondering how to add dialogue to an item + keep the features it already does.. and if there is a way to fix the 2b disappearing, that'd be nice too.
  25. I know this is pretty simple, but a few people have asked me how to make an NPC have dialogue and speak to you on Dementhium 637/639. If you find any mistakes, just let me know I'll fix it. (it works fine for me so). Okay, first things first. Go to [B]org.dementhium.content[/B] and find [B]DialogueManager.java[/B] [B]Search for:[/B] [CODE] switch (id) {[/CODE] [B]Under that add:[/B] Note: The case number "[B]2244[/B]" for this part is the [B]NPC ID[/B]. You can change it to whatever you like. [CODE] case 2244: sendDialogue(player, HAPPY_TALKING, id, 18001, "Greetings, [MENTION=1415]Player[/MENTION][email protected], how can I help you on this fine day?"); return true;[/CODE] Then for the next part. [B]Search for:[/B] [CODE] switch (stage) {[/CODE] [B]Under that add:[/B] [CODE] case 18001: //Beginning of runelite system sendOptionDialogue(player, new int[]{18002, 18007}, "What is this place?", "Where can I train my character?"); return true; case 18002: sendDialogue(player, CONFUSED, -1, 18003, "What is this place?"); return true; case 18003: sendDialogue(player, HAPPY_TALKING, 2244, 18004, "What you see here is known as the lands of RuneLite.", "There are many things you can do around the world", "such as, bossing, skilling, minigames, and even", " a few quests! There are plenty of things"); return true; case 18004: sendDialogue(player, HAPPY_TALKING, 2244, 18005, "to keep our players occupied. Including you!", "You have yet..."); return true; case 18005: sendDialogue(player, CONFUSED, -1, 18006, "This sounds just amazing!"); return true; case 18006: sendDialogue(player, MEAN_FACE, 2244, -1, "Don't interrupt me!", "Although I have had enough to say to you.", "Enjoy your journey on RuneLite, [MENTION=1415]Player[/MENTION][email protected]!"); return true; case 18007: sendDialogue(player, CALM, -1, 18008, "Where can I train my character?"); return true; case 18008: sendDialogue(player, CALM, 2244, 18009, "You can train your account in a few area's around", " RuneLite. The best area to train combat skills is", " the Stronghold Security! You can find this by", "speaking to <col=ff0033>Mage</col> and simply teleport"); return true; case 18009: sendDialogue(player, CALM, 2244, -1, "to Stronghold Security. Once you enter Barbarian Village, climb into the", "the rock entrance and begin.", "Happy training!"); return true; //End of runelite system[/CODE] If you want to add in an online players list with an interface (again I know it's been released before) [B]Under:[/B] [CODE] case 18009: sendDialogue(player, CALM, 2244, -1, "to Stronghold Security. Once you enter Barbarian Village, climb into the", "the rock entrance and begin.", "Happy training!"); return true;[/CODE] [B]Add:[/B] [CODE] case 18010: sendDialogue(player, HAPPY_TALKING, -1, 18011, "I'd like to see the active players list, please."); return true; case 18011: sendDialogue(player, TALKING_ALOT, 2244, -1, "Sure thing, here you go."); { int number = 0; for(int i = 0; i < 316; i++) { ActionSender.sendString(player, "",275,i); } for(Player p5 : World.getWorld().getPlayers()) { if (p5 == null) continue; number++; String titles = ""; if (p5.getRights() == 2) { titles = "<img=1><col=B40404>"; //Admins } else if (p5.getRights() == 1) { titles = "<img=0><col=585858>"; //Mods } ActionSender.sendString(player, "RuneLite Active Players List", 275, 2); ActionSender.sendString(player, "<u>Players Online: "+World.getWorld().getPlayers().size()+"</u>", 275, 11); ActionSender.sendString(player, "Currently Active:<col=ff0000> "+World.getWorld().getPlayers().size()+"", 275, 16); ActionSender.sendString(player, "("+p5.getIndex()+")" + titles + ""+Misc.formatPlayerNameForDisplay(p5.getUsername())+"</col> - Combat: " + p5.getSkills().getCombatLevel(), 275, (17+number)); ActionSender.sendInterface(player, 275); } } return true;[/CODE] [B]And then find:[/B] [CODE] sendOptionDialogue(player, new int[]{18002, 18007},[/CODE] Inside those brackets [B]after[/B] [COLOR="#FF0000"]18007[/COLOR] add [COLOR="#FF0000"],18010[/COLOR] And the beginning of your case should look like [CODE] sendOptionDialogue(player, new int[]{18002, 18007, 18010},[/CODE] Good luck and enjoy.
×