Jump to content

Search the Community

Showing results for tags 'adding'.



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 387 results

  1. rizalgar

    Add Objects 830+

    As title says, can't seem to figure it out. I've checked ObjectHandler, Manager, UnpackedObjects and all that. I checked to see if there was a PackedObjects file, but was unable to locate one. If anyone could shoot me in the right direction here, that'd be great. Seems a lot easier to do this in Pre-EoC servers lol
  2. Hey im trying to add a korasi or anything else into my server what file do i put the models in ? and could some one elxplain wut all these things mean when you add in a item [CODE]case 15295: itemDef.actions = new String[5]; itemDef.actions[1] = "Wear"; itemDef.name = "(Already know what this is )"; //Name itemDef.description = " (i already know what this is)".getBytes(); //Description itemDef.originalModelColors = new int[1]; itemDef.modifiedModelColors = new int[1]; itemDef.originalModelColors[0] = 0; itemDef.modifiedModelColors[0] =; itemDef.modelID = ;//2529 itemDef.modelZoom = ; itemDef.modelRotation1 = ; itemDef.modelRotation2 = ; itemDef.modelOffset2 = ; itemDef.modelOffset1 = ; itemDef.maleEquip1 = ;//509 itemDef.femaleEquip1 = ;//509 break;[/CODE] Some one please help thanks :0
  3. Okay, first off go to your DialogueHandler.java, and add these dialogues: [CODE] case 310: sendNpcChat2("Thank you for helping me with the quest.", "I no longer need help!", c.talkingNpc, "Cook"); c.nextChat = 0; break; case 309: sendNpcChat( "'Maybe, but I won't be holding my breath.", c.talkingNpc, "Cook"); c.nextChat = 0; c.getPA().showInterface(12140); c.getItems().addItem(995, 2000000); c.Quest = 2; break; case 308: sendNpcChat2("Well, maybe one day I'll be important enough to sit on", "the Duke's table.", c.playerId, ""+c.playerName+""); c.nextChat = 309; break; case 307: sendNpcChat2("I'm afraid not, only the big cheeses get to dine with the", "Duke.", c.talkingNpc, "Cook"); c.nextChat = 308; break; case 306: sendNpcChat( "So do I get to go to the Duke's Party?", c.playerId, ""+c.playerName+""); c.nextChat = 307; break; case 305: sendNpcChat2("You've brought me everything I need! I am saved!", "thank you!", c.talkingNpc, "Cook"); c.nextChat = 306; break; case 304: sendNpcChat( "Yes, I have them here!", c.playerId, ""+c.playerName+""); c.nextChat = 305; break; case 303: sendNpcChat( "'How are you getting on with finding the ingredients?", c.talkingNpc, "Cook"); c.nextChat = 304; break; case 302: sendNpcChat2("I am a real cook! I haven't got time to be chatting", "about Culinary Fashion. I am in desperate need of help!", c.talkingNpc, "Cook"); c.nextChat = 279; break; case 301: sendNpcChat2("The whole hat, apron, stripey trousers ensemble - it", "works. It makes you look like a real cook.", c.playerId, ""+c.playerName+""); c.nextChat = 302; break; case 300: sendNpcChat( "'It's all standard cook's issue uniform...", c.talkingNpc, "Cook"); c.nextChat = 301; break; case 299: sendNpcChat( "Still, suits you. The trousers are pretty special to.", c.playerId, ""+c.playerName+""); c.nextChat = 300; break; case 298: sendNpcChat( "'Err thank you. It's pretty ordinary cooks hat really.", c.talkingNpc, "Cook"); c.nextChat = 299; break; case 297: sendNpcChat( "Nice hat!", c.playerId, ""+c.playerName+""); c.nextChat = 298; break; case 296: sendNpcChat2("No, I'm not. The world is caving in around me - I am", "overcome by dark feelings of implending doom.", c.talkingNpc, "Cook"); c.nextChat = 279; break; case 295: sendNpcChat( "You don't look very happy.", c.playerId, ""+c.playerName+""); c.nextChat = 296; break; case 294: sendNpcChat( "*sniff* Don't talk to me about cakes...", c.talkingNpc, "Cook"); c.nextChat = 279; break; case 293: sendNpcChat( "You're a cook, why don't you bake me a cake?", c.playerId, ""+c.playerName+""); c.nextChat = 294; break; case 292: sendNpcChat( "I've got all the information I need, Thanks.", c.playerId, ""+c.playerName+""); c.Quest = 1; c.nextChat = 0; break; case 291: sendNpcChat( "But any chicken should lay eggs.", c.talkingNpc, "Cook"); c.nextChat = 286; break; case 290: sendNpcChat2("I normally get my eggs from the Groats' farm, on the", "other side of the river.", c.talkingNpc, "Cook"); c.nextChat = 291; break; case 289: sendNpcChat2("Talk to Gillie Groats, she looks after the Dairy cows", "she'll tell you everything you need to know about milking cows.", c.talkingNpc, "Cook"); c.nextChat = 286; break; case 288: sendNpcChat2("There is a cattle field on the other side of the river,", "just across the road from the Groats' Farm.", c.talkingNpc, "Cook"); c.nextChat = 289; break; case 287: sendNpcChat( "I think there just might be some flour laying around here.", c.talkingNpc, "Cook"); c.nextChat = 286; break; case 285: sendNpcChat( "So where do I find these ingredients then?", c.playerId, ""+c.playerName+""); c.nextChat = 286; break; case 284: sendNpcChat2("Oh, thank you, thank you. I need milk, an egg and", "flour. I'd be very grateful if you can get them for me.", c.talkingNpc, "Cook"); c.nextChat = 285; break; case 283: sendNpcChat( "Yes, I'll help you.", c.playerId, ""+c.playerName+""); c.nextChat = 284; break; case 282: sendOption2("I'm always happy to help a cook in distress.", "I can't right now. Maybe later."); c.dialogueAction = 282; c.nextChat = 0; break; case 281: sendNpcChat4( "I've forgotten to buy the ingredients. I'll never get", "them in time now. He'll sack me! What will I do? I have", "four children and a goat to look after. Would you help", "me? please?", c.talkingNpc, "Cook"); c.nextChat = 282; break; case 280: sendNpcChat3( "Oh dear, oh dear, oh dear, I'm in a terrible terrible", "mess! It's the Duke's birthday today, and I should be", "making him a lovely big birthday cake.", c.talkingNpc, "Cook"); c.nextChat = 281; break; case 279: sendNpcChat( "What's wrong?", c.playerId, ""+c.playerName+""); c.nextChat = 280; break; case 278: sendNpcChat( "What am I to do?", c.talkingNpc, "Cook"); c.nextChat = 274; break; case 286: sendOption4("Where do I find some flour?","How about milk?", "And eggs? Where are they found?", "Actually, I know where to find this stuff."); c.dialogueAction = 286; c.teleAction = -1; break; case 274: sendOption4("What's wrong?","Can you make me a cake?", "You don't look very happy.", "Nice hat!"); c.dialogueAction = 274; c.teleAction = -1; break;[/CODE] (OPTIONAL) If you don't have NpcChat 1, 2 and 3, find [CODE] /* * Npc Chatting */[/CODE] Under that add: [CODE] private void sendNpcChat2(String s, String s1, int ChatNpc, String name) { c.getPA().sendFrame200(4888, 591); c.getPA().sendFrame126(name, 4889); c.getPA().sendFrame126(s, 4890); c.getPA().sendFrame126(s1, 4891); c.getPA().sendFrame75(ChatNpc, 4894); c.getPA().sendFrame164(4887); } private void sendNpcChat3(String s, String s1, String s2, int ChatNpc, String name) { c.getPA().sendFrame200(4894, 591); c.getPA().sendFrame126(name, 4895); c.getPA().sendFrame126(s, 4896); c.getPA().sendFrame126(s1, 4897); c.getPA().sendFrame126(s2, 4898); c.getPA().sendFrame75(ChatNpc, 4894); c.getPA().sendFrame164(4893); } private void sendNpcChat(String s, int ChatNpc, String name) { c.getPA().sendFrame200(4883, 591); c.getPA().sendFrame126(name, 4884); c.getPA().sendFrame126(s, 4885); c.getPA().sendFrame75(ChatNpc, 4883); c.getPA().sendFrame164(4882); }[/CODE] Now go to ActionHandler.java, and under "public void firstClickNpc(int i) {" add [CODE] case 278: if (c.Quest == 0) { c.getDH().sendDialogues(278, i); } if (c.getItems().playerHasItem(1933, 1)) { if (c.getItems().playerHasItem(1927, 1)) { if (c.getItems().playerHasItem(1944, 1)) { c.getDH().sendDialogues(303, i); } } } if (c.Quest == 2) { c.getDH().sendDialogues(310, i); } break;[/CODE] Now go to Client.java, and under public int lowMemoryVersion = 0; , add [CODE]public int Quest = 0;[/CODE] Now to to ClickingButtons.java, and under case 9178, and under that add [CODE]npcType = 278; //cook if(c.dialogueAction == 286) { c.getDH().sendDialogues(287, npcType); } npcType = 278; //cook if(c.dialogueAction == 274) { c.getDH().sendDialogues(279, npcType); } [/CODE] Now find case 9179, and under that add [CODE]npcType = 278; //cook if(c.dialogueAction == 274) { c.getDH().sendDialogues(293, npcType); } npcType = 278; //cook if(c.dialogueAction == 286) { c.getDH().sendDialogues(288, npcType); }[/CODE] Now find case 9180, and under that add [CODE]npcType = 278; //cook if(c.dialogueAction == 274) { c.getDH().sendDialogues(295, npcType); } npcType = 278; //cook if(c.dialogueAction == 286) { c.getDH().sendDialogues(290, npcType); }[/CODE] Now find case 9181, and under that add [CODE]npcType = 278; //cook if(c.dialogueAction == 274) { c.getDH().sendDialogues(297, npcType); } npcType = 278; //cook if(c.dialogueAction == 286) { c.getDH().sendDialogues(292, npcType); }[/CODE] Now find case 9157, and under that add [CODE]npcType = 278; //cook if(c.dialogueAction == 282) { c.getDH().sendDialogues(283, npcType); }[/CODE] Now find c.dialogueAction = 0; and under that you should find [CODE] c.getPA().removeAllWindows();[/CODE] Delete that because it will close your dialogue interface once you click continue. Now go to PlayerSave.java, and under p.heightLevel = Integer.parseInt(token2); add [CODE] } else if (token.equals("character-Quest")) { p.Quest = Integer.parseInt(token2);[/CODE] Now find .toString(p.heightLevel).length()); and under that add [CODE] characterfile.newLine(); characterfile.write("character-Quest= ", 0, 16); characterfile.write(Integer.toString(p.Quest), 0, Integer .toString(p.Quest).length());[/CODE] Now for the last, go to spawn-config.cfg and add this somewhere: [CODE]spawn = 278 3208 3215 0 1 0 0 0 0 Cook[/CODE] You are now completed! Post if you get any errors.
  4. Hi, i followed this guide to add new items into my rsps. [video=youtube;ruE-r1_KZCU]https://www.youtube.com/watch?v=ruE-r1_KZCU[/video] I followed it and my client crashes every time. Anyone knows how to fix this? Thanks for answers. I get this error: [QUOTE] javax.imageio.IIOException: Can't get input stream from URL! at javax.imageio.ImageIO.read(Unknown Source) at Loader.openFrame(Loader.java:127) at Loader.doFrame(Loader.java:63) at Loader.main(Loader.java:47) Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: [url]http://puu.sh/81m7o.png[/url] at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream (Unknown[/url] So urce) at java.net.URL.openStream(Unknown Source) ... 4 more Error: jn.a() fb.d() lk.a() client.er() | Class225.method2094:57 Class125.method 1401:279 Class275.method2573:59 client.method2806:3711 client.method2773:641 Cla ss291.method2764:641 Class291.method2759:457 Class291.run:384 java.lang.Thread.r un | java.lang.RuntimeException | null 0,0,0,0 0,0,0, 2 0 2 765,503 1 2 1 1 0 0 248 12 -1 hAJWGrsaETglRjuwxMwnlA/d5W6EgYWx java.io.FileNotFoundException: [url]http://127.0.0.1/clienterror.ws?c=718&cs=1&u=0&v1[/url] =Oracle+Corporation&v2=1.7.0_51&e=jn.a%28%29+fb.d%28%29+lk.a%28%29+client.er%28% 29+%7C+Class225.method2094%3A57+Class125.method140 1%3A279+Class275.method2573%3A 59+client.method2806%3A3711+client.method2773%3A64 1+Class291.method2764%3A641+Cl ass291.method2759%3A457+Class291.run%3A384+java.la ng.Thread.run+%7C+java.lang.Ru ntimeException+%7C+null++0%2C0%2C0%2C0+0%2C0%2C0%2 C+2+0+2+765%2C503+1+2+1+1+0+0+ 248+12+-1+hAJWGrsaETglRjuwxMwnlA%2Fd5W6EgYWx at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream (Unknown[/url] So urce) at java.net.URL.openStream(Unknown Source) at IPAddress.method6062(IPAddress.java:171) at client.method2773(client.java:645) at Class291.method2764(Class291.java:641) at Class291.method2759(Class291.java:457) at Class291.run(Class291.java:384) at java.lang.Thread.run(Unknown Source) Error: nk.a() wr.fe() pk.fk() pj.fw() client.ae() mc.m() mc.e() | Class322.metho d3931:46 Class365_Sub1_Sub5_Sub2.method4533:488 Class371.method4584:201 Class370 .method4578:92 client.method2773:650 Class291.method2764:641 Class291.method2759 :457 Class291.run:384 java.lang.Thread.run | java.lang.NullPointerException | 0 ,0,0,0 0,0,0, 2 0 2 765,503 1 2 1 1 0 0 248 12 -1 hAJWGrsaETglRjuwxMwnlA/d5W6EgY Wx java.io.FileNotFoundException: [url]http://127.0.0.1/clienterror.ws?c=718&cs=1&u=0&v1[/url] =Oracle+Corporation&v2=1.7.0_51&e=nk.a%28%29+wr.fe%28%29+pk.fk%28%29+pj.fw%28%29 +client.ae%28%29+mc.m%28%29+mc.e%28%29+%7C+Class32 2.method3931%3A46+Class365_Sub 1_Sub5_Sub2.method4533%3A488+Class371.method4584%3 A201+Class370.method4578%3A92+ client.method2773%3A650+Class291.method2764%3A641+ Class291.method2759%3A457+Clas s291.run%3A384+java.lang.Thread.run+%7C+java.lang. NullPointerException+%7C++0%2C 0%2C0%2C0+0%2C0%2C0%2C+2+0+2+765%2C503+1+2+1+1+0+0 +248+12+-1+hAJWGrsaETglRjuwxMw nlA%2Fd5W6EgYWx at sun.net.[url]www.protocol.http.HttpURLConnection.getInputStream (Unknown[/url] So urce) at java.net.URL.openStream(Unknown Source) at IPAddress.method6062(IPAddress.java:171) at Class291.run(Class291.java:388) at java.lang.Thread.run(Unknown Source) error_game_crash [/QUOTE]
  5. Hey guys im having a little trouble adding npc's and custom items. ill explain a little here but if ur willing to help add me on skype: "live:huseyinn.7_1" (copy the whole thing including the ":") So basically for Custom items the models never turn out right, the float or just look like something completely random, as for NPC's i cant even find were they are, there not in npc.cfg or anything in the source. Add me on skype if ur willing to help. Also on another subject, i may need a coder willing to accept a high rank and some donation items as a paymet (if the server gets some players and we start getting donation im willing to pay) Skype: "live:huseyinn.7_1" or post ur preferred way of communication bellow :)
  6. Hello, I've tried to add some items to my server (chaotics and such) and I've done everything correctly as the tutorial said. But when i try to load my client it gives this error : [attachment=39:error101.jpg] Any help would be appreciated!
  7. Hi guys i have added game modes for my server such as iron man and was wondering if some can help as I can't figure out a way to disable trading and drop trading, also preventing them from participating in pvp. Help would be much appreciated :P
  8. hi guys can anybody help me with adding multiple group ranks on ipb forums ? i added but it only shows 1 , can someone post like a steps to add multiple group rank ?? like all of them visible on the players profile ?
  9. Hi, I need some help with the project I'm working on called [URL="http://www.runelocus.com/forums/showthread.php?105102-BattleSoul-317"]BattleSoul[/URL]. I have repacked the models and map packages, but cannot seem to get it working. I keep on getting black floors and client crashes upon login. I just need someone to add me on Skype and help me with adding the data through Teamviewer or Join me. I can give it a shot with getting a bit of cash to send your way for helping me, like $10 or so, but I ain't making promises. If someone can do it for free, that would be appreciated. I have all the data and readvalues. Skype: g0dzdevine
  10. Hey guys i really need help, i want to add regional music system to my insidiax but i just cant find a guide for Music system, i found many guides but they were only for sound effects. i Only want music to play. I did find a guide (cant remember where) which let me to play music on my client from the cache soon as i logged in to my server, but it had a problem i couldn't turn the music off. And it can only play .WAV files which are really large for my cache. So in the guide i had to create a new folder in my Cache called Music and place my .WAV music files in the folder. Then in my client i had to create Music.java with the code: [CODE]import java.io.*; import javax.sound.sampled.*; import sign.*; import java.util.*; public class Music { private static Clip clip; //use to choose a random song public static void playRandom() { Random random = new Random(); int play = random.nextInt(4); Music("jingle"+play); } //gets file by name and opens audio system public static void Music(String soundFileName) { String dir = signlink.findcachedir(); try { AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(dir+"/Music/"+soundFileName).getAbsoluteFile()); clip = AudioSystem.getClip(); clip.open(audioInputStream); play(); } catch (UnsupportedAudioFileException | IOException | LineUnavailableException e) { } } //starts playing the actual music public static void play() { if (clip.isRunning()) { clip.stop(); } clip.setFramePosition(0); clip.start(); } //stops the music if needed public static void stop() { clip.stop(); clip.setFramePosition(0); clip.close(); } }[/CODE] and then in my client.java under [CODE]loggedIn = true;[/CODE] i had to add [CODE]Music.Music("sound5.wav");[/CODE] which plays music : sound5.wav . i want it to play Midi which are smaller files but it only plays .wav and i cant turn the music off. So if someone can give me a better method to play music or atleast tell me how to make it so it plays .midi files it would be appreciated. i did try changing Music.Music("sound5.wav"); to Music.Music("sound5.midi"); but it didnt play the music. it only played it when it was .wav. If someone can help me it would be appreciated, Thanks.
  11. Hello i need help unpacking/packing my cache, also need help with adding item models & boss models, i will pay with osrs cash if you actually help me learn :)
  12. in title ^ also it doesnt add the friend any suggestions?
  13. hey guys, just wondering if someone could help me, im stuck on adding custom items to my PI server iv read alot of TUTs but i cant seem to get it right, is there any way i can replace null items with custom items in my server. steps iv used,,, add the models to raw file in cashe, add int files to itemdef.java log on to server and type " add models " everytime i try replace a item it spawns the null item what was there already. if someone could link a TUT (video or text) with a model and int so i can get it right that would be amazing thank you for reading.
  14. mushroomtip

    Adding Crowns

    Hello, I've been attempting to add my own owner crown into the game but for what ever reason its not working... I'm using a sprite editor and I've got the right image size and stuff. But when i try to pack to cache i get a weird message in the CMD. Can anyone point me in the right direction to fix this? [CODE]Running Sprite Editor java.io.FileNotFoundException at net.openrs.cache.FileStore.read(FileStore.java:248) at net.openrs.cache.Cache.write(Cache.java:169) at steve.SpriteEditorFrame.jButton1ActionPerformed(SpriteEditorFrame.java:561) at steve.SpriteEditorFrame$10.actionPerformed(SpriteEditorFrame.java:271) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3322) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:702) at java.awt.EventQueue$3.run(EventQueue.java:696) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:724) at java.awt.EventQueue$4.run(EventQueue.java:722) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:721) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [/CODE]
  15. sbain9395

    Adding models

    hey im not sure how to add models.. im working with tyreatta 317 pi so if u can help please add me on skype -- skype name: worthyman3
  16. Hi, i want to know if theres any type of tutorial to add crowns that works. I already try so many of them. Im using deathlypvpz but crown system is kinda fucked up and i want to know if anyone could help me, that would be really awesome :) Thanks
  17. Hey I'm totally new to Rsps, and I was told starting with a 317 source is best. So I downloaded a 317 source and it has 614 items in it (it was originally a pvp server) and now since I have it I've had to keep going into the character files and editing the items from there. How do I add the ::pickup command to the server? There is no commands at all in the game right now, and to simplify getting items for myself I want know how to add the ::pickup command to my server.. can anyone help me? Thanks in advance.
  18. Hello everyone, First off I'd like to say Merry Christmas to everyone of RuneLocus. I will be releasing one of the features I added to some of my servers' over the years. I figured there wasn't a better time to release this than today on Christmas so enjoy and please comment if you intend to use. While I am basically giving you this code and expecting you to add it like a snippet I will be breaking it down so that you can understand it and use to it build onto for more locations, etc. So let us begin.. Base: PI Difficulty: 1/10 Classes Edited: PlayerAssistant.java, NPCHandler.java, ActionHandler.java [B]NOTE: This will require newer NPCs as the Penguins were not released until a higher revision. Also, if you don't have some of the the methods uses please post and I will put them up for use.[/B] [B][U][SIZE=3]Step One:[/SIZE][/U][/B] Open up PlayerAssistant.java. [code] public int[][] penguinRewards = { //Item ID, Amount {995,5000}, // COINS (5K) {995,10000}, // COINS (10K) {1514,15}, // Magic Logs 15 {1514,25}, // Magic Logs 25 {1632,2}, // D STONE (2) {565,50}, // BLOODS (250) {560,50}, // DEATHS (250) {561,50}, // NATURES (250) {1516,200}, // Yew Logs 200 {1516,300}, // Yew Logs 300 {392,25}, // Manta {892,50}, // Rune Arrow {386,60}, // Shark {5295,3}, // Ranaar Seed {1514,30}, // Magic Log {2364,15} // Rune bar }; public int[][] penguinLocations = { //X Coord, Y Coord HEIGHT {3224,3211,0}, // Lumbridge Spawn {3261,3432,0}, // Varrock Spawn {2947,3391,0}, // Falador Spawn {2707,3477,0}, // Camelot Spawn {2678,3318,0}, // Ardy Spawn {2596,3077,0}, // Yanille Spawn {3551,3280,0} // Barrows Spawn }; public String[][] penguinLocationsName = { //Using the following sentence: You can find him "insertthistexthere". {"wandering Lumbridge."}, // Lumbridge Spawn {"wandering Varrock."}, // Varrock Spawn {"wandering Falador."}, // Falador Spawn {"wandering Camelot."}, // Camelot Spawn {"wandering Ardougne."}, // Ardy Spawn {"wandering Yanille."}, // Yanille Spawn {"wandering Barrows' hills."} // Barrows Spawn }; private int[] penguinSpawn = {8104,8105,8107,8108,8109}; private int penguinSpawn() { return penguinSpawn[(int) (Math.random() * penguinSpawn.length)]; } public void handlePenguins() { int penguinSpawn = (int) (Math.random() * (penguinLocations.length - 1)); int Penguin = penguinSpawn(); for (int j = 0; j < Server.playerHandler.players.length; j++) { if (Server.playerHandler.players[j] != null) { Client c2 = (Client)Server.playerHandler.players[j]; Server.npcHandler.spawnNpc2(Penguin, penguinLocations[penguinSpawn][0], penguinLocations[penguinSpawn][1], penguinLocations[penguinSpawn][2], 1, 1, 1, 1, 1); c2.sendMessage("@[email protected]: A penguin has been spawned."); c2.sendMessage("@[email protected] can be found "+penguinLocationsName[penguinSpawn][0]+""); } } } public void givePengItem() { int addItem = (int) (Math.random() * (penguinRewards.length - 1)); int ITEM = penguinRewards[addItem][0]; int AMOUNT = penguinRewards[addItem][1]; c.getItems().addItem(ITEM, AMOUNT); c.sendMessage("You've obtained: "+c.getItems().getItemName(ITEM)+"."); } [/code] Search for: [code] public void startTeleport(int x, int y, int height, String teleportType) { [/code] Underneath: [code] removeAllWindows();[/code] Add: [code] if (Misc.random(7000) >= 6990) { handlePenguins(); } [/code] [SPOILER=Code Breakdown] Breaking down the above code: [code] public int[][] penguinRewards = { //Item ID, Amount {995,5000}, // COINS (5K) {995,10000}, // COINS (10K) {1514,15}, // Magic Logs 15 {1514,25}, // Magic Logs 25 {1632,2}, // D STONE (2) {565,50}, // BLOODS (250) {560,50}, // DEATHS (250) {561,50}, // NATURES (250) {1516,200}, // Yew Logs 200 {1516,300}, // Yew Logs 300 {392,25}, // Manta {892,50}, // Rune Arrow {386,60}, // Shark {5295,3}, // Ranaar Seed {1514,30}, // Magic Log {2364,15} // Rune bar };[/code] This code is of course used for the different types of rewards you could obtain upon the finding of the Penguins. Pretty self-explanitory, the server grabs a random one of these and gives you the item and the amount, this can be added on to very easily by simply adding another: {4151,1}, // Whip. [code]public int[][] penguinLocations = { //X Coord, Y Coord HEIGHT {3224,3211,0}, // Lumbridge Spawn {3261,3432,0}, // Varrock Spawn {2947,3391,0}, // Falador Spawn {2707,3477,0}, // Camelot Spawn {2678,3318,0}, // Ardy Spawn {2596,3077,0}, // Yanille Spawn {3551,3280,0} // Barrows Spawn };[/code] An important chunk of the tutorial, this code contains the X Coord, Y Coord, and Height of where the NPC will spawn when it is spawned. You can add onto this by adding a comma {3551,3280,0} <-----HERE // Barrows Spawn and then adding a new {XXXX,YYYY,HEIGHTLEVEL} // WHEREISTHIS. [B]NOTE: IT IS IMPORTANT NOT TO MESS UP THE ORDER OF THE CODE OR THE COORDINATES AND THE LOCATION NAME WILL BE MESSED UP. ADD ONTO IT NOT INTO THE MIDDLE/TOP OF IT.[/B] [code] public String[][] penguinLocationsName = { //Using the following sentence: You can find him "insertthistexthere". {"wandering Lumbridge."}, // Lumbridge Spawn {"wandering Varrock."}, // Varrock Spawn {"wandering Falador."}, // Falador Spawn {"wandering Camelot."}, // Camelot Spawn {"wandering Ardougne."}, // Ardy Spawn {"wandering Yanille."} // Yanille Spawn {"wandering Barrows' hills."} // Barrows Spawn[/code] The other important chunk of code which contains a small string indicating where the penguin is for the player to find him. Much like above you can add onto it using the very same pricinpal. [B]NOTE: IT IS IMPORTANT NOT TO MESS UP THE ORDER OF THE CODE OR THE COORDINATES AND THE LOCATION NAME WILL BE MESSED UP. ADD ONTO IT NOT INTO THE MIDDLE/TOP OF IT.[/B] [code]private int[] penguinSpawn = {8104,8105,8107,8108,8109}; private int penguinSpawn() { return penguinSpawn[(int) (Math.random() * penguinSpawn.length)]; }[/code] Simply put, this code takes all the different penguins that are hidden in objects, and picks one randomly. [code] public void handlePenguins() { int penguinSpawn = (int) (Math.random() * (penguinLocations.length - 1)); int Penguin = penguinSpawn(); for (int j = 0; j < Server.playerHandler.players.length; j++) { if (Server.playerHandler.players[j] != null) { Client c2 = (Client)Server.playerHandler.players[j]; Server.npcHandler.spawnNpc2(Penguin, penguinLocations[penguinSpawn][0], penguinLocations[penguinSpawn][1], penguinLocations[penguinSpawn][2], 1, 1, 1, 1, 1); c2.sendMessage("@[email protected]: A penguin has been spawned."); c2.sendMessage("@[email protected] can be found "+penguinLocationsName[penguinSpawn][0]+""); } } }[/code] This is the core of the code which generates the random penguin ID, and his location. Once selected it will spawn the NPC globally and globally annouce to all online players the whereabouts of the penguin. [code] public void givePengItem() { int addItem = (int) (Math.random() * (penguinRewards.length - 1)); int ITEM = penguinRewards[addItem][0]; int AMOUNT = penguinRewards[addItem][1]; c.getItems().addItem(ITEM, AMOUNT); c.sendMessage("You've obtained: "+c.getItems().getItemName(ITEM)+"."); }[/code] Finally we have the code which randomly picks and item from the penguin table and gives you the item and the amount shown. Pretty simple stuff. [/SPOILER] Save and Close PlayerAssitant.java [B][U][SIZE=3]Step Two: [/SIZE][/U][/B] Open up NPCHandler.java. [code]public void DeleteNPC(int npc, int emote, String message) { for (int i = 0; i < maxNPCs; i++) { if (npcs[i] != null) { if (npcs[i].npcType == npc) { startAnimation(emote, i); npcs[i].animUpdateRequired = true; npcs[i].updateRequired = true; npcs[i].forceChat(""+message+""); npcs[i].isDead = true; } } } }[/code] Copy the above code into an appropriate section. Find: [code]public int getRespawnTime(int i) {[/code] Place: [code] case 8104: case 8105: case 8107: case 8108: case 8109: return -1; [/code] [SPOILER=Code Breakdown] [code]public void DeleteNPC(int npc, int emote, String message) { for (int i = 0; i < maxNPCs; i++) { if (npcs[i] != null) { if (npcs[i].npcType == npc) { startAnimation(emote, i); npcs[i].gfx100(gfx); npcs[i].animUpdateRequired = true; npcs[i].updateRequired = true; npcs[i].forceChat(""+message+""); npcs[i].isDead = true; } } } }[/code] This code, when called upon will do a few things, it will make the NPC selected do an emote, say a string (message), and die. This helps as we need to kill the Penguin once other players have found him successfully. [code] case 8104: case 8105: case 8107: case 8108: case 8109: return -1; [/code] This is to make sure that the penguins do not respawn after the players have found them, the only way the SHOULD respawn is when the event is called again. [/SPOILER] Save and Close NPCHandler.java. [B][U][SIZE=3]Step Three:[/SIZE][/U][/B] Open ActionHandler.java. Find your First Click NPC Packet, inside place this: [code] case 8104: case 8105: case 8107: case 8108: case 8109: Server.npcHandler.DeleteNPC(npcType, -1, -1, "Oh dear "+c.playerName+"! You've found me!"); c.getPA().givePengItem(); break;[/code] [SPOILER=Code Breakdown] [code] case 8104: case 8105: case 8107: case 8108: case 8109: Server.npcHandler.DeleteNPC(npcType, -1, -1, "Oh dear "+c.playerName+"! You've found me!"); c.getPA().givePengItem(); break;[/code] This is calling that new code we put in earlier in Step Two, when found the NPC is killed and deleted from the game, the reward is also given. [/SPOILER] Save and Close ActionHandler.java [img]http://puu.sh/7UZYg.jpg[/img] That should be everything, well I hope anyway, a lot of text just typed up and I hope I didn't miss anything. :)
  19. so my server has no skills in it, i want to rip skills from another server and edit them to my liking, but i need a good base to do this from can anyone recommend a base that has the skills compeleted that i can look at to get a grasp on how its done? [B]OR AT LEAST SHOW ME THE OUTLINE ON HOW TO ADD SKILLS?[/B] Thanks
  20. so for dev purposes, i wanted to know how do you make it to where when i click on something in game it gives me the id of that item in the chat box so i do what i wish with the item id, so that when my players click on that item whatever action i wish to happen will happen... using asteria 2.0 if that matters (also i want this only to happen for admins+) thanks ahead of time lacero
  21. I tried every method and cant seem to get the cache downloading to show ...Can someone please help?? I tried with 3 different developers and none can seem to find a answer... These are the lines I used; [img]http://i.imgur.com/M0HIIJR.png[/img] EDIT: It does show this after cache downloads, also the cache downloads in the cmd [img]http://i.imgur.com/0VOOtJI.png[/img]
  22. VictorRwh

    Adding models

    Hello, I'm making a server and I've added some models from another source. I also added the item names to items.cfg and the model codes to class8.java But still the items I've added wont shop up as the models. What am I doing wrong? :S Victor
  23. Hey guys i seriously need help with this one basically i followed this guide here [URL="https://www.moparscape.org/smf/index.php/topic,444519.0.html#post_pi"]https://www.moparscape.org/smf/index.php/topic,444519.0.html#post_pi[/URL] to prevent cheat clients. Everything works great except my client adds the number "09" in front of the username so if my username was bob i would login and my name would be 09Bob. I have no idea whats causing this. [IMG]https://dl.dropboxusercontent.com/u/69012047/forum/b6e118d999b8faf442ee8483e2faa6f9.gif[/IMG] As you can see in the gif my name is 09saad when i log out and log back its saad but only for a second while my client is loading the game then it become 09saad :confused: If some can help me it would be Appreciated, Some of my Login method in client.java [CODE]private void login(String s, String s1, boolean flag) { signlink.errorname = s; try { if(!flag) { loginMessage1 = ""; loginMessage2 = "Connecting to Server..."; drawLoginScreen(true); } socketStream = new RSSocket(this, openSocket(43594)); long l = TextClass.longForName(s); int i = (int)(l >> 16 & 31L); stream.currentOffset = 0; stream.writeWordBigEndian(14); stream.writeWordBigEndian(i); socketStream.queueBytes(2, stream.buffer); for(int j = 0; j < 8; j++) socketStream.read(); int k = socketStream.read(); int i1 = k; if(k == 0) { socketStream.flushInputStream(inStream.buffer, 8); inStream.currentOffset = 0; aLong1215 = inStream.readQWord(); int ai[] = new int[4]; ai[0] = (int)(Math.random() * 99999999D); ai[1] = (int)(Math.random() * 99999999D); ai[2] = (int)(aLong1215 >> 32); ai[3] = (int)aLong1215; stream.currentOffset = 0; stream.writeWordBigEndian(10); stream.writeDWord(ai[0]); stream.writeDWord(ai[1]); stream.writeDWord(ai[2]); stream.writeDWord(ai[3]); stream.writeDWord(signlink.uid); stream.writeDWord(12345); //12345 stream.writeString(s); stream.writeString(s1); stream.doKeys(); aStream_847.currentOffset = 0;[/CODE] Thanks. *i know i have a lot of help threads please forgive me
  24. now i have done what the tutorial says up to my knowledge but i cant figure out exactly what mysql is and i cant find out based on my research, can somebody dumb it down a little bit for me? [URL=http://www.runelocus.com/forums/usertag.php?do=list&action=hash&hash=noob]#noob[/URL] thanks
  25. [SIZE="4"][FONT="Verdana"]I've been on plenty of other servers where you could type ::god and fly around..I want to add it! I'm using delta...any help?[/FONT][/SIZE]
×