Thread: Asteria HELP PLEASE.

Results 1 to 5 of 5
  1. #1 Asteria HELP PLEASE. 
    Previously, /*ReQuiem*/

    Gielinor's Avatar
    Join Date
    Sep 2009
    Posts
    553
    Thanks given
    56
    Thanks received
    20
    Rep Power
    151
    hey guys ive come across a few problems trying too add crafting too my server, the base is asteria 3.0

    This is the code and its pretty nice, credits too D R O.

    Code:
    package server.model.players.skills;
    
    import server.model.players.Client;
    /**
     * 
     * @author Hood Niqqa
     * credits: phl0w for helping me using enums
     */
    public class Crafting {
    	Client c;
    	
    	public Crafting(Client c) {
    		this.c = c;
    	}
    public enum craftGems {
    	OPAL(1625,1609,1,15),
    	JADE(1627,1611,13,20),
    	TOPAZ(1629,1613,16,25),
    	SAPPHIRE(1623,1607,20,50),
    	EMERALD(1621,1605,27,67),
    	RUBY(1619,1603,34,85),
    	DIAMOND(1617,1601,43,107),
    	DRAGONSTONE(1631,1615,55,137),
    	ONYX(6571,6573,67,167);
    	public int uncutID,cutID,levelReq,exp;
    	
    	private craftGems(int uncutID, int cutID, int levelReq,int exp) {
    		this.uncutID = uncutID;
    		this.cutID = cutID;
    		this.levelReq = levelReq;
    		this.exp = exp;
    	}
    	public int getUncut() {
    		return uncutID;
    		
    	}
    	public int getCut() {
    		return cutID;
    	}
    	public int getLevelReq() {
    		return levelReq;
    	}
    	public int getEXP() {
    	return exp;
    	}
    	}
    public void handleChisel(int id1, int id2) {
        cutGem((id1 == 1755) ? id2 : id1);
    }
    private craftGems forGem(int id) {
    	for (craftGems g : craftGems.values()) {
    		if (g.getUncut() == id) {
    			return g;
    		}
    	}
    	return null;
    }
    
    
        public void cutGem(int id) {
        	craftGems gem = forGem(id);
        	if (gem != null) {
        		if (c.getItems().playerHasItem(gem.getUncut(), 1)) {
        			if (c.playerLevel[c.playerCrafting] >= gem.getLevelReq()) {
        				c.getItems().deleteItem2(gem.getUncut(), 1);
        				c.getItems().addItem(gem.getCut(), 1);
        				c.getPA().addSkillXP(gem.getEXP(), c.playerCrafting);
        				c.startAnimation(885);
        			} else {
        				c.sendMessage("You need a level of" +gem.getLevelReq()+ "to cut this gem");
        			}
        		}
        	}
        }
    }
    goto useItem class then method itemonitem add this:

    Code:
    if (itemUsed == 1755 || useWith == 1623)
    			c.getCrafting().handleChisel(itemUsed, useWith);
    if anyone could give me a hand converting or adding however i have too please.
    This code is originally for PI but if i can get it added properly i can use it too my advantage !

    REP FOR ANYONE AND THANKS IS IN ORDER !
    My signature was too big and pissed off Kevy.

    Reply With Quote  
     

  2. #2  
    Registered Member
    Stanaveli's Avatar
    Join Date
    Aug 2014
    Posts
    1,490
    Thanks given
    184
    Thanks received
    653
    Rep Power
    1338
    Don't use asteria, we don't need your cluttershit.

    JK: but don't think you should convert this, just use the Skill action classes lare provided for a more OO approach.
    Keep your head up.



    Reply With Quote  
     

  3. #3  
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,570
    Thanks given
    871
    Thanks received
    1,745
    Rep Power
    5000
    This is not asteria

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

  4. #4  
    Previously, /*ReQuiem*/

    Gielinor's Avatar
    Join Date
    Sep 2009
    Posts
    553
    Thanks given
    56
    Thanks received
    20
    Rep Power
    151
    i said its not asteria, its PI and i want too somehow convert it too Asteria just so i have a money making scheme..
    My signature was too big and pissed off Kevy.

    Reply With Quote  
     

  5. #5  
    Banned Asteria HELP PLEASE. Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    Just use the SkillAction implementations like someone else stated above.
    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. Asteria HELP PLEASE.
    By Gielinor in forum Requests
    Replies: 3
    Last Post: 04-25-2015, 04:21 AM
  2. Run Server? little help please :]
    By im so h00d in forum Tutorials
    Replies: 13
    Last Post: 11-11-2007, 03:59 AM
  3. Help, please
    By Zachyboo in forum Tutorials
    Replies: 4
    Last Post: 08-27-2007, 04:27 PM
  4. Webclient Help Please?
    By Spoonkitty in forum RS2 Client
    Replies: 1
    Last Post: 06-28-2007, 09:22 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
  •