Thread: stupid items question...help plz!

Results 1 to 6 of 6
  1. #1 stupid items question...help plz! 
    Donator

    H1N1's Avatar
    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    25
    Thanks received
    59
    Discord
    View profile
    Rep Power
    138
    now i know to some of u this is going to be the most stupid question you probbly ever seen but i have just started developing a server and its the first time ive coded since 2009 so i kinda need a memory referrer.

    ok so how can i make it so that if i use "item a" on "item b" to make it = "itemc"?
    ex: orb of armadyl + battlestaff = armadyls battlestaff.

    will rep++ helpful answer!
    Reply With Quote  
     

  2. #2  
    Enter The Dragon
    Roshi's Avatar
    Join Date
    Nov 2012
    Age
    24
    Posts
    263
    Thanks given
    4
    Thanks received
    19
    Rep Power
    4
    int itema = orb of armadyl;

    int itemb = battlestaff;

    int itemc = itema + itemb;
    Reply With Quote  
     

  3. #3  
    Donator

    H1N1's Avatar
    Join Date
    Oct 2009
    Posts
    794
    Thanks given
    25
    Thanks received
    59
    Discord
    View profile
    Rep Power
    138
    Quote Originally Posted by Roshi View Post
    int itema = orb of armadyl;

    int itemb = battlestaff;

    int itemc = itema + itemb;
    i dont see how this would work lol it should be sumthing like getitem.delete sumthing = (id) im not sure how to put the varbailes into spots
    its on server side (pi base) client.java if im not mistakn
    Reply With Quote  
     

  4. #4  
    Enter The Dragon
    Roshi's Avatar
    Join Date
    Nov 2012
    Age
    24
    Posts
    263
    Thanks given
    4
    Thanks received
    19
    Rep Power
    4
    i know try creating public int orb of armadyl and public int battlestaff

    then trying that? im still learning java
    Reply With Quote  
     

  5. #5  
    Registered Member
    Edd -'s Avatar
    Join Date
    Jul 2011
    Posts
    665
    Thanks given
    62
    Thanks received
    43
    Rep Power
    84
    itemon


    Code:
    if ((itemUsed == orb id && useWith == staff id) || (itemUsed == staff id  && useWith == orb id)) {
    			if (c.getItems().playerHasItem(orb id, 1)) {
    				c.getItems().deleteItem(orb id, c.getItems().getItemSlot(orbid), 1);
    				c.getItems().deleteItem(staffid, c.getItems().getItemSlot(staffid), 1);
    				c.getItems().addItem(armastaff,1);
    				c.sendMessage("You craft a staff of armadyl.");
    			} else {	
    				c.sendMessage("You cannot use those items together!");
    			}
    		}
    Reply With Quote  
     

  6. #6  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,472
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Quote Originally Posted by Edd is pro View Post
    itemon


    if ((itemUsed == orb id && useWith == staff id) || (itemUsed == staff id && useWith == orb id)) {
    if (c.getItems().playerHasItem(orb id, 1) && (c.getItems().playerHasItem(staffid, 1)) {
    c.getItems().deleteItem(orb id, c.getItems().getItemSlot(orbid), 1);
    c.getItems().deleteItem(staffid, c.getItems().getItemSlot(staffid), 1);
    c.getItems().addItem(armastaff,1);
    c.sendMessage("You craft a staff of armadyl.");
    } else {
    c.sendMessage("You cannot use those items together!");
    }
    }
    You forgot something.

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Stupid question for most of you :p
    By MyQuests in forum Help
    Replies: 8
    Last Post: 07-10-2012, 06:13 PM
  2. Stupid Question
    By Jason in forum Application Development
    Replies: 3
    Last Post: 12-03-2011, 04:01 PM
  3. Stupid question.
    By sure im crazy in forum Help
    Replies: 1
    Last Post: 04-26-2011, 02:07 AM
  4. just a stupid question :P
    By superbombet in forum Help
    Replies: 8
    Last Post: 12-08-2010, 04:18 PM
  5. Cant Remove Stupid AntiLeech Help plz
    By I Monk I in forum Help
    Replies: 5
    Last Post: 01-10-2010, 07:54 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •