Some bugfixes
This commit is contained in:
@@ -2437,7 +2437,7 @@
|
|||||||
"slayer_task": "30",
|
"slayer_task": "30",
|
||||||
"melee_animation": "393",
|
"melee_animation": "393",
|
||||||
"range_animation": "0",
|
"range_animation": "0",
|
||||||
"attack_speed": "5",
|
"attack_speed": "4",
|
||||||
"respawn_delay": "60",
|
"respawn_delay": "60",
|
||||||
"defence_animation": "0",
|
"defence_animation": "0",
|
||||||
"weakness": "7",
|
"weakness": "7",
|
||||||
@@ -2445,14 +2445,14 @@
|
|||||||
"magic_animation": "0",
|
"magic_animation": "0",
|
||||||
"death_animation": "836",
|
"death_animation": "836",
|
||||||
"name": "Earth warrior",
|
"name": "Earth warrior",
|
||||||
"defence_level": "56",
|
"defence_level": "42",
|
||||||
"safespot": null,
|
"safespot": null,
|
||||||
"lifepoints": "54",
|
"lifepoints": "54",
|
||||||
"strength_level": "56",
|
"strength_level": "42",
|
||||||
"id": "124",
|
"id": "124",
|
||||||
"aggressive": "true",
|
"aggressive": "true",
|
||||||
"range_level": "1",
|
"range_level": "1",
|
||||||
"attack_level": "56"
|
"attack_level": "42"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"examine": "A cold-hearted elemental warrior.",
|
"examine": "A cold-hearted elemental warrior.",
|
||||||
|
|||||||
+1
@@ -49,6 +49,7 @@ public final class PyramidPlunderActivity extends ActivityPlugin {
|
|||||||
if (e instanceof Player) {
|
if (e instanceof Player) {
|
||||||
((Player) e).getInterfaceManager().closeOverlay();
|
((Player) e).getInterfaceManager().closeOverlay();
|
||||||
((PlunderSession) ((Player) e).getAttribute("plunder-session",null)).setActive(false);
|
((PlunderSession) ((Player) e).getAttribute("plunder-session",null)).setActive(false);
|
||||||
|
((Player) e).removeAttribute("plunder-session");
|
||||||
}
|
}
|
||||||
return super.leave(e, logout);
|
return super.leave(e, logout);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import core.game.node.entity.npc.NPC;
|
|||||||
import core.game.node.entity.player.Player;
|
import core.game.node.entity.player.Player;
|
||||||
import core.game.node.item.Item;
|
import core.game.node.item.Item;
|
||||||
import core.game.system.task.Pulse;
|
import core.game.system.task.Pulse;
|
||||||
|
import kotlin.Unit;
|
||||||
import rs09.game.world.GameWorld;
|
import rs09.game.world.GameWorld;
|
||||||
import core.game.world.map.Location;
|
import core.game.world.map.Location;
|
||||||
import core.game.world.update.flag.context.Animation;
|
import core.game.world.update.flag.context.Animation;
|
||||||
@@ -284,6 +285,10 @@ public final class RugMerchantDialogue extends DialoguePlugin {
|
|||||||
player.getInterfaceManager().hideTabs(0,1,2,3,4,5,6,7,8,9,10,11,12,13);
|
player.getInterfaceManager().hideTabs(0,1,2,3,4,5,6,7,8,9,10,11,12,13);
|
||||||
player.getEquipment().replace(new Item(Items.MAGIC_CARPET_5614),EquipmentContainer.SLOT_WEAPON);
|
player.getEquipment().replace(new Item(Items.MAGIC_CARPET_5614),EquipmentContainer.SLOT_WEAPON);
|
||||||
player.getPacketDispatch().sendInterfaceConfig(548,69,true);
|
player.getPacketDispatch().sendInterfaceConfig(548,69,true);
|
||||||
|
player.logoutListeners.put("magic-carpet", (pl) -> {
|
||||||
|
pl.getEquipment().replace(null,EquipmentContainer.SLOT_WEAPON);
|
||||||
|
return Unit.INSTANCE;
|
||||||
|
});
|
||||||
GameWorld.getPulser().submit(new Pulse(1, player) {
|
GameWorld.getPulser().submit(new Pulse(1, player) {
|
||||||
int count;
|
int count;
|
||||||
int index;
|
int index;
|
||||||
@@ -323,6 +328,7 @@ public final class RugMerchantDialogue extends DialoguePlugin {
|
|||||||
player.unlock();
|
player.unlock();
|
||||||
player.animate(new Animation(-1));
|
player.animate(new Animation(-1));
|
||||||
player.getConfigManager().set(499, 0);
|
player.getConfigManager().set(499, 0);
|
||||||
|
player.logoutListeners.remove("magic-carpet");
|
||||||
break;
|
break;
|
||||||
case 902:
|
case 902:
|
||||||
player.moveStep();
|
player.moveStep();
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ class CookingRewrite : InteractionListener() {
|
|||||||
init {
|
init {
|
||||||
val list = CookableItems.values().map { it.raw }.toMutableList()
|
val list = CookableItems.values().map { it.raw }.toMutableList()
|
||||||
list.add(Items.COOKED_MEAT_2142)
|
list.add(Items.COOKED_MEAT_2142)
|
||||||
|
list.add(RAW_BEEF_2132)
|
||||||
|
list.add(SEAWEED_401)
|
||||||
RAW_FOODS = list.toIntArray()
|
RAW_FOODS = list.toIntArray()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,11 +32,11 @@ class CookingRewrite : InteractionListener() {
|
|||||||
val range = obj.name.toLowerCase().contains("range")
|
val range = obj.name.toLowerCase().contains("range")
|
||||||
when (item.id) {
|
when (item.id) {
|
||||||
RAW_BEEF_2132 -> if (range) {
|
RAW_BEEF_2132 -> if (range) {
|
||||||
player.dialogueInterpreter.open(CookingDialogue(item,9436,true,obj))
|
player.dialogueInterpreter.open(CookingDialogue(item.id,9436,true,obj))
|
||||||
return@onUseWith true
|
return@onUseWith true
|
||||||
}
|
}
|
||||||
SEAWEED_401 -> if (range) {
|
SEAWEED_401 -> if (range) {
|
||||||
player.dialogueInterpreter.open(CookingDialogue(item,1781,false,obj))
|
player.dialogueInterpreter.open(CookingDialogue(item.id,1781,false,obj))
|
||||||
return@onUseWith true
|
return@onUseWith true
|
||||||
}
|
}
|
||||||
BREAD_DOUGH_2307, UNCOOKED_CAKE_1889 -> if (!range) {
|
BREAD_DOUGH_2307, UNCOOKED_CAKE_1889 -> if (!range) {
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ class DukeHoracioDialogue(player: Player? = null) : DialoguePlugin(player) {
|
|||||||
if (!sendChoices()) {
|
if (!sendChoices()) {
|
||||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Greetings. Welcome to my castle.")
|
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Greetings. Welcome to my castle.")
|
||||||
}
|
}
|
||||||
stage = 0
|
|
||||||
// Speak to the Duke of Lumbridge
|
// Speak to the Duke of Lumbridge
|
||||||
player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 0, 2)
|
player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 0, 2)
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package rs09.game.content.jobs
|
package rs09.game.content.jobs
|
||||||
|
|
||||||
|
import GatheringJobs
|
||||||
|
import SlayingJob
|
||||||
|
import core.game.node.entity.npc.NPC
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
import rs09.game.content.dialogue.DialogueFile
|
import rs09.game.content.dialogue.DialogueFile
|
||||||
import rs09.tools.END_DIALOGUE
|
import rs09.tools.END_DIALOGUE
|
||||||
@@ -7,14 +10,32 @@ import rs09.tools.END_DIALOGUE
|
|||||||
class CancelJobDialogueFile : DialogueFile() {
|
class CancelJobDialogueFile : DialogueFile() {
|
||||||
override fun handle(componentID: Int, buttonID: Int) {
|
override fun handle(componentID: Int, buttonID: Int) {
|
||||||
when(stage){
|
when(stage){
|
||||||
0 -> npc("Would you like to cancel your job?","It will cost 500 coins.").also { stage++ }
|
0 -> options("Check Job Progress","Cancel Job").also { stage++ }
|
||||||
1 -> options("Yes, please.","No, thanks.").also { stage++ }
|
1 -> when(buttonID){
|
||||||
2 -> when(buttonID){
|
1 -> player("How am I doing on my job?").also { stage++ }
|
||||||
1 -> player("Yes, please.").also{ stage = 10 }
|
2 -> player("I'd like to cancel my job.").also { stage = 10 }
|
||||||
2 -> player("No, thanks.").also { stage = 20 }
|
|
||||||
}
|
}
|
||||||
10 -> npc("Alright then, hand over the money.").also { stage++ }
|
2 -> {
|
||||||
11 -> if(player!!.inventory.contains(995,500)){
|
val amt = player!!.getAttribute("jobs:original_amount",0)
|
||||||
|
val type = player!!.getAttribute("jobs:type",0)
|
||||||
|
val jobId = player!!.getAttribute("jobs:id",0)
|
||||||
|
val needed = player!!.getAttribute("jobs:amount",0)
|
||||||
|
if(type == 0){
|
||||||
|
player!!.dialogueInterpreter.sendItemMessage(GatheringJobs.values()[jobId].itemId,"You still need to gather ${needed} more.")
|
||||||
|
} else {
|
||||||
|
player!!.dialogueInterpreter.sendDialogue("You still need to kill $needed more ${NPC(SlayingJob.values()[jobId].ids[0]).name.toLowerCase()}.")
|
||||||
|
}
|
||||||
|
stage = END_DIALOGUE
|
||||||
|
}
|
||||||
|
|
||||||
|
10 -> npc("It will cost 500 coins.").also { stage++ }
|
||||||
|
11 -> options("Yes, please.","No, thanks.").also { stage++ }
|
||||||
|
12 -> when(buttonID){
|
||||||
|
1 -> player("Yes, please.").also{ stage = 20 }
|
||||||
|
2 -> player("No, thanks.").also { stage = 30 }
|
||||||
|
}
|
||||||
|
20 -> npc("Alright then, hand over the money.").also { stage++ }
|
||||||
|
21 -> if(player!!.inventory.contains(995,500)){
|
||||||
player("Here you go.")
|
player("Here you go.")
|
||||||
player!!.inventory.remove(Item(995,500))
|
player!!.inventory.remove(Item(995,500))
|
||||||
player!!.removeAttribute("jobs:id")
|
player!!.removeAttribute("jobs:id")
|
||||||
@@ -27,8 +48,8 @@ class CancelJobDialogueFile : DialogueFile() {
|
|||||||
stage++
|
stage++
|
||||||
}
|
}
|
||||||
|
|
||||||
12 -> npc("Ah, that sucks! Get to work.").also { stage = END_DIALOGUE }
|
22 -> npc("Ah, that sucks! Get to work.").also { stage = END_DIALOGUE }
|
||||||
20 -> npc("Alright then, get to work!").also { stage = END_DIALOGUE }
|
30 -> npc("Alright then, get to work!").also { stage = END_DIALOGUE }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,6 +89,7 @@ object JobManager {
|
|||||||
player.removeAttribute("jobs:original_amount")
|
player.removeAttribute("jobs:original_amount")
|
||||||
player.removeAttribute("jobs:type")
|
player.removeAttribute("jobs:type")
|
||||||
player.incrementAttribute("/save:jobs:dailyAmt",1)
|
player.incrementAttribute("/save:jobs:dailyAmt",1)
|
||||||
|
System.out.println("Complete amount: ${player.getAttribute("jobs:dailyAmt",0)}")
|
||||||
if(player.getAttribute("jobs:dailyAmt",0) == 3){
|
if(player.getAttribute("jobs:dailyAmt",0) == 3){
|
||||||
player.setAttribute("/save:jobs:reset_time",System.currentTimeMillis() + TimeUnit.HOURS.toMillis(24))
|
player.setAttribute("/save:jobs:reset_time",System.currentTimeMillis() + TimeUnit.HOURS.toMillis(24))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class WorkForInteractionListener : InteractionListener() {
|
|||||||
var amount = 0
|
var amount = 0
|
||||||
var jobId = 0
|
var jobId = 0
|
||||||
|
|
||||||
if(player.getAttribute("jobs:reset_time",0L) < System.currentTimeMillis()){
|
if(player.getAttribute("jobs:reset_time",Long.MAX_VALUE) < System.currentTimeMillis()){
|
||||||
player.setAttribute("/save:jobs:dailyAmt",0)
|
player.setAttribute("/save:jobs:dailyAmt",0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,6 +169,17 @@ object UseWithPatchHandler{
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(patch.type != PatchType.FRUIT_TREE && patch.type != PatchType.TREE){
|
||||||
|
if(!player.inventory.contains(Items.SEED_DIBBER_5343,1)){
|
||||||
|
player.sendMessage("You need a seed dibber to plant that.")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(!player.inventory.contains(Items.SPADE_952,1)){
|
||||||
|
player.sendMessage("You need a spade to plant that.")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
player.lock()
|
player.lock()
|
||||||
if(player.inventory.remove(plantItem)) {
|
if(player.inventory.remove(plantItem)) {
|
||||||
player.animator.animate(Animation(2291))
|
player.animator.animate(Animation(2291))
|
||||||
|
|||||||
@@ -101,6 +101,11 @@ class ModernListeners : SpellListener("modern"){
|
|||||||
sendTeleport(player,74.0, Location.create(2754, 2784, 0))
|
sendTeleport(player,74.0, Location.create(2754, 2784, 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onCast(Modern.TELEPORT_TO_HOUSE,NONE){player, _ ->
|
||||||
|
requires(player,40, arrayOf(Item(Items.LAW_RUNE_563), Item(Items.AIR_RUNE_556), Item(Items.EARTH_RUNE_557)))
|
||||||
|
attemptHouseTeleport(player)
|
||||||
|
}
|
||||||
|
|
||||||
onCast(Modern.LOW_ALCHEMY,ITEM){player, node ->
|
onCast(Modern.LOW_ALCHEMY,ITEM){player, node ->
|
||||||
val item = node?.asItem() ?: return@onCast
|
val item = node?.asItem() ?: return@onCast
|
||||||
requires(player,21, arrayOf(Item(Items.FIRE_RUNE_554,3),Item(Items.NATURE_RUNE_561)))
|
requires(player,21, arrayOf(Item(Items.FIRE_RUNE_554,3),Item(Items.NATURE_RUNE_561)))
|
||||||
@@ -243,4 +248,17 @@ class ModernListeners : SpellListener("modern"){
|
|||||||
addXP(player,xp)
|
addXP(player,xp)
|
||||||
setDelay(player,true)
|
setDelay(player,true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun attemptHouseTeleport(player: Player){
|
||||||
|
val loc = player.houseManager.location.exitLocation
|
||||||
|
if(loc == null){
|
||||||
|
player.sendMessage("You do not have a house whose portal you can teleport to.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
player.teleporter.send(loc,TeleportManager.TeleportType.NORMAL)
|
||||||
|
removeRunes(player)
|
||||||
|
addXP(player,30.0)
|
||||||
|
setDelay(player,true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -29,6 +29,7 @@ enum class Pickpockets(val ids: IntArray, val requiredLevel: Int, val low: Doubl
|
|||||||
WeightedItem(Items.HAM_HOOD_4302,1,1,0.25),
|
WeightedItem(Items.HAM_HOOD_4302,1,1,0.25),
|
||||||
WeightedItem(Items.HAM_LOGO_4306,1,1,0.25),
|
WeightedItem(Items.HAM_LOGO_4306,1,1,0.25),
|
||||||
WeightedItem(Items.HAM_ROBE_4300,1,1,0.25),
|
WeightedItem(Items.HAM_ROBE_4300,1,1,0.25),
|
||||||
|
WeightedItem(Items.HAM_SHIRT_4298,1,1,0.25),
|
||||||
WeightedItem(Items.BOOTS_4310,1,1,1.0),
|
WeightedItem(Items.BOOTS_4310,1,1,1.0),
|
||||||
WeightedItem(Items.GLOVES_4308,1,1,1.0),
|
WeightedItem(Items.GLOVES_4308,1,1,1.0),
|
||||||
WeightedItem(Items.BRONZE_PICKAXE_1265,1,1,5.0),
|
WeightedItem(Items.BRONZE_PICKAXE_1265,1,1,5.0),
|
||||||
@@ -55,6 +56,7 @@ enum class Pickpockets(val ids: IntArray, val requiredLevel: Int, val low: Doubl
|
|||||||
WeightedItem(Items.HAM_CLOAK_4304,1,1,0.25),
|
WeightedItem(Items.HAM_CLOAK_4304,1,1,0.25),
|
||||||
WeightedItem(Items.HAM_HOOD_4302,1,1,0.25),
|
WeightedItem(Items.HAM_HOOD_4302,1,1,0.25),
|
||||||
WeightedItem(Items.HAM_LOGO_4306,1,1,0.25),
|
WeightedItem(Items.HAM_LOGO_4306,1,1,0.25),
|
||||||
|
WeightedItem(Items.HAM_SHIRT_4298,1,1,0.25),
|
||||||
WeightedItem(Items.HAM_ROBE_4300,1,1,0.25),
|
WeightedItem(Items.HAM_ROBE_4300,1,1,0.25),
|
||||||
WeightedItem(Items.BOOTS_4310,1,1,1.0),
|
WeightedItem(Items.BOOTS_4310,1,1,1.0),
|
||||||
WeightedItem(Items.GLOVES_4308,1,1,1.0),
|
WeightedItem(Items.GLOVES_4308,1,1,1.0),
|
||||||
|
|||||||
@@ -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.Seedling
|
|
||||||
import rs09.game.node.entity.state.newsys.PlayerState
|
|
||||||
import rs09.game.node.entity.state.newsys.State
|
|
||||||
import core.game.node.item.Item
|
import core.game.node.item.Item
|
||||||
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.Seedling
|
||||||
|
import rs09.game.node.entity.state.newsys.PlayerState
|
||||||
|
import rs09.game.node.entity.state.newsys.State
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
@PlayerState("seedling")
|
@PlayerState("seedling")
|
||||||
@@ -17,7 +17,7 @@ class SeedlingState(player: Player? = null) : State(player) {
|
|||||||
val seedlings = ArrayList<Seedling>()
|
val seedlings = ArrayList<Seedling>()
|
||||||
|
|
||||||
fun addSeedling(seedling: Int){
|
fun addSeedling(seedling: Int){
|
||||||
seedlings.add(Seedling(seedling, System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(5),seedling + 6))
|
seedlings.add(Seedling(seedling, System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(5),seedling + if(seedling > 5400) 8 else 6))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun save(root: JSONObject) {
|
override fun save(root: JSONObject) {
|
||||||
|
|||||||
@@ -1,54 +1,2 @@
|
|||||||
#!/bin/sh
|
cd Server
|
||||||
origDir=$(pwd)
|
gradle jar
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
echo "Usage: $0 type"
|
|
||||||
echo "Available types: client, server, ms, all"
|
|
||||||
exit
|
|
||||||
else type=$1
|
|
||||||
fi
|
|
||||||
|
|
||||||
build_server() {
|
|
||||||
echo "Building server..."
|
|
||||||
cd Server/ || exit
|
|
||||||
gradle build || exit
|
|
||||||
cd "$origDir" || exit
|
|
||||||
tar xvf Server/build/distributions/Server.tar || exit
|
|
||||||
}
|
|
||||||
build_client() {
|
|
||||||
echo "Building client..."
|
|
||||||
echo "Change IP from 127.0.0.1?(y/N)"
|
|
||||||
read -r changeIP
|
|
||||||
if [ "$changeIP" = "y" ]; then
|
|
||||||
echo "Enter desired IP address:"
|
|
||||||
read -r newIP
|
|
||||||
echo "target_ip_addr:$newIP" > Client/src/main/resources/client.conf
|
|
||||||
fi
|
|
||||||
cd Client/ || exit
|
|
||||||
gradle build || exit
|
|
||||||
cd "$origDir" || exit
|
|
||||||
tar xvf Client/build/distributions/Client.tar || exit
|
|
||||||
cp Client/build/libs/client-1.0.0.jar Client/bin/2009scape.jar || exit
|
|
||||||
echo "Client jarfile can be found at Client/bin/2009scape.jar"
|
|
||||||
}
|
|
||||||
build_ms() {
|
|
||||||
echo "Building management server..."
|
|
||||||
cd Management-Server/ || exit
|
|
||||||
gradle build || exit
|
|
||||||
cd "$origDir" || exit
|
|
||||||
tar xvf Management-Server/build/distributions/Management-Server.tar || exit
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$type" = "client" ]; then
|
|
||||||
build_client
|
|
||||||
elif [ "$type" = "server" ]; then
|
|
||||||
build_server
|
|
||||||
elif [ "$type" = "ms" ]; then
|
|
||||||
build_ms
|
|
||||||
elif [ "$type" = "all" ]; then
|
|
||||||
build_ms
|
|
||||||
build_server
|
|
||||||
build_client
|
|
||||||
else echo "Invalid type. Should be one of: client, server, ms, all"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user