Lots of bugs fixed
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ dependencies {
|
|||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': 'core.Server'
|
attributes 'Main-Class': 'rs09.Server'
|
||||||
}
|
}
|
||||||
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
|
||||||
}
|
}
|
||||||
+1
-1
@@ -44,7 +44,7 @@ public final class AvasDevicePlugin implements Plugin<Object> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(player.hasActiveState("avadevice")) player.states.get("avadevice").getPulse().stop();
|
if(player.hasActiveState("avadevice")) player.clearState("avadevice");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import core.net.packet.PacketRepository;
|
|||||||
import core.net.packet.context.PlayerContext;
|
import core.net.packet.context.PlayerContext;
|
||||||
import core.net.packet.out.ClearMinimapFlag;
|
import core.net.packet.out.ClearMinimapFlag;
|
||||||
import kotlin.jvm.functions.Function1;
|
import kotlin.jvm.functions.Function1;
|
||||||
|
import rs09.game.system.SystemLogger;
|
||||||
|
|
||||||
import java.util.Deque;
|
import java.util.Deque;
|
||||||
|
|
||||||
@@ -225,6 +226,12 @@ public abstract class MovementPulse extends Pulse {
|
|||||||
if (mover instanceof NPC && mover.asNpc().isNeverWalks()) {
|
if (mover instanceof NPC && mover.asNpc().isNeverWalks()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(destination.getLocation() == null){
|
||||||
|
SystemLogger.logAlert(destination.getId() + " < ID");
|
||||||
|
SystemLogger.logAlert(destination.getName() + " < NAME");
|
||||||
|
SystemLogger.logAlert("ASDAD");
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean inside = isInsideEntity(mover.getLocation());
|
boolean inside = isInsideEntity(mover.getLocation());
|
||||||
if (last != null && last.equals(destination.getLocation()) && !inside) {
|
if (last != null && last.equals(destination.getLocation()) && !inside) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1354,9 +1354,7 @@ public class Player extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public State registerState(String key){
|
public State registerState(String key){
|
||||||
State state = StateRepository.forKey(key,this);
|
return StateRepository.forKey(key, this);
|
||||||
if(state != null) return state;
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearState(String key){
|
public void clearState(String key){
|
||||||
|
|||||||
-49
@@ -1,49 +0,0 @@
|
|||||||
package core.game.node.entity.skill.construction.decoration.chapel;
|
|
||||||
|
|
||||||
|
|
||||||
import core.cache.def.impl.ObjectDefinition;
|
|
||||||
import core.game.interaction.OptionHandler;
|
|
||||||
import core.game.node.Node;
|
|
||||||
import core.game.node.entity.player.Player;
|
|
||||||
import core.game.node.item.Item;
|
|
||||||
import core.game.node.object.GameObject;
|
|
||||||
import core.game.node.object.ObjectBuilder;
|
|
||||||
import core.game.world.update.flag.context.Animation;
|
|
||||||
import core.plugin.Initializable;
|
|
||||||
import core.plugin.Plugin;
|
|
||||||
import core.tools.RandomFunction;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handles the lighting of the torches of the Chapel.
|
|
||||||
* @author Splinter
|
|
||||||
*/
|
|
||||||
@Initializable
|
|
||||||
public class TorchLightPlugin extends OptionHandler {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
|
||||||
for (int i = 13202; i < 13214; i++) {
|
|
||||||
ObjectDefinition.forId(i).getHandlers().put("option:light", this);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handle(Player player, Node node, String option) {
|
|
||||||
if (player.getIronmanManager().checkRestriction() && !player.getHouseManager().isInHouse(player)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!player.getInventory().containsItem(new Item(590)) || !player.getInventory().containsItem(new Item(251))) {
|
|
||||||
player.getDialogueInterpreter().sendDialogue("You'll need a tinderbox and a clean marrentill herb in order to", "light the burner.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (player.getInventory().remove(new Item(251))) {
|
|
||||||
player.lock(1);
|
|
||||||
player.animate(Animation.create(3687));
|
|
||||||
player.sendMessage("You burn some marrentill in the incense burner.");
|
|
||||||
ObjectBuilder.replace(node.asObject(), new GameObject(node.asObject().getId() + 1, node.getLocation()), RandomFunction.random(100, 175));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -186,7 +186,7 @@ public final class InteractionPacket implements IncomingPacket {
|
|||||||
player.debug("spawn=" + npc.getProperties().getSpawnLocation() + ".");
|
player.debug("spawn=" + npc.getProperties().getSpawnLocation() + ".");
|
||||||
player.debug("Varp ID= " + npc.getDefinition().getConfigId() + " Offset=" + npc.getDefinition().getVarbitOffset() + " Size=" + npc.getDefinition().getVarbitSize());
|
player.debug("Varp ID= " + npc.getDefinition().getConfigId() + " Offset=" + npc.getDefinition().getVarbitOffset() + " Size=" + npc.getDefinition().getVarbitSize());
|
||||||
handleAIPLegion(player, 0, optionIndex, index);
|
handleAIPLegion(player, 0, optionIndex, index);
|
||||||
if(Listeners.run(shown.getId(),2, option.getName(),player,shown)){
|
if(Listeners.run(npc.getId(),2, option.getName(),player,npc)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(PluginInteractionManager.handle(player,shown,option)){
|
if(PluginInteractionManager.handle(player,shown,option)){
|
||||||
|
|||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
package rs09.game.content.quest.members.thelostcity
|
||||||
|
|
||||||
|
import core.game.content.quest.members.lostcity.TreeSpiritNPC
|
||||||
|
import core.game.node.`object`.GameObject
|
||||||
|
import core.game.node.entity.skill.gather.GatheringSkillPulse
|
||||||
|
import core.game.node.entity.skill.gather.SkillingTool
|
||||||
|
import core.game.world.map.Location
|
||||||
|
import rs09.game.interaction.InteractionListener
|
||||||
|
|
||||||
|
class DramenTreeListener : InteractionListener() {
|
||||||
|
|
||||||
|
val DRAMEN_TREE = 1292
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
|
||||||
|
on(DRAMEN_TREE,OBJECT,"chop down"){player,node ->
|
||||||
|
val quest = player.questRepository.getQuest("Lost City")
|
||||||
|
if (SkillingTool.getHatchet(player) == null) {
|
||||||
|
player.getPacketDispatch().sendMessage("You do not have an axe which you have the level to use.")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
if (quest.getStage(player) < 20) {
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
if (quest.getStage(player) == 20) {
|
||||||
|
if (player.getAttribute("treeSpawned", false)) {
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
val spirit = TreeSpiritNPC.create(655, Location.create(2862, 9734, 0)) as TreeSpiritNPC
|
||||||
|
spirit.player = player
|
||||||
|
spirit.isRespawn = false
|
||||||
|
spirit.init()
|
||||||
|
spirit.attack(player)
|
||||||
|
player.setAttribute("treeSpawned", true)
|
||||||
|
spirit.sendChat("You must defeat me before touching the tree!")
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
player.getPulseManager().run(GatheringSkillPulse(player, node as GameObject?))
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import org.json.simple.JSONArray
|
|||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import org.json.simple.parser.JSONParser
|
import org.json.simple.parser.JSONParser
|
||||||
import rs09.ServerConstants
|
import rs09.ServerConstants
|
||||||
|
import rs09.game.node.entity.skill.farming.CompostBins
|
||||||
import rs09.game.node.entity.skill.farming.FarmingPatch
|
import rs09.game.node.entity.skill.farming.FarmingPatch
|
||||||
import rs09.game.system.SystemLogger
|
import rs09.game.system.SystemLogger
|
||||||
import rs09.game.world.GameWorld
|
import rs09.game.world.GameWorld
|
||||||
@@ -33,7 +34,7 @@ class PlayerSaveParser(val player: Player) {
|
|||||||
var read = true
|
var read = true
|
||||||
|
|
||||||
val patch_varps = FarmingPatch.values().map { it.varpIndex }.toIntArray()
|
val patch_varps = FarmingPatch.values().map { it.varpIndex }.toIntArray()
|
||||||
val bin_varps = FarmingPatch.values().map { it.varpIndex }.toIntArray()
|
val bin_varps = CompostBins.values().map { it.varpIndex }.toIntArray()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
reader
|
reader
|
||||||
|
|||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
package rs09.game.node.entity.skill.construction.decoration.chapel
|
||||||
|
|
||||||
|
import core.game.node.`object`.GameObject
|
||||||
|
import core.game.node.`object`.ObjectBuilder
|
||||||
|
import core.game.node.item.Item
|
||||||
|
import core.game.world.update.flag.context.Animation
|
||||||
|
import core.tools.RandomFunction
|
||||||
|
import rs09.game.interaction.InteractionListener
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles the lighting of the torches of the Chapel.
|
||||||
|
* @author Splinter
|
||||||
|
*/
|
||||||
|
class BurnerListener : InteractionListener() {
|
||||||
|
|
||||||
|
val IDs = intArrayOf(13202,13203,13204,13205,13206,13207,13208,13209,13210,13211,13212,13213)
|
||||||
|
|
||||||
|
override fun defineListeners() {
|
||||||
|
on(IDs,OBJECT,"light"){player,node ->
|
||||||
|
if (player.ironmanManager.checkRestriction() && !player.houseManager.isInHouse(player)) {
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
if (!player.inventory.containsItem(Item(590)) || !player.inventory.containsItem(Item(251))) {
|
||||||
|
player.dialogueInterpreter.sendDialogue(
|
||||||
|
"You'll need a tinderbox and a clean marrentill herb in order to",
|
||||||
|
"light the burner."
|
||||||
|
)
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
if (player.inventory.remove(Item(251))) {
|
||||||
|
player.lock(1)
|
||||||
|
player.animate(Animation.create(3687))
|
||||||
|
player.sendMessage("You burn some marrentill in the incense burner.")
|
||||||
|
ObjectBuilder.replace(
|
||||||
|
node.asObject(),
|
||||||
|
GameObject(node.asObject().id + 1, node.location),
|
||||||
|
RandomFunction.random(100, 175)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return@on true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import core.tools.RandomFunction
|
|||||||
import org.json.simple.JSONArray
|
import org.json.simple.JSONArray
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
import org.rs09.consts.Items
|
import org.rs09.consts.Items
|
||||||
|
import rs09.game.system.SystemLogger
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class CompostBin(val player: Player, val bin: CompostBins) {
|
class CompostBin(val player: Player, val bin: CompostBins) {
|
||||||
@@ -102,6 +103,7 @@ class CompostBin(val player: Player, val bin: CompostBins) {
|
|||||||
}
|
}
|
||||||
if (isClosed) player.varpManager.get(bin.varpIndex).setVarbit(bin.varpOffest + 6, 1)
|
if (isClosed) player.varpManager.get(bin.varpIndex).setVarbit(bin.varpOffest + 6, 1)
|
||||||
}
|
}
|
||||||
|
SystemLogger.logAlert("Sending " + player.varpManager.get(bin.varpIndex).getValue())
|
||||||
player.varpManager.get(bin.varpIndex).send(player)
|
player.varpManager.get(bin.varpIndex).send(player)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ object UseWithPatchHandler{
|
|||||||
if(!p.isWatered && (t == PatchType.ALLOTMENT || t == PatchType.FLOWER || t == PatchType.HOPS) && !p.isGrown()){
|
if(!p.isWatered && (t == PatchType.ALLOTMENT || t == PatchType.FLOWER || t == PatchType.HOPS) && !p.isGrown()){
|
||||||
player.pulseManager.run(object : Pulse(){
|
player.pulseManager.run(object : Pulse(){
|
||||||
override fun pulse(): Boolean {
|
override fun pulse(): Boolean {
|
||||||
|
if(p.isWeedy()){
|
||||||
|
player.sendMessage("You should grow something first.")
|
||||||
|
return true
|
||||||
|
}
|
||||||
player.animator.animate(wateringCanAnim)
|
player.animator.animate(wateringCanAnim)
|
||||||
if(player.inventory.remove(event.usedItem)){
|
if(player.inventory.remove(event.usedItem)){
|
||||||
player.inventory.add(Item(usedItem.id.getNext()))
|
player.inventory.add(Item(usedItem.id.getNext()))
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ object StateRepository {
|
|||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun init() {
|
fun init() {
|
||||||
val result = ClassGraph().enableClassInfo().enableAnnotationInfo().acceptPackages("core.game.node.entity.state").scan()
|
val result = ClassGraph().enableClassInfo().enableAnnotationInfo().acceptPackages("rs09.game.node.entity.state").scan()
|
||||||
result.getClassesWithAnnotation("core.game.node.entity.state.newsys.PlayerState").forEach{
|
result.getClassesWithAnnotation("rs09.game.node.entity.state.newsys.PlayerState").forEach{
|
||||||
val key = it.getAnnotationInfo("core.game.node.entity.state.newsys.PlayerState").parameterValues[0].value as String
|
val key = it.getAnnotationInfo("rs09.game.node.entity.state.newsys.PlayerState").parameterValues[0].value as String
|
||||||
val clazz = it.loadClass().newInstance()
|
val clazz = it.loadClass().newInstance()
|
||||||
if(clazz is State) {
|
if(clazz is State) {
|
||||||
states.put(key, clazz)
|
states.put(key, clazz)
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ class AvaDeviceState(player: Player? = null) : State(player) {
|
|||||||
private val ACCUMULATOR_REWARDS = arrayOf(Items.STEEL_BAR_2353,Items.STEEL_2H_SWORD_1311,Items.STEEL_KNIFE_865,Items.STEEL_DAGGER_1207,Items.STEEL_MED_HELM_1141,Items.STEEL_DART_808,Items.STEEL_BOLTS_9141,Items.STEEL_ARROW_886,Items.IRON_BAR_2351)
|
private val ACCUMULATOR_REWARDS = arrayOf(Items.STEEL_BAR_2353,Items.STEEL_2H_SWORD_1311,Items.STEEL_KNIFE_865,Items.STEEL_DAGGER_1207,Items.STEEL_MED_HELM_1141,Items.STEEL_DART_808,Items.STEEL_BOLTS_9141,Items.STEEL_ARROW_886,Items.IRON_BAR_2351)
|
||||||
|
|
||||||
override fun save(root: JSONObject) {
|
override fun save(root: JSONObject) {
|
||||||
root.put("device-id",device)
|
if(pulse == null || !pulse!!.isRunning)
|
||||||
|
root.put("device-id",device)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun parse(_data: JSONObject) {
|
override fun parse(_data: JSONObject) {
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package rs09.game.node.entity.state.newsys.states
|
package rs09.game.node.entity.state.newsys.states
|
||||||
|
|
||||||
import core.game.node.entity.player.Player
|
import core.game.node.entity.player.Player
|
||||||
import rs09.game.node.entity.skill.farming.*
|
|
||||||
import rs09.game.node.entity.state.newsys.PlayerState
|
|
||||||
import rs09.game.node.entity.state.newsys.State
|
|
||||||
import rs09.game.system.SystemLogger
|
|
||||||
import core.game.system.task.Pulse
|
import core.game.system.task.Pulse
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import org.json.simple.JSONArray
|
import org.json.simple.JSONArray
|
||||||
import org.json.simple.JSONObject
|
import org.json.simple.JSONObject
|
||||||
|
import rs09.game.node.entity.skill.farming.*
|
||||||
|
import rs09.game.node.entity.state.newsys.PlayerState
|
||||||
|
import rs09.game.node.entity.state.newsys.State
|
||||||
|
import rs09.game.system.SystemLogger
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
@PlayerState("farming")
|
@PlayerState("farming")
|
||||||
@@ -70,11 +70,8 @@ class FarmingState(player: Player? = null) : State(player) {
|
|||||||
val bin = it as JSONObject
|
val bin = it as JSONObject
|
||||||
val binOrdinal = bin["bin-ordinal"].toString().toInt()
|
val binOrdinal = bin["bin-ordinal"].toString().toInt()
|
||||||
val cBin = CompostBins.values()[binOrdinal]
|
val cBin = CompostBins.values()[binOrdinal]
|
||||||
val b = CompostBin(player,cBin)
|
val b = cBin.getBinForPlayer(player)
|
||||||
b.parse(bin["binData"] as JSONObject)
|
b.parse(bin["binData"] as JSONObject)
|
||||||
if(binMap[cBin] == null) {
|
|
||||||
binMap[cBin] = b
|
|
||||||
}
|
|
||||||
SystemLogger.logErr("bin size " + binMap.size)
|
SystemLogger.logErr("bin size " + binMap.size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,35 +130,33 @@ class FarmingState(player: Player? = null) : State(player) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun createPulse() {
|
override fun createPulse() {
|
||||||
if(patchMap.isNotEmpty() || binMap.isNotEmpty()){
|
pulse = object : Pulse(3){
|
||||||
pulse = object : Pulse(3){
|
override fun pulse(): Boolean {
|
||||||
override fun pulse(): Boolean {
|
|
||||||
|
|
||||||
GlobalScope.launch {
|
GlobalScope.launch {
|
||||||
var removeList = ArrayList<FarmingPatch>()
|
var removeList = ArrayList<FarmingPatch>()
|
||||||
for((_,patch) in patchMap){
|
for((_,patch) in patchMap){
|
||||||
|
|
||||||
if(patch.getCurrentState() in 1..3 && patch.nextGrowth == 0L){
|
|
||||||
patch.nextGrowth = System.currentTimeMillis() + 60000
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
if(patch.nextGrowth < System.currentTimeMillis() && !patch.isDead){
|
|
||||||
patch.update()
|
|
||||||
patch.nextGrowth = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(patch.patch.type.stageGrowthTime.toLong())
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if(patch.getCurrentState() in 1..3 && patch.nextGrowth == 0L){
|
||||||
|
patch.nextGrowth = System.currentTimeMillis() + 60000
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
for((_,bin) in binMap){
|
if(patch.nextGrowth < System.currentTimeMillis() && !patch.isDead){
|
||||||
if(bin.isReady() && !bin.isFinished){
|
patch.update()
|
||||||
bin.finish()
|
patch.nextGrowth = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(patch.patch.type.stageGrowthTime.toLong())
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
for((_,bin) in binMap){
|
||||||
|
if(bin.isReady() && !bin.isFinished){
|
||||||
|
bin.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,13 +163,15 @@ class MiscCommandSet : CommandSet(Command.Privilege.ADMIN){
|
|||||||
for (i in 0..310) {
|
for (i in 0..310) {
|
||||||
player!!.packetDispatch.sendString("", 275, i)
|
player!!.packetDispatch.sendString("", 275, i)
|
||||||
}
|
}
|
||||||
|
val offerList = offers.keys.map { "${ItemDefinition.forId(it).name} - ${offers[it]}" }.sorted()
|
||||||
|
|
||||||
var lineId = 11
|
var lineId = 11
|
||||||
player!!.packetDispatch.sendString("Active Sell Offers", 275, 2)
|
player!!.packetDispatch.sendString("Active Sell Offers", 275, 2)
|
||||||
var counter = 0
|
var counter = 0
|
||||||
for(i in 0..299) {
|
for(i in 0..299) {
|
||||||
val offer = offers.entries.elementAtOrNull(i)
|
val offer = offerList.elementAtOrNull(i)
|
||||||
if (offer != null)
|
if (offer != null)
|
||||||
player.packetDispatch.sendString("${ItemDefinition.forId(offer.key).name} x${offer.value}", 275, lineId++)
|
player.packetDispatch.sendString(offer, 275, lineId++)
|
||||||
else
|
else
|
||||||
player.packetDispatch.sendString("", 275, lineId++)
|
player.packetDispatch.sendString("", 275, lineId++)
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -17,15 +17,15 @@ copy_configs () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_jars () {
|
build_jars () {
|
||||||
cp ~/IdeaProjects/rs09-remake/Server/src/main/java/Server/core/ServerConstants.kt ~/IdeaProjects/rs09-remake/Server/src/main/java/Server/core/ServerConstants.backup
|
cp ~/IdeaProjects/rs09-remake/Server/src/main/kotlin/rs09/ServerConstants.kt ~/IdeaProjects/rs09-remake/Server/src/main/kotlin/rs09/ServerConstants.kt.backup
|
||||||
|
|
||||||
cp ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.kt ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.backup
|
cp ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.kt ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.backup
|
||||||
|
|
||||||
rsa_priv=`cat ~/IdeaProjects/rs09-remake/rsapriv | grep "private static final BigInteger RSA_EXPONENT = new BigInteger(" | sed 's/private static final BigInteger RSA_EXPONENT = new BigInteger(\"//' | sed 's/\")\;//'`
|
rsa_priv=`cat ~/IdeaProjects/rs09-remake/rsapriv | grep "private static final BigInteger RSA_EXPONENT = new BigInteger(" | sed 's/private static final BigInteger RSA_EXPONENT = new BigInteger(\"//' | sed 's/\")\;//'`
|
||||||
rsa_pub=`cat ~/IdeaProjects/rs09-remake/rsapriv | grep "private static final BigInteger RSA_MODULUS = new BigInteger(" | sed 's/private static final BigInteger RSA_MODULUS = new BigInteger(\"//' | sed 's/\")\;//'`
|
rsa_pub=`cat ~/IdeaProjects/rs09-remake/rsapriv | grep "private static final BigInteger RSA_MODULUS = new BigInteger(" | sed 's/private static final BigInteger RSA_MODULUS = new BigInteger(\"//' | sed 's/\")\;//'`
|
||||||
|
|
||||||
sed -i "s/var EXPONENT = BigInteger(\"[0-9]*\")/var EXPONENT = BigInteger(\"$rsa_priv\")/" ~/IdeaProjects/rs09-remake/Server/src/main/java/Server/core/ServerConstants.kt
|
sed -i "s/var EXPONENT = BigInteger(\"[0-9]*\")/var EXPONENT = BigInteger(\"$rsa_priv\")/" ~/IdeaProjects/rs09-remake/Server/src/main/kotlin/rs09/ServerConstants.kt
|
||||||
sed -i "s/var MODULUS = BigInteger(\"[0-9]*\")/var MODULUS = BigInteger(\"$rsa_pub\")/" ~/IdeaProjects/rs09-remake/Server/src/main/java/Server/core/ServerConstants.kt
|
sed -i "s/var MODULUS = BigInteger(\"[0-9]*\")/var MODULUS = BigInteger(\"$rsa_pub\")/" ~/IdeaProjects/rs09-remake/Server/src/main/kotlin/rs09/ServerConstants.kt
|
||||||
|
|
||||||
sed -i "s/var MODULUS = BigInteger(\"[0-9]*\")/var MODULUS = BigInteger(\"$rsa_pub\")/" ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.kt
|
sed -i "s/var MODULUS = BigInteger(\"[0-9]*\")/var MODULUS = BigInteger(\"$rsa_pub\")/" ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.kt
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ build_jars () {
|
|||||||
cd ../Server
|
cd ../Server
|
||||||
gradle jar
|
gradle jar
|
||||||
|
|
||||||
cp ~/IdeaProjects/rs09-remake/Server/src/main/java/Server/core/ServerConstants.backup ~/IdeaProjects/rs09-remake/Server/src/main/java/Server/core/ServerConstants.kt
|
cp ~/IdeaProjects/rs09-remake/Server/src/main/kotlin/rs09/ServerConstants.kt.backup ~/IdeaProjects/rs09-remake/Server/src/main/kotlin/rs09/ServerConstants.kt
|
||||||
|
|
||||||
cp ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.backup ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.kt
|
cp ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.backup ~/IdeaProjects/rs09-remake/Client/src/main/kotlin/org/rs09/client/config/GameConfig.kt
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ build_jars () {
|
|||||||
|
|
||||||
copy_jars() {
|
copy_jars() {
|
||||||
cd ~/IdeaProjects/rs09-remake/Client/build/libs
|
cd ~/IdeaProjects/rs09-remake/Client/build/libs
|
||||||
scp client-1.0.0.jar scape2009@play.rs09-remake.org:/opt/lampp/htdocs/2009scape.jar
|
scp client-1.0.0.jar scape2009@play.2009scape.org:/opt/lampp/htdocs/2009scape.jar
|
||||||
cd ~/IdeaProjects/rs09-remake/Server/build/libs
|
cd ~/IdeaProjects/rs09-remake/Server/build/libs
|
||||||
scp server-1.0.0.jar scape2009@play.2009scape.org:server.jar
|
scp server-1.0.0.jar scape2009@play.2009scape.org:server.jar
|
||||||
echo "Jars successfully copied to remote server"
|
echo "Jars successfully copied to remote server"
|
||||||
|
|||||||
Reference in New Issue
Block a user