1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Coding for Darkscape: Best ways to deal with death

Discussion in 'Developer Support' started by sniperkid2160, Feb 4, 2016.

  1. sniperkid2160

    Joined:
    Jan 26, 2016
    Messages:
    4
    Likes Received:
    0
    Hey everyone,
    I'm starting to write a darkscape bot, and was thinking about how to deal with player killing. I figured I would voice my thoughts here to get opinions and possibly a good discussion going about good practices for dealing with bot-killers in Darkscape.

    Death Walking
    This is the most obvious, and most needed feature. Getting back to what you were doing after you are killed. This needs to be handled on a per-case basis, as different bots will require different amounts of gearing up or walking. It could be useful to set the respawn settings for the bot to the nearest respawn location onStart, in order to make it easiest to return to the location. I do not know if Runemate has the capabilities to go into user settings to change respawn location, however.

    World Hopping
    This is a big one. If someone is PKing a botting location, running all the way back to it won't do you much good because they will still be there, and will just kill you again. The best option (aside from stopping the bot), would be do hop to a different world. Granted, in Darkscape there are only four worlds to choose from, so choices are slim. But if I can, I would like to code the "world hop on death" functionality into my bots, to give them the best chance to continue botting after a death. Again, I know nothing about RuneMate's ability to handle world hopping, due to my inexperience with the API.

    2-3 Item suicide (combat) training and regearing
    Since its easy to be killed while botting in darkscape, a good thought would be to find monsters you can train on that can be killed until you die, then respawn and just continue killing them. For example, Tzhaar creatures are right next to the Tzhaar respawn location. If you equip a weapon and two armor pieces, you risk nothing, and don't have to worry about food or pkers. The only negative is you cannot loot. The bot would just need to handle re-equipping the items on spawn

    How to most accurately call an on-death method?
    This is a side question I have. What is the best "identifier" to know that your character has just died? There is a string in chat that says you have been killed. Is there any RuneMate API flag that is raised when your player dies, that can be utilized by a darkscape coder?


    Thanks for reading
     
  2. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    RuneMate definitely does have the capibilities to go into the use settings and change the respawn location, through InterfaceComponents. There's no RespawnSettings.setLowRiskRespawn(EDGEVILLE); but anyone can make their own using Interfaces.

    Again, iirc there's no explicit support, but you can easily make your own by using Interfaces.

    You could use a ChatBoxListener and listen for the specific string. Or you could create some sort of LocalPlayerMonitor that monitors your local Player and has methods that you want to use. Another easy way would be Health.getCurrent() == 0.
     
  3. sniperkid2160

    Joined:
    Jan 26, 2016
    Messages:
    4
    Likes Received:
    0
    Thanks for the tips! I will check out the interfaces API.
     

Share This Page

Loading...