Jump to content

Search the Community

Showing results for tags 'splitting'.



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

  1. What you are adding: [video=youtube;S_47ndj4pB4]http://www.youtube.com/watch?v=S_47ndj4pB4[/video] Difficult: 1/10 - 2/10 Knowledge: Copy+Paste and add a class Base: PI before we start i will point out this is all server-sided lets go, first add Ornamenting.java to src-server-model-items [URL="http://dl.dropbox.com/u/35016454/Ornamenting.zip"]Download here[/URL] or copy this code and paste [CODE]package server.model.items; import server.model.players.Client; /** * * @author antiworth * */ public class Ornamenting { private static Client c; public Ornamenting(Client c) { this.c = c; } public static void ornamenting(int itemUsed, int useWith) { int[][] ornamenting = { {19346, 11335, 19336}, {19350, 14479, 19337}, {19348, 4087, 19338}, {19348, 4585, 19339}, {19352, 1187, 19340}, {19354, 11335, 19341}, {19358, 14479, 19342}, {19356, 4087, 19343}, {19356, 4585, 19344}, {19360, 1187, 19345}, {19333, 6585, 19335} }; for (int i = 0; i < ornamenting.length; i++) { if (itemUsed == ((int) ornamenting[i][0]) && useWith == ((int) ornamenting[i][1]) || itemUsed == ((int) ornamenting[i][1]) && useWith == ((int) ornamenting[i][0])) { c.getItems().deleteItem(itemUsed, 1); c.getItems().deleteItem(useWith, 1); c.sendMessage("You attach the "+ c.getItems().getItemName(((int) ornamenting[i][0]))+" To the"+ c.getItems().getItemName(((int) ornamenting[i][1]))+"."); c.sendMessage("You recieve a "+c.getItems().getItemName(((int) ornamenting[i][2]))+"."); c.getItems().addItem(((int) ornamenting[i][2]),1); } } } public static void splitting(int itemId) { int[][] splitting = { {19346, 11335, 19336}, {19350, 14479, 19337}, {19348, 4087, 19338}, {19348, 4585, 19339}, {19352, 1187, 19340}, {19354, 11335, 19341}, {19358, 14479, 19342}, {19356, 4087, 19343}, {19356, 4585, 19344}, {19360, 1187, 19345}, {19333, 6585, 19335} }; for (int i = 0; i < splitting.length; i++) { if(itemId == ((int) splitting[i][2])) { if (c.getItems().freeSlots() >= 1) { c.getItems().deleteItem(itemId, 1); c.sendMessage("You split the "+ c.getItems().getItemName(((int) splitting[i][0]))+" from the "+ c.getItems().getItemName(((int) splitting[i][2]))+"."); c.sendMessage("You recieve a "+c.getItems().getItemName(((int) splitting[i][1]))+" and a "+ c.getItems().getItemName(((int) splitting[i][0]))+"."); c.getItems().addItem(((int) splitting[i][0]), 1); c.getItems().addItem(((int) splitting[i][1]), 1); } else { c.sendMessage("You Need At Least 1 Free Inventory Space Before Doing This."); } } } } } [/CODE] save and close Ornamenting.java now open up client.java and add this import with all the others: [CODE]import server.model.items.Ornamenting;[/CODE] now add this [CODE]private Ornamenting Ornamenting = new Ornamenting(this);[/CODE] under [CODE]public class Client extends Player {[/CODE] now find [CODE] public Food getFood() { return food; }[/CODE] under that add[CODE] public Ornamenting getOrnaments() { return Ornamenting; }[/CODE] save and close client.java open up useItem.java under [CODE]public static void ItemonItem(Client c, int itemUsed, int useWith) {[/CODE] add [CODE]c.getOrnaments().ornamenting(itemUsed, useWith);[/CODE] save and close useItem.java now open itemClick2.java under [CODE] public void processPacket(Client c, int packetType, int packetSize) { int itemId = c.getInStream().readSignedWordA(); if (!c.getItems().playerHasItem(itemId,1)) return;[/CODE] add [CODE]c.getOrnaments().splitting(itemId);[/CODE] finished save+compile, run server and try it out please comment or atleast say thanks credits: 10% sanity, erasedpkz for source to code on 90% me for coding the whole class and the other stuff this was all written by me, i will only post this on runelocus. if u see this on other forums its not me feel free to post any errors itemId list: [QUOTE]19335 Amulet of fury (or) 19336 Dragon full helm (or) 19337 Dragon platebody (or) 19338 Dragon platelegs (or) 19339 Dragon plateskirt (or) 19340 Dragon square shield (or) 19341 Dragon full helm (sp) 19342 Dragon platebody (sp) 19343 Dragon platelegs (sp) 19344 Dragon plateskirt (sp) 19345 Dragon sq shield (sp)[/QUOTE]
  2. I'm looking for a coder / co owner for a server i'm trying to start up. I will be splitting donations with the coder/co owner. Must have skype. add my skype "zacheriahhh"
×