Thread: [ASCEND] Teleport to slayer task/auto cast fire surge/Runelite/barrows roll chance?

Results 1 to 5 of 5
  1. #1 [ASCEND] Teleport to slayer task/auto cast fire surge/Runelite/barrows roll chance? 
    Registered Member
    Join Date
    Feb 2017
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hi everyone,

    So I'm trying to get into RSPS coding, downloaded ascend source : [Only registered and activated users can see links. ], played around with it for a little bit, changed the xp rates of different modes, boosted the drop rates of them aswell, now I'm trying to start writing some other stuff into it.

    At first I tried implementing a ::task command, which teleports players to their slayer task, got a code from here that looks like this and pasted in commands.java:
    Code:
    if (playerCommand.equalsIgnoreCase("task")) {
    			switch (c.slayerTask) {
    
    			case 1648://crawling hand
    			c.getPA().startTeleport(3410, 3537, 0, "modern");
    			break;
    			case 1612://Banshee
    			c.getPA().startTeleport(3438, 3562, 0, "modern");
    			break;
    			case 117://Hill Giant
    			c.getPA().startTeleport(3117, 9847, 0, "modern");
    			break;
    			case 1265://Rock Crab
    			c.getPA().startTeleport(2676, 3715, 0, "modern");
    			break;
    			case 103://Ghost
    			c.getPA().startTeleport(2901, 9849, 0, "modern");
    			break;
    			case 78://Giant Bat
    			c.getPA().startTeleport(2910, 9398, 0, "modern");
    			break;
    			case 119://Chaos Dwarf
    			c.getPA().startTeleport(2921, 9759, 0, "modern");
    			break;
    			case 18://al Karid warrior//
    			c.getPA().startTeleport(3293, 3174, 0, "modern");
    			break;
    			case 101://goblin
    			c.getPA().startTeleport(3263, 3234, 0, "modern");
    			break;
    			case 181://chaos druid
    			c.getPA().startTeleport(2932, 9847, 0, "modern");
    			break;
    			case 1643://infernal mage
    			c.getPA().startTeleport(3439, 3559, 1, "modern");
    			break;
    			case 1618://bloodveld
    			c.getPA().startTeleport(3423, 3562, 1, "modern");
    			break;
    			case 941://green dragon
    			c.getPA().startTeleport(2978, 3617, 0, "modern");
    			break;
    			case 82://lesser demon
    			c.getPA().startTeleport(2710, 9483, 0, "modern");
    			break;
    			case 52://baby blue dragon
    			c.getPA().startTeleport(2920, 901, 0, "modern");
    			break;
    			case 112://moss giant
    			c.getPA().startTeleport(2731, 9486, 0, "modern");
    			break;
    			case 125://ice warrior
    			c.getPA().startTeleport(2954, 3887, 0, "modern");
    			break;
    			/*case 1341://dag
    			c.getPA().startTeleport(3410, 3537, 0, "modern");
    			break;*/
    			case 1624://dust devil
    			c.getPA().startTeleport(3424, 3541, 1, "modern");
    			break;
    			case 1610://gargoyle
    			c.getPA().startTeleport(3439, 3540, 2, "modern");
    			break;
    			case 1613://nechrayael
    			c.getPA().startTeleport(3443, 3563, 2, "modern");
    			break;
    			case 1615://abyssal demon
    			c.getPA().startTeleport(3421, 3569, 2, "modern");
    			break;
    			case 55://blue dragon
    			c.getPA().startTeleport(2898, 9800, 0, "modern");
    			break;
    			case 84://black demon
    			c.getPA().startTeleport(2866, 9776, 0, "modern");
    			break;
    			case 49://hellhound
    			c.getPA().startTeleport(2858, 9841, 0, "modern");
    			break;
    			case 2783://dark beast
    			c.getPA().startTeleport(2908, 9693, 0, "modern");
    			break;
    		}
    			if (c.slayerTask == 0 || c.slayerTask == -1) {
    				c.sendMessage("You do not not have a task..");
    		}
    	}
    But at first I got an error on c.slayerTask, eclipse said to add an int in player.java that I did, now I'm getting an error in commands.java about the c.getPA().startTeleport , says it's not applicaple in playerassistant.java anyone could help me out? I'm new on all of this stuff.

    Second thing I'd like to add is a autocast surge spells in the combat mode spellbook or thruugh right clicking the spell in the actual spellbook, looked for any info, couldn't find it, any help there please?

    Third thing is that I saw other RSPS implementing runelite as their client - is it a lot of work to do as a beginner and I shouldn't even consider it, or I could manage it?

    Fourth thing is I wanted to mess around with the barrows drop chance (roll), couldn't find the string that manages the drop rate, where do I find it can anyone please tell me?

    Thank you, I know it looks like I want to be spoonfed, but it's so hard as a beginner to find stuff like this, I'm doing a java course on codeacademy on the side, just to get more information, but I think messing around with the code itself is going to benefit me as much as the courses.

    EDIT: I'm doing all of this to learn coding, not planning to host a server or anything like that
    Reply With Quote  
     

  2. #2  
    no


    Join Date
    Aug 2016
    Posts
    599
    Thanks given
    106
    Thanks received
    92
    Discord
    View profile
    Rep Power
    244
    Your first issue looks like you just copied the variable "slayerTask" from some other source and added it into your Player class? That won't work because thats not the same variable that you're currently using for slayer. Most of the times it should be something like c.getSlayer().getSlayerTask() it's not generally a variable saved directly to your player. You would have to find the variable that you're already using and use that one. Maybe check for a file called Slayer.java or SlayerTasks.java and look in there? If you're using an enum, then you definitely wouldn't be saving just the npc_id for your slayerTask variable. I would also be very doubtful that your current slayer system doesn't already have something in place for teleporting to your slayer task. It would be a lot simpler to copy that. Such as a ring of slaying or even just checking the enum that stores your tasks to see if coordinates are on there as well. Secondly, if it's saying it's not applicable in playerassistant, then that means that your startTeleport method is probably wrong. Like startTeleport doesn't exist or the parameters are different from the ones you've entered

    The second thing do you mean you want to add brand new spells into the spell book or you have them and they don't work? If you want to add brand new spells into your spell book, then you would have to get the sprites and animations/gfx you want, pack them into your cache, edit your interface (probably RSInterface, CustomInterface, or Widget), add a bunch of stuff to your Client class for the hover and right click actions, and then you would have to code it into your server which would be the easiest part in my opinion. You should already have somewhere that deals with spells so you just add a new spell at the end calling the animations/gfx/buttons and writing the damage for it or whatever. You'd probably be better off paying someone to do this for you though

    Third thing don't bother just pay someone

    Fourth thing the formula for barrows is explained halfway through the page here [Only registered and activated users can see links. ] . You probably have a class that handles barrows. Search your source for Barrows.java or Barrows something. I'm not sure what you're talking about strings relating to drop rates, but if you wanted to create your own drop rate thats easier to understand then you can do something simple like if((Math.random() * (100+ 1)) < 75) that would be a 75% chance, most servers already have a getRandom() method that makes it easier if(Misc.getRandom(100) < 75)
    Best excuse for scamming i've gotten yet



    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2017
    Posts
    3
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by Goody View Post
    Your first issue looks like you just copied the variable "slayerTask" from some other source and added it into your Player class? That won't work because thats not the same variable that you're currently using for slayer. Most of the times it should be something like c.getSlayer().getSlayerTask() it's not generally a variable saved directly to your player. You would have to find the variable that you're already using and use that one. Maybe check for a file called Slayer.java or SlayerTasks.java and look in there? If you're using an enum, then you definitely wouldn't be saving just the npc_id for your slayerTask variable. I would also be very doubtful that your current slayer system doesn't already have something in place for teleporting to your slayer task. It would be a lot simpler to copy that. Such as a ring of slaying or even just checking the enum that stores your tasks to see if coordinates are on there as well. Secondly, if it's saying it's not applicable in playerassistant, then that means that your startTeleport method is probably wrong. Like startTeleport doesn't exist or the parameters are different from the ones you've entered

    The second thing do you mean you want to add brand new spells into the spell book or you have them and they don't work? If you want to add brand new spells into your spell book, then you would have to get the sprites and animations/gfx you want, pack them into your cache, edit your interface (probably RSInterface, CustomInterface, or Widget), add a bunch of stuff to your Client class for the hover and right click actions, and then you would have to code it into your server which would be the easiest part in my opinion. You should already have somewhere that deals with spells so you just add a new spell at the end calling the animations/gfx/buttons and writing the damage for it or whatever. You'd probably be better off paying someone to do this for you though

    Third thing don't bother just pay someone

    Fourth thing the formula for barrows is explained halfway through the page here [Only registered and activated users can see links. ] . You probably have a class that handles barrows. Search your source for Barrows.java or Barrows something. I'm not sure what you're talking about strings relating to drop rates, but if you wanted to create your own drop rate thats easier to understand then you can do something simple like if((Math.random() * (100+ 1)) < 75) that would be a 75% chance, most servers already have a getRandom() method that makes it easier if(Misc.getRandom(100) < 75)
    Appreciate the reply, but I'm trying to learn coding, not to pay someone to do it for me as I'm not planning on hosting the server whatsoever.

    Secondly no, the surge spells are already added, I just need to somehow add them to autocast book, as there's only spells up to firewave in the autocast spellbook when equipped with a staff.

    So I guess I won't mess around with runelite
    Reply With Quote  
     

  4. #4  
    no


    Join Date
    Aug 2016
    Posts
    599
    Thanks given
    106
    Thanks received
    92
    Discord
    View profile
    Rep Power
    244
    Quote Originally Posted by ClydeSmooth View Post
    Appreciate the reply, but I'm trying to learn coding, not to pay someone to do it for me as I'm not planning on hosting the server whatsoever.

    Secondly no, the surge spells are already added, I just need to somehow add them to autocast book, as there's only spells up to firewave in the autocast spellbook when equipped with a staff.

    So I guess I won't mess around with runelite
    Ahhh well if you already have the spell added, then the autocast spellbook is probably just a seperate interface you would need to add them to. Probably RSInterface or Widget just search for autocase or something. You just need to modify the interface with some additional buttons at the end and then just edit your server code a little for those button id's
    Best excuse for scamming i've gotten yet



    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Aug 2012
    Posts
    159
    Thanks given
    5
    Thanks received
    7
    Rep Power
    11
    did u ever add surge autocasting i cant find where
    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. [718] teleport to slayer task location
    By maxblade33 in forum Help
    Replies: 5
    Last Post: 09-28-2017, 06:33 PM
  2. Replies: 1
    Last Post: 08-31-2016, 01:12 PM
  3. Replies: 7
    Last Post: 01-14-2014, 10:07 PM
  4. [PI]Command that teleports to Slayer Task NPC
    By o paws in forum Snippets
    Replies: 10
    Last Post: 03-07-2012, 05:25 AM
  5. Replies: 7
    Last Post: 10-18-2009, 10:40 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •