Sign in to follow this  
BeardPrincess

Mod Request: Remove Skill Gain Delay on Lockpicking

Recommended Posts

My fiancee and I play together on our own locally hosted adventure server, and we decided to set up in our kingdom. Some areas of the kingdom have some abandoned houses in them we'd like to use and such, but with the lockpicking skill timer it's taking SOOOO long to be able to increase my lockpicking in order to get some of these things.

 

Thanks :)

Share this post


Link to post
Share on other sites

Hey, you can give this a try, it is using ago's server mod loader, so you'll need that.

http://wurmfeed.rotabland.eu/mod/lockpicking.rar

 

Spoiler

package org.rotab.wurmunlimited.mods.lockpicking;

import javassist.*;
import org.gotti.wurmunlimited.modloader.classhooks.HookException;
import org.gotti.wurmunlimited.modloader.classhooks.HookManager;
import org.gotti.wurmunlimited.modloader.interfaces.PreInitable;
import org.gotti.wurmunlimited.modloader.interfaces.ServerStartedListener;
import org.gotti.wurmunlimited.modloader.interfaces.WurmMod;

import java.util.logging.Level;
import java.util.logging.Logger;

public class LockpickingMod implements WurmMod, ServerStartedListener, PreInitable {

    private Logger logger = Logger.getLogger(this.getClass().getName());

    @Override
    public void onServerStarted() {
        logger.log(Level.INFO, "Initializing Lockpicking modifications");
    }

    @Override
    public void preInit() {

        try {
            ClassPool classPool = HookManager.getInstance().getClassPool();

            CtClass ctSkillTemplate = classPool.get("com.wurmonline.server.skills.SkillTemplate");

            CtConstructor[] constructors = ctSkillTemplate.getConstructors();

            constructors[2].insertAfter("if (this.thieverySkill) { this.tickTime = 0; }");
        } catch (NotFoundException | CannotCompileException e) {
            throw new HookException(e);
        }
    }
}

 

  • Like 1

Share this post


Link to post
Share on other sites

Hey, Rotab! It worked flawlessly! Sorry it took me so long to get back to you.
Thank you so much!

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this