Implemented Desert Treasure quest
This commit is contained in:
@@ -42749,7 +42749,7 @@
|
||||
"equipment_slot": "12"
|
||||
},
|
||||
{
|
||||
"examine": "Frank's shiny silver coated pot.",
|
||||
"examine": "A silver pot made by Ruantun.",
|
||||
"durability": null,
|
||||
"name": "Silver pot",
|
||||
"tradeable": "false",
|
||||
@@ -42766,7 +42766,7 @@
|
||||
"id": "4659"
|
||||
},
|
||||
{
|
||||
"examine": "Frank's shiny silver coated pot.",
|
||||
"examine": "A silver pot made by Ruantun filled with your blood.",
|
||||
"durability": null,
|
||||
"name": "Silver pot",
|
||||
"tradeable": "false",
|
||||
@@ -42775,7 +42775,7 @@
|
||||
"id": "4660"
|
||||
},
|
||||
{
|
||||
"examine": "A silver pot made by Ruantun and blessed on Entrana.",
|
||||
"examine": "A blessed silver pot made by Ruantun filled with your blood.",
|
||||
"durability": null,
|
||||
"name": "Blessed pot",
|
||||
"weight": "2",
|
||||
@@ -42783,7 +42783,7 @@
|
||||
"id": "4661"
|
||||
},
|
||||
{
|
||||
"examine": "Frank's shiny silver coated pot.",
|
||||
"examine": "A silver pot made by Ruantun filled with blood and garlic.",
|
||||
"durability": null,
|
||||
"name": "Silver pot",
|
||||
"tradeable": "false",
|
||||
@@ -42792,7 +42792,7 @@
|
||||
"id": "4662"
|
||||
},
|
||||
{
|
||||
"examine": "A silver pot made by Ruantun and blessed on Entrana.",
|
||||
"examine": "A blessed silver pot filled with blood and garlic.",
|
||||
"durability": null,
|
||||
"name": "Blessed pot",
|
||||
"weight": "2",
|
||||
@@ -42800,7 +42800,7 @@
|
||||
"id": "4663"
|
||||
},
|
||||
{
|
||||
"examine": "Frank's shiny silver coated pot.",
|
||||
"examine": "A silver pot made by Ruantun filled with blood and spices.",
|
||||
"durability": null,
|
||||
"name": "Silver pot",
|
||||
"tradeable": "false",
|
||||
@@ -42809,7 +42809,7 @@
|
||||
"id": "4664"
|
||||
},
|
||||
{
|
||||
"examine": "A silver pot made by Ruantun and blessed on Entrana.",
|
||||
"examine": "A blessed silver pot filled with blood and spices.",
|
||||
"durability": null,
|
||||
"name": "Blessed pot",
|
||||
"weight": "2",
|
||||
@@ -42817,7 +42817,7 @@
|
||||
"id": "4665"
|
||||
},
|
||||
{
|
||||
"examine": "Frank's shiny silver coated pot.",
|
||||
"examine": "A silver pot made by Ruantun filled with blood, garlic and spices.",
|
||||
"durability": null,
|
||||
"name": "Silver pot",
|
||||
"tradeable": "false",
|
||||
@@ -42826,7 +42826,7 @@
|
||||
"id": "4666"
|
||||
},
|
||||
{
|
||||
"examine": "A silver pot made by Ruantun and blessed on Entrana.",
|
||||
"examine": "A blessed silver pot filled with blood, garlic and spices.",
|
||||
"durability": null,
|
||||
"name": "Blessed pot",
|
||||
"weight": "2",
|
||||
|
||||
@@ -12887,7 +12887,7 @@
|
||||
},
|
||||
{
|
||||
"examine": "It looks very hungry!",
|
||||
"melee_animation": "7183",
|
||||
"melee_animation": "1264",
|
||||
"slayer_exp": "50",
|
||||
"death_animation": "7185",
|
||||
"name": "Vampire",
|
||||
@@ -12901,6 +12901,8 @@
|
||||
"attack_level": "52"
|
||||
},
|
||||
{
|
||||
"examine": "It looks very hungry!",
|
||||
"melee_animation": "1264",
|
||||
"slayer_exp": "40",
|
||||
"name": "Vampire",
|
||||
"defence_level": "1",
|
||||
@@ -12913,6 +12915,7 @@
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "It looks very hungry!",
|
||||
"name": "Vampire",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
@@ -19944,49 +19947,70 @@
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "A tough-looking criminal.",
|
||||
"melee_animation": "412",
|
||||
"range_animation": "412",
|
||||
"examine": "Ice warrior.",
|
||||
"melee_animation": "440",
|
||||
"range_animation": "440",
|
||||
"attack_speed": "5",
|
||||
"defence_animation": "404",
|
||||
"magic_animation": "412",
|
||||
"death_animation": "9055",
|
||||
"name": "Kamil",
|
||||
"defence_level": "20",
|
||||
"defence_level": "135",
|
||||
"safespot": null,
|
||||
"lifepoints": "50",
|
||||
"strength_level": "55",
|
||||
"lifepoints": "130",
|
||||
"strength_level": "80",
|
||||
"id": "1913",
|
||||
"bonuses": "0,60,0,0,0,35,60,35,0,0,0,100,0,0,0",
|
||||
"range_level": "1",
|
||||
"attack_level": "20"
|
||||
"attack_level": "190"
|
||||
},
|
||||
{
|
||||
"melee_animation": "422",
|
||||
"examine": "A vampyre warrior of Zamorak.",
|
||||
"melee_animation": "1264",
|
||||
"respawn_delay": "60",
|
||||
"defence_animation": "425",
|
||||
"death_animation": "836",
|
||||
"name": "Dessous",
|
||||
"defence_level": "1",
|
||||
"defence_level": "99",
|
||||
"safespot": null,
|
||||
"lifepoints": "200",
|
||||
"strength_level": "1",
|
||||
"strength_level": "99",
|
||||
"id": "1914",
|
||||
"aggressive": "true",
|
||||
"bonuses": "0,0,50,0,0,10,150,150,0,0,0,50,0,0,0",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
"attack_level": "99"
|
||||
},
|
||||
{
|
||||
"melee_animation": "422",
|
||||
"examine": "A vampyre warrior of Zamorak.",
|
||||
"melee_animation": "1264",
|
||||
"respawn_delay": "60",
|
||||
"defence_animation": "425",
|
||||
"death_animation": "836",
|
||||
"name": "Dessous",
|
||||
"defence_level": "1",
|
||||
"defence_level": "99",
|
||||
"safespot": null,
|
||||
"lifepoints": "200",
|
||||
"strength_level": "1",
|
||||
"strength_level": "99",
|
||||
"id": "1915",
|
||||
"aggressive": "true",
|
||||
"bonuses": "0,0,50,0,0,10,150,150,0,0,0,50,0,0,0",
|
||||
"range_level": "1",
|
||||
"attack_level": "99"
|
||||
},
|
||||
{
|
||||
"examine": "Luckily, I can't see much of his face.",
|
||||
"melee_animation": "0",
|
||||
"range_animation": "0",
|
||||
"defence_animation": "0",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "0",
|
||||
"name": "Ruantun",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
"lifepoints": "10",
|
||||
"strength_level": "1",
|
||||
"id": "1916",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
},
|
||||
@@ -20040,6 +20064,22 @@
|
||||
"range_level": "1",
|
||||
"attack_level": "58"
|
||||
},
|
||||
{
|
||||
"examine": "One of Morytania's vampyric nobility.",
|
||||
"melee_animation": "0",
|
||||
"range_animation": "0",
|
||||
"defence_animation": "0",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "0",
|
||||
"name": "Malak",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
"lifepoints": "10",
|
||||
"strength_level": "1",
|
||||
"id": "1920",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "Looks like a rough-and-ready type.",
|
||||
"melee_animation": "0",
|
||||
@@ -20238,6 +20278,98 @@
|
||||
"range_level": "1",
|
||||
"attack_level": "64"
|
||||
},
|
||||
{
|
||||
"examine": "A troll frozen in a block of ice.",
|
||||
"melee_animation": "0",
|
||||
"range_animation": "0",
|
||||
"respawn_delay": "1",
|
||||
"defence_animation": "0",
|
||||
"weakness": "9",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "0",
|
||||
"name": "Ice block",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
"lifepoints": "10",
|
||||
"strength_level": "1",
|
||||
"id": "1943",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "A troll frozen in a block of ice.",
|
||||
"melee_animation": "0",
|
||||
"range_animation": "0",
|
||||
"respawn_delay": "1",
|
||||
"defence_animation": "0",
|
||||
"weakness": "9",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "0",
|
||||
"name": "Ice block",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
"lifepoints": "10",
|
||||
"strength_level": "1",
|
||||
"id": "1944",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "A troll frozen in a block of ice.",
|
||||
"melee_animation": "0",
|
||||
"range_animation": "0",
|
||||
"respawn_delay": "1",
|
||||
"defence_animation": "0",
|
||||
"weakness": "9",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "0",
|
||||
"name": "Ice block",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
"lifepoints": "10",
|
||||
"strength_level": "1",
|
||||
"id": "1945",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "A troll frozen in a block of ice.",
|
||||
"melee_animation": "0",
|
||||
"range_animation": "0",
|
||||
"respawn_delay": "1",
|
||||
"defence_animation": "0",
|
||||
"weakness": "9",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "0",
|
||||
"name": "Ice block",
|
||||
"defence_level": "1",
|
||||
"safespot": null,
|
||||
"lifepoints": "10",
|
||||
"strength_level": "1",
|
||||
"id": "1946",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
},
|
||||
{
|
||||
"examine": "An ice troll.",
|
||||
"name": "Troll father",
|
||||
"id": "1947"
|
||||
},
|
||||
{
|
||||
"examine": "An ice troll.",
|
||||
"name": "Troll father",
|
||||
"id": "1948"
|
||||
},
|
||||
{
|
||||
"examine": "An ice troll.",
|
||||
"name": "Troll mother",
|
||||
"id": "1949"
|
||||
},
|
||||
{
|
||||
"examine": "An ice troll.",
|
||||
"name": "Troll mother",
|
||||
"id": "1950"
|
||||
},
|
||||
{
|
||||
"examine": "Not a man's best friend.",
|
||||
"melee_animation": "6579",
|
||||
@@ -20384,17 +20516,17 @@
|
||||
"magic_animation": "0",
|
||||
"death_animation": "5555",
|
||||
"name": "Mummy",
|
||||
"defence_level": "55",
|
||||
"defence_level": "90",
|
||||
"safespot": null,
|
||||
"lifepoints": "78",
|
||||
"strength_level": "55",
|
||||
"lifepoints": "90",
|
||||
"strength_level": "90",
|
||||
"id": "1961",
|
||||
"aggressive": "true",
|
||||
"range_level": "1",
|
||||
"attack_level": "55"
|
||||
"attack_level": "90"
|
||||
},
|
||||
{
|
||||
"examine": "Spooky",
|
||||
"examine": "Spooky, bandaged dead dude.",
|
||||
"melee_animation": "5549",
|
||||
"range_animation": "0",
|
||||
"defence_animation": "0",
|
||||
@@ -20402,14 +20534,15 @@
|
||||
"magic_animation": "0",
|
||||
"death_animation": "5555",
|
||||
"name": "Mummy",
|
||||
"defence_level": "55",
|
||||
"defence_level": "90",
|
||||
"poison_immune": "true",
|
||||
"safespot": null,
|
||||
"lifepoints": "78",
|
||||
"strength_level": "55",
|
||||
"lifepoints": "90",
|
||||
"strength_level": "90",
|
||||
"id": "1962",
|
||||
"aggressive": "true",
|
||||
"range_level": "1",
|
||||
"attack_level": "55"
|
||||
"attack_level": "90"
|
||||
},
|
||||
{
|
||||
"examine": "A victim of poor first aid.",
|
||||
@@ -20420,14 +20553,15 @@
|
||||
"magic_animation": "0",
|
||||
"death_animation": "5555",
|
||||
"name": "Mummy",
|
||||
"defence_level": "55",
|
||||
"defence_level": "90",
|
||||
"poison_immune": "true",
|
||||
"safespot": null,
|
||||
"lifepoints": "78",
|
||||
"strength_level": "55",
|
||||
"lifepoints": "90",
|
||||
"strength_level": "90",
|
||||
"id": "1963",
|
||||
"aggressive": "true",
|
||||
"range_level": "1",
|
||||
"attack_level": "55"
|
||||
"attack_level": "90"
|
||||
},
|
||||
{
|
||||
"examine": "But who's the daddy?",
|
||||
@@ -20438,13 +20572,14 @@
|
||||
"magic_animation": "0",
|
||||
"death_animation": "5555",
|
||||
"name": "Mummy",
|
||||
"defence_level": "55",
|
||||
"defence_level": "90",
|
||||
"safespot": null,
|
||||
"lifepoints": "78",
|
||||
"strength_level": "55",
|
||||
"lifepoints": "90",
|
||||
"strength_level": "90",
|
||||
"id": "1964",
|
||||
"aggressive": "true",
|
||||
"range_level": "1",
|
||||
"attack_level": "55"
|
||||
"attack_level": "90"
|
||||
},
|
||||
{
|
||||
"examine": "A tightly-wrapped monster.",
|
||||
@@ -20484,19 +20619,20 @@
|
||||
"examine": "I think they're some kind of beetle...",
|
||||
"melee_animation": "1948",
|
||||
"range_animation": "0",
|
||||
"attack_speed": "3",
|
||||
"poisonous": "true",
|
||||
"defence_animation": "0",
|
||||
"defence_animation": "1946",
|
||||
"weakness": "7",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "1946",
|
||||
"death_animation": "5464",
|
||||
"name": "Scarabs",
|
||||
"defence_level": "62",
|
||||
"defence_level": "10",
|
||||
"safespot": null,
|
||||
"lifepoints": "88",
|
||||
"strength_level": "62",
|
||||
"lifepoints": "25",
|
||||
"strength_level": "2",
|
||||
"id": "1969",
|
||||
"range_level": "1",
|
||||
"attack_level": "62"
|
||||
"attack_level": "255"
|
||||
},
|
||||
{
|
||||
"examine": "A wandering merchant.",
|
||||
@@ -20526,6 +20662,45 @@
|
||||
"range_level": "1",
|
||||
"attack_level": "60"
|
||||
},
|
||||
{
|
||||
"examine": "The warrior of darkness.",
|
||||
"melee_animation": "440",
|
||||
"range_animation": "0",
|
||||
"respawn_delay": "60",
|
||||
"defence_animation": "0",
|
||||
"weakness": "0",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "836",
|
||||
"name": "Damis",
|
||||
"defence_level": "90",
|
||||
"safespot": null,
|
||||
"lifepoints": "90",
|
||||
"strength_level": "90",
|
||||
"id": "1974",
|
||||
"bonuses": "0,0,0,0,0,60,60,60,60,60,0,80,0,0,0",
|
||||
"range_level": "1",
|
||||
"attack_level": "90"
|
||||
},
|
||||
{
|
||||
"examine": "The warrior of darkness.",
|
||||
"melee_animation": "440",
|
||||
"range_animation": "0",
|
||||
"attack_speed": "3",
|
||||
"respawn_delay": "60",
|
||||
"defence_animation": "0",
|
||||
"weakness": "0",
|
||||
"magic_animation": "0",
|
||||
"death_animation": "836",
|
||||
"name": "Damis",
|
||||
"defence_level": "160",
|
||||
"safespot": null,
|
||||
"lifepoints": "200",
|
||||
"strength_level": "100",
|
||||
"id": "1975",
|
||||
"bonuses": "0,0,0,0,0,100,100,100,80,120,0,100,0,0,0",
|
||||
"range_level": "1",
|
||||
"attack_level": "160"
|
||||
},
|
||||
{
|
||||
"examine": "Looks hungry!",
|
||||
"melee_animation": "6565",
|
||||
@@ -20545,19 +20720,22 @@
|
||||
"attack_level": "48"
|
||||
},
|
||||
{
|
||||
"examine": "Zamorak's warrior of fire.",
|
||||
"melee_animation": "799",
|
||||
"magic_level": "100",
|
||||
"respawn_delay": "60",
|
||||
"defence_animation": "434",
|
||||
"death_animation": "836",
|
||||
"name": "Fareed",
|
||||
"defence_level": "1",
|
||||
"defence_level": "135",
|
||||
"safespot": null,
|
||||
"lifepoints": "130",
|
||||
"strength_level": "1",
|
||||
"strength_level": "120",
|
||||
"id": "1977",
|
||||
"aggressive": "true",
|
||||
"range_level": "1",
|
||||
"attack_level": "1"
|
||||
"bonuses": "0,0,0,0,0,100,100,100,0,0,0,120,0,0,0",
|
||||
"range_level": "100",
|
||||
"attack_level": "190"
|
||||
},
|
||||
{
|
||||
"examine": "A malnourished worker.",
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "110",
|
||||
"loc_data": "{2564,9887,0,1,4}-{2581,9897,0,1,1}-{2577,9888,0,1,1}-{3234,5497,0,1,1}-{3305,9400,0,1,1}-{3296,9378,0,1,3}-{3050,10337,0,1,4}-{3047,10340,0,1,4}-{3048,10346,0,1,4}-{3048,10346,0,1,3}-"
|
||||
"loc_data": "{2564,9887,0,1,4}-{2581,9897,0,1,1}-{2577,9888,0,1,1}-{3234,5497,0,1,1}-{3305,9400,0,1,1}-{3244,9356,0,1,1}-{3252,9370,0,1,1}-{3294,9375,0,1,3}-{3050,10337,0,1,4}-{3047,10340,0,1,4}-{3048,10346,0,1,4}-{3048,10346,0,1,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "111",
|
||||
@@ -2393,7 +2393,11 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "839",
|
||||
"loc_data": "{3153,3035,0,1,3}-"
|
||||
"loc_data": "{3265,3066,0,1,0}-{3267,3066,0,1,0}-{3310,3068,0,1,0}-{3322,3011,0,1,0}-{3322,3052,0,1,0}-{3324,3030,0,1,0}-{3150,3044,0,1,0}-{3172,3009,0,1,0}-{3197,3012,0,1,0}-{3198,3040,0,1,0}-{3217,3092,0,1,0}-{3235,3074,0,1,0}-{3252,3125,0,1,0}-{3258,3078,0,1,0}-{3237,2968,0,1,0}-{3224,3013,0,1,0}-{3225,3034,0,1,0}-{3226,3060,0,1,0}-{3250,3057,0,1,0}-{3283,3108,0,1,0}-{3323,3094,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "840",
|
||||
"loc_data": "{3268,3052,0,1,0}-{3281,3056,0,1,0}-{3307,3055,0,1,0}-{3318,3020,0,1,0}-{3318,3040,0,1,0}-{3190,3054,0,1,0}-{3192,3016,0,1,0}-{3217,3111,0,1,0}-{3222,3086,0,1,0}-{3238,3101,0,1,0}-{3244,3080,0,1,0}-{3253,3116,0,1,0}-{3255,3095,0,1,0}-{3237,3000,0,1,0}-{3245,2960,0,1,0}-{3208,3032,0,1,0}-{3217,3064,0,1,0}-{3238,3015,0,1,0}-{3258,3063,0,1,0}-{3267,3077,0,1,0}-{3269,3110,0,1,0}-{3275,3094,0,1,0}-{3291,3078,0,1,0}-{3291,3100,0,1,0}-{3305,3089,0,1,0}-{3318,3078,0,1,0}-{3321,3104,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "841",
|
||||
@@ -2733,7 +2737,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "1019",
|
||||
"loc_data": "{3187,5555,0,1,4}-{3190,5563,0,1,1}-{3193,5555,0,1,3}-{3213,9377,0,1,3}-{3209,9397,0,1,4}-{3245,9401,0,1,6}-{3237,9402,0,1,2}-{3207,9349,0,1,3}-{3220,9347,0,1,6}-{3233,9359,0,1,4}-{3235,9354,0,0,6}-{3259,9370,0,1,1}-{3258,9387,0,1,6}-{2707,9880,0,1,0}-{2711,9876,0,1,0}-{2712,9871,0,1,0}-{2715,9874,0,1,0}-{2720,9871,0,1,0}-{2717,9880,0,1,0}-{2722,9879,0,1,0}-{2723,9875,0,1,0}-{3278,9368,0,1,5}-{3271,9359,0,1,3}-{3287,9359,0,1,5}-{3301,9394,0,1,5}-{3318,9352,0,1,5}-"
|
||||
"loc_data": "{3187,5555,0,1,4}-{3190,5563,0,1,1}-{3193,5555,0,1,3} -{3213,9377,0,1,3}-{3209,9397,0,1,4}-{3245,9401,0,1,6}- {3237,9402,0,1,2}-{3207,9349,0,1,3}-{3220,9347,0,1,6} -{3233,9359,0,1,4}-{3235,9354,0,0,6}-{3259,9370,0,1,1}- {3258,9387,0,1,6}-{2707,9880,0,1,0}-{2711,9876,0,1,0}- {2712,9871,0,1,0}-{2715,9874,0,1,0}-{2720,9871,0,1,0} -{2717,9880,0,1,0}-{2722,9879,0,1,0}-{2723,9875,0,1,0}- {3278,9368,0,1,5}-{3271,9359,0,1,3}-{3287,9359,0,1,5}- {3301,9394,0,1,5}-{3318,9352,0,1,5}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1020",
|
||||
@@ -3861,7 +3865,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "1585",
|
||||
"loc_data": "{2575,9892,0,1,6}-{2666,9482,0,0,5}-{2641,9563,2,0,5}-{3257,5523,0,1,1}-{3204,5516,0,1,3}-"
|
||||
"loc_data": "{2575,9892,0,1,6}-{2666,9482,0,0,5}-{2641,9563,2,0,5}-{3257,5523,0,1,1}-{3204,5516,0,1,3}-{3244,9369,0,1,3}-{3252,9359,0,1,3}-{3306,9400,0,1,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1586",
|
||||
@@ -4009,7 +4013,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "1633",
|
||||
"loc_data": "{1837,3244,0,1,0}-{1836,3250,0,1,0}-{1845,3251,0,1,0}-{1845,3247,0,1,0}-{1849,3241,0,1,0}-{1853,3247,0,1,0}-{1848,3254,0,1,0}-{1858,3251,0,1,0}-{1935,3217,0,1,0}-{1933,3209,0,1,0}-{1930,3208,0,1,0}-{1929,3217,0,1,0}-{1927,3219,0,1,0}-{1924,3211,0,1,0}-{1920,3216,0,1,0}-{1925,3213,0,1,0}-{3263,9399,0,1,3}-{3274,9397,0,1,1}-{3275,9393,0,1,6}-{3271,9384,0,1,0}-{3270,9380,0,1,2}-{3283,9378,0,1,6}-{3285,9386,0,1,5}-{3284,9401,0,1,4}-{3278,9353,0,1,1}-{3299,9380,0,1,1}-{3319,9402,0,1,1}-{3305,9350,0,1,4}-{2761,10007,0,1,0}-{2757,10010,0,1,3}-{2763,10000,0,1,5}-{2760,10011,0,1,0}-{2761,9997,0,1,4}-"
|
||||
"loc_data": "{1837,3244,0,1,0}-{1836,3250,0,1,0}-{1845,3251,0,1,0}-{1845,3247,0,1,0}-{1849,3241,0,1,0}-{1853,3247,0,1,0}-{1848,3254,0,1,0}-{1858,3251,0,1,0}-{1935,3217,0,1,0}-{1933,3209,0,1,0}-{1930,3208,0,1,0}-{1929,3217,0,1,0}-{1927,3219,0,1,0}-{1924,3211,0,1,0}-{1920,3216,0,1,0}-{1925,3213,0,1,0}-{3263,9399,0,1,3}-{3274,9397,0,1,1}-{3275,9393,0,1,6}-{3271,9384,0,1,0}-{3270,9380,0,1,2}-{3283,9378,0,1,6}-{3285,9386,0,1,5}-{3284,9401,0,1,4}-{3278,9353,0,1,1}-{3299,9380,0,1,1}-{3319,9402,0,1,1}-{3305,9350,0,1,4}-{3248,9374,0,1,3}-{3253,9363,0,1,3}-{3249,9355,0,1,3}-{2761,10007,0,1,0}-{2757,10010,0,1,3}-{2763,10000,0,1,5}-{2760,10011,0,1,0}-{2761,9997,0,1,4}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1634",
|
||||
@@ -4491,6 +4495,10 @@
|
||||
"npc_id": "1873",
|
||||
"loc_data": "{3343,2962,0,1,0}-{3343,2964,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1874",
|
||||
"loc_data": "{3371,9301,0,1,0}-{3371,9303,0,1,0}-{3371,9305,0,1,0}-{3371,9307,0,1,0}-{3371,9309,0,1,0}-{3373,9301,0,1,0}-{3373,9303,0,1,0}-{3373,9306,0,1,0}-{3373,9308,0,1,0}-{3375,9301,0,1,0}-{3375,9303,0,1,0}-{3375,9305,0,1,0}-{3375,9307,0,1,0}-{3375,9309,0,1,0}-{3403,2963,0,1,0}-{3429,2976,0,1,0}-{3328,2952,0,1,0}-{3328,2957,0,1,0}-{3331,2955,0,1,0}-{3331,2961,0,1,0}-{3266,2955,0,1,0}-{3271,2967,0,1,0}-{3279,2957,0,1,0}-{3280,2975,0,1,0}-{3284,2959,0,1,0}-{3294,2964,0,1,0}-{3295,2978,0,1,0}-{3305,2966,0,1,0}-{3307,2959,0,1,0}-{3309,2973,0,1,0}-{3396,3029,0,1,0}-{3397,3044,0,1,0}-{3398,3038,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1875",
|
||||
"loc_data": "{3354,2952,0,0,1}-"
|
||||
@@ -4519,6 +4527,10 @@
|
||||
"npc_id": "1912",
|
||||
"loc_data": "{3376,3429,0,1,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1916",
|
||||
"loc_data": "{3112,9690,0,0,7}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1917",
|
||||
"loc_data": "{3177,2987,0,1,6}-"
|
||||
@@ -4537,7 +4549,11 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "1923",
|
||||
"loc_data": "{3183,2974,0,0,7}-"
|
||||
"loc_data": "{3185,2983,0,1,4}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1924",
|
||||
"loc_data": "{3213,2956,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1926",
|
||||
@@ -4559,6 +4575,10 @@
|
||||
"npc_id": "1930",
|
||||
"loc_data": "{3161,2985,0,0,6}-{3161,2983,0,0,6}-{3161,2982,0,0,6}-{3161,2981,0,0,6}-{3161,2984,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1932",
|
||||
"loc_data": "{2836,3740,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1935",
|
||||
"loc_data": "{2841,3738,0,0,3}-"
|
||||
@@ -4591,6 +4611,22 @@
|
||||
"npc_id": "1942",
|
||||
"loc_data": "{2855,3735,0,1,0}-{2858,3730,0,1,0}-{2865,3726,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1943",
|
||||
"loc_data": "{2825,3807,2,0,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1945",
|
||||
"loc_data": "{2825,3811,2,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1947",
|
||||
"loc_data": "{2835,3740,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1949",
|
||||
"loc_data": "{2837,3740,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1951",
|
||||
"loc_data": "{2886,3723,0,1,3}-{2887,3720,0,1,4}-{2890,3721,0,1,7}-{2890,3724,0,1,1}-{2909,3736,0,1,5}-{2910,3736,0,1,2}-{2891,3724,0,1,7}-"
|
||||
@@ -4621,23 +4657,35 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "1961",
|
||||
"loc_data": "{3156,5477,0,1,5}-{3162,5479,0,1,4}-{3159,5477,0,1,6}-{3150,5474,0,1,3}-{3147,5480,0,1,1}-{3159,5484,0,1,3}-{3250,9326,0,1,4}-{3258,9327,0,1,6}-{3256,9333,0,1,1}-{3220,9309,0,1,4}-{3252,9333,0,1,3}-{3208,9318,0,1,3}-{3241,9331,0,1,6}-{3204,9328,0,1,3}-{3209,9328,0,1,3}-{3228,9323,0,1,4}-{3210,9282,0,1,7}-{3225,9329,0,1,6}-{3207,9299,0,1,4}-{3215,9295,0,1,3}-{3213,9322,0,1,3}-{3214,9315,0,1,0}-{3221,9291,0,1,0}-{3213,9303,0,1,4}-{3227,9304,0,1,6}-{3247,9301,0,1,1}-{3228,9284,0,1,3}-{3254,9286,0,1,4}-{3262,9291,0,1,6}-{3224,9302,0,1,3}-{3250,9298,0,1,3}-{3252,9293,0,1,6}-{3262,9299,0,1,1}-{3256,9297,0,1,7}-{3262,9285,0,1,1}-{3254,9322,0,1,0}-{3261,9318,0,1,4}-{3242,9316,0,1,6}-{3250,9306,0,1,3}-{3250,9327,0,1,3}-"
|
||||
"loc_data": "{3156,5477,0,1,5}-{3162,5479,0,1,4}-{3159,5477,0,1,6}-{3150,5474,0,1,3}-{3147,5480,0,1,1}-{3159,5484,0,1,3}-{2764,4944,1,1,0}-{2796,4976,1,1,0}-{2798,4950,1,1,0}-{2806,4939,1,1,0}-{2832,4959,2,1,0}-{3201,9293,0,1,0}-{3205,9303,0,1,0}-{3206,9328,0,1,0}-{3207,9310,0,1,0}-{3211,9284,0,1,0}-{3220,9289,0,1,0}-{3224,9334,0,1,0}-{3249,9286,0,1,0}-{3251,9303,0,1,0}-{3252,9327,0,1,0}-{3252,9332,0,1,0}-{3255,9315,0,1,0}-{3261,9296,0,1,0}-{3261,9306,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1962",
|
||||
"loc_data": "{3168,5458,0,1,2}-{3242,9331,0,1,3}-{3238,9333,0,1,6}-{3261,9330,0,1,1}-{3232,9333,0,1,0}-{3222,9324,0,1,4}-{3205,9303,0,1,3}-"
|
||||
"loc_data": "{3168,5458,0,1,2}-{2900,4948,3,1,0}-{2762,4962,1,1,0}-{2763,4973,1,1,0}-{2780,4977,1,1,0}-{2787,4967,1,1,0}-{2796,4959,1,1,0}-{2838,4948,2,1,0}-{3205,9329,0,1,0}-{3210,9292,0,1,0}-{3221,9310,0,1,0}-{3225,9323,0,1,0}-{3243,9310,0,1,0}-{3246,9290,0,1,0}-{3255,9301,0,1,0}-{3255,9321,0,1,0}-{3261,9331,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1963",
|
||||
"loc_data": "{3166,5465,0,1,7}-{3168,5462,0,1,0}-{3167,5467,0,1,1}-{3167,5467,0,1,7}-"
|
||||
"loc_data": "{3166,5465,0,1,7}-{3168,5462,0,1,0}-{3167,5467,0,1,1}-{3167,5467,0,1,7}-{2926,4965,3,1,0}-{2771,4947,1,1,0}-{2775,4963,1,1,0}-{2781,4948,1,1,0}-{2792,4942,1,1,0}-{2798,4954,1,1,0}-{2858,4964,2,1,0}-{3204,9309,0,1,0}-{3214,9333,0,1,0}-{3219,9297,0,1,0}-{3239,9300,0,1,0}-{3240,9286,0,1,0}-{3240,9330,0,1,0}-{3245,9306,0,1,0}-{3250,9316,0,1,0}-{3250,9317,0,1,0}-{3257,9290,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1964",
|
||||
"loc_data": "{2761,4950,1,1,0}-{2765,4938,1,1,0}-{2770,4955,1,1,0}-{2772,4940,1,1,0}-{2777,4943,1,1,0}-{2782,4967,1,1,0}-{2797,4965,1,1,0}-{2799,4937,1,1,0}-{2799,4941,1,1,0}-{2807,4968,1,1,0}-{2808,4975,1,1,0}-{2809,4953,1,1,0}-{2864,4946,2,1,0}-{3202,9283,0,1,0}-{3206,9333,0,1,0}-{3209,9299,0,1,0}-{3219,9301,0,1,0}-{3226,9285,0,1,0}-{3227,9303,0,1,0}-{3228,9293,0,1,0}-{3229,9333,0,1,0}-{3237,9293,0,1,0}-{3246,9321,0,1,0}-{3256,9296,0,1,0}-{3260,9285,0,1,0}-{3262,9317,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1970",
|
||||
"loc_data": "{3233,9317,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1972",
|
||||
"loc_data": "{2536,3426,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1973",
|
||||
"loc_data": "{2693,5075,0,1,0}-{2695,5089,0,1,0}-{2697,5096,0,1,0}-{2703,5064,0,1,0}-{2710,5105,0,1,0}-{2719,5078,0,1,0}-{2719,5112,0,1,0}-{2720,5096,0,1,0}-{2726,5086,0,1,0}-{2729,5096,0,1,0}-{2735,5061,0,1,0}-{2740,5069,0,1,0}-{2740,5085,0,1,0}-{2746,5092,0,1,0}-{2746,5114,0,1,0}-{2626,5065,0,1,0}-{2637,5099,0,1,0}-{2638,5058,0,1,0}-{2644,5090,0,1,0}-{2658,5082,0,1,0}-{2666,5097,0,1,0}-{2680,5074,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1976",
|
||||
"loc_data": "{3315,5508,0,1,5}-{3308,5510,0,1,3}-{3304,5507,0,1,4}-{3299,5509,0,1,3}-{3317,5514,0,1,3}-{3319,5518,0,1,4}-{3320,5507,0,1,4}-{3324,5513,0,1,1}-{3283,5510,0,1,5}-{3320,5550,0,1,0}-{3313,5523,0,1,4}-{3310,5541,0,1,4}-{3308,5535,0,1,5}-{3301,5531,0,1,4}-{3315,5530,0,1,1}-{3322,5536,0,1,4}-{3320,5539,0,1,7}-{3311,5519,0,1,3}-{3289,5525,0,1,2}-{3300,5519,0,1,6}-{3289,5515,0,1,7}-{3287,5523,0,1,3}-"
|
||||
"loc_data": "{2694,5067,0,1,0}-{2717,5081,0,1,0}-{2718,5108,0,1,0}-{2721,5104,0,1,0}-{2726,5091,0,1,0}-{2731,5060,0,1,0}-{2732,5073,0,1,0}-{2740,5083,0,1,0}-{2742,5103,0,1,0}-{2747,5094,0,1,0}-{3315,5508,0,1,5}-{3308,5510,0,1,3}-{3304,5507,0,1,4}-{3299,5509,0,1,3}-{3317,5514,0,1,3}-{3319,5518,0,1,4}-{3320,5507,0,1,4}-{3324,5513,0,1,1}-{3283,5510,0,1,5}-{3320,5550,0,1,0}-{3313,5523,0,1,4}-{3310,5541,0,1,4}-{3308,5535,0,1,5}-{3301,5531,0,1,4}-{3315,5530,0,1,1}-{3322,5536,0,1,4}-{3320,5539,0,1,7}-{3311,5519,0,1,3}-{3289,5525,0,1,2}-{3300,5519,0,1,6}-{3289,5515,0,1,7}-{3287,5523,0,1,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1990",
|
||||
@@ -4645,11 +4693,43 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "1993",
|
||||
"loc_data": "{3360,2935,0,1,4}-{3359,2924,0,1,6}-{3352,2936,0,1,0}-{3349,2931,0,1,6}-{3341,2924,0,1,4}-"
|
||||
"loc_data": "{3264,2886,0,1,0}-{3267,2891,0,1,0}-{3268,2881,0,1,0}-{3269,2885,0,1,0}-{3296,2912,0,1,0}-{3297,2919,0,1,0}-{3301,2920,0,1,0}-{3308,2916,0,1,0}-{3258,2868,0,1,0}-{3259,2823,0,1,0}-{3259,2845,0,1,0}-{3260,2830,0,1,0}-{3260,2859,0,1,0}-{3261,2819,0,1,0}-{3261,2851,0,1,0}-{3337,2922,0,1,0}-{3343,2931,0,1,0}-{3349,2922,0,1,0}-{3351,2927,0,1,0}-{3357,2922,0,1,0}-{3359,2927,0,1,0}-{3364,2937,0,1,0}-{3268,2854,0,1,0}-{3269,2827,0,1,0}-{3269,2866,0,1,0}-{3269,2875,0,1,0}-{3270,2818,0,1,0}-{3272,2841,0,1,0}-{3276,2842,0,1,0}-{3282,2839,0,1,0}-{3290,2847,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1994",
|
||||
"loc_data": "{3344,2933,0,1,3}-{3350,2936,0,1,4}-"
|
||||
"loc_data": "{3265,2931,0,1,0}-{3265,2935,0,1,0}-{3268,2932,0,1,0}-{3268,2935,0,1,0}-{3316,2900,0,1,0}-{3319,2897,0,1,0}-{3320,2901,0,1,0}-{3321,2899,0,1,0}-{3212,2863,0,1,0}-{3213,2866,0,1,0}-{3215,2863,0,1,0}-{3216,2865,0,1,0}-{3216,2868,0,1,0}-{3218,2831,0,1,0}-{3220,2830,0,1,0}-{3220,2833,0,1,0}-{3221,2831,0,1,0}-{3238,2845,0,1,0}-{3240,2845,0,1,0}-{3241,2843,0,1,0}-{3241,2847,0,1,0}-{3400,2997,0,1,0}-{3402,2999,0,1,0}-{3403,2997,0,1,0}-{3445,2993,0,1,0}-{3446,2992,0,1,0}-{3448,2991,0,1,0}-{3448,2994,0,1,0}-{3329,2933,0,1,0}-{3330,2931,0,1,0}-{3331,2933,0,1,0}-{3343,2895,0,1,0}-{3345,2896,0,1,0}-{3346,2894,0,1,0}-{3348,2894,0,1,0}-{3376,2934,0,1,0}-{3378,2933,0,1,0}-{3378,2935,0,1,0}-{3381,2907,0,1,0}-{3383,2905,0,1,0}-{3383,2908,0,1,0}-{3384,2907,0,1,0}-{3306,2817,0,1,0}-{3308,2818,0,1,0}-{3309,2816,0,1,0}-{3312,2817,0,1,0}-{3314,2861,0,1,0}-{3319,2873,0,1,0}-{3321,2871,0,1,0}-{3324,2870,0,1,0}-{3327,2858,0,1,0}-{3406,3014,0,1,0}-{3408,3013,0,1,0}-{3408,3016,0,1,0}-{3410,3015,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1995",
|
||||
"loc_data": "{3309,2806,0,1,0}-{3312,2806,0,1,0}-{3314,2752,0,1,0}-{3314,2806,0,1,0}-{3315,2805,0,1,0}-{3316,2780,0,1,0}-{3316,2795,0,1,0}-{3317,2752,0,1,0}-{3317,2762,0,1,0}-{3317,2763,0,1,0}-{3317,2779,0,1,0}-{3317,2794,0,1,0}-{3318,2761,0,1,0}-{3318,2778,0,1,0}-{3318,2781,0,1,0}-{3318,2794,0,1,0}-{3318,2795,0,1,0}-{3319,2760,0,1,0}-{3319,2763,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1997",
|
||||
"loc_data": "{3272,2802,0,1,0}-{3273,2802,0,1,0}-{3273,2805,0,1,0}-{3274,2798,0,1,0}-{3274,2799,0,1,0}-{3274,2802,0,1,0}-{3274,2804,0,1,0}-{3275,2795,0,1,0}-{3275,2796,0,1,0}-{3275,2798,0,1,0}-{3277,2752,0,1,0}-{3277,2753,0,1,0}-{3277,2756,0,1,0}-{3277,2757,0,1,0}-{3278,2752,0,1,0}-{3278,2753,0,1,0}-{3278,2754,0,1,0}-{3278,2755,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1998",
|
||||
"loc_data": "{3275,2803,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "1999",
|
||||
"loc_data": "{3278,2804,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2000",
|
||||
"loc_data": "{3277,2802,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2002",
|
||||
"loc_data": "{3315,2849,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2003",
|
||||
"loc_data": "{3304,9196,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2004",
|
||||
"loc_data": "{3304,9195,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2014",
|
||||
@@ -5333,16 +5413,24 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "2296",
|
||||
"loc_data": "{3399,2916,0,0,6}-"
|
||||
"loc_data": "{3401,2918,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2298",
|
||||
"loc_data": "{3287,2813,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2300",
|
||||
"loc_data": "{3243,2813,0,0,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2301",
|
||||
"loc_data": "{3181,3043,0,1,3}-{3310,3107,0,1,4}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2302",
|
||||
"loc_data": "{3243,2812,0,1,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2304",
|
||||
"loc_data": "{3039,3292,0,1,6}-"
|
||||
@@ -6153,7 +6241,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "2803",
|
||||
"loc_data": "{3391,3066,0,1,6}-{3397,3054,0,1,6}-{3398,3060,0,1,0}-{3412,3059,0,1,3}-"
|
||||
"loc_data": "{3387,3068,0,1,0}-{3387,3017,0,1,0}-{3404,3062,0,1,0}-{3441,3061,0,1,0}-{3445,3034,0,1,0}-{3338,2804,0,1,0}-{3339,2815,0,1,0}-{3342,2809,0,1,0}-{3344,2800,0,1,0}-{3348,2809,0,1,0}-{3349,2814,0,1,0}-{3357,2813,0,1,0}-{3357,2806,0,1,0}-{3365,2815,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2804",
|
||||
@@ -6169,11 +6257,11 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "2807",
|
||||
"loc_data": "{3414,3045,0,1,1}-{3403,3050,0,1,4}-{3407,3058,0,1,3}-{3420,3022,0,0,0}-"
|
||||
"loc_data": "{3384,3013,0,1,0}-{3387,3014,0,1,0}-{3441,3059,0,1,0}-{3443,3033,0,1,0}-{3443,3059,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2808",
|
||||
"loc_data": "{3384,3072,0,1,2}-{3419,3006,0,1,4}-{3403,3069,0,1,1}-{3402,3061,0,1,1}-{3394,3076,0,1,1}-"
|
||||
"loc_data": "{3385,3067,0,1,0}-{3389,3065,0,1,0}-{3400,3032,0,1,0}-{3402,3061,0,1,0}-{3404,3060,0,1,0}-{3407,3067,0,1,0}-{3408,3060,0,1,0}-{3411,3065,0,1,0}-{3412,3032,0,1,0}-{3412,3049,0,1,0}-{3414,3029,0,1,0}-{3417,3036,0,1,0}-{3418,3032,0,1,0}-{3419,3034,0,1,0}-{3422,3058,0,1,0}-{3424,3059,0,1,0}-{3435,3057,0,1,0}-{3435,3062,0,1,0}-{3439,3013,0,1,0}-{3439,3065,0,1,0}-{3440,3016,0,1,0}-{3443,3012,0,1,0}-{3443,3017,0,1,0}-{3443,3034,0,1,0}-{3443,3047,0,1,0}-{3446,3014,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "2809",
|
||||
@@ -6339,6 +6427,10 @@
|
||||
"npc_id": "3021",
|
||||
"loc_data": "{2572,3105,0,1,0}-{2614,3226,0,1,4}-{3088,3357,0,1,0}-{2856,3435,0,1,0}-{3603,3529,0,1,6}-{2611,3859,0,1,6}-{2589,3863,0,1,0}-{3189,3234,0,1,0}-{2940,3225,0,1,6}-{2663,3374,0,1,4}-{3182,3354,0,1,0}-{2933,3434,0,1,4}-{3449,3471,0,1,6}-{2666,3521,0,1,4}-{2491,3177,0,1,1}-{3007,3371,0,1,2}-{2474,3446,0,1,4}-{2434,3415,0,1,3}-{3232,3459,0,1,3}-{2796,3104,0,1,0}-{2764,3210,0,1,1}-{3315,3205,0,1,6}-{3060,3263,0,1,0}-{3053,3304,0,1,1}-{2812,3333,0,1,4}-{2815,3466,0,1,3}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "3022",
|
||||
"loc_data": "{3371,9320,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "3029",
|
||||
"loc_data": "{3422,2937,0,1,1}-"
|
||||
@@ -7057,7 +7149,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "3675",
|
||||
"loc_data": "{3331,2791,0,1,1}-{3333,2803,0,1,2}-{3338,2801,0,1,4}-{3338,2776,0,1,3}-{3321,2857,0,1,3}-{3322,2861,0,0,4}-{3319,2855,0,1,1}-{3319,2853,0,1,6}-"
|
||||
"loc_data": "{3333,2864,0,1,1}-{3335,2860,0,1,2}-{3338,2864,0,1,4}-{3215,2841,0,1,0}-{3217,2845,0,1,0}-{3220,2841,0,1,0}-{3295,2866,0,1,0}-{3297,2863,0,1,0}-{3301,2864,0,1,0}-{3336,2778,0,1,0}-{3343,2793,0,1,0}-{3367,2791,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "3677",
|
||||
@@ -8671,6 +8763,10 @@
|
||||
"npc_id": "5260",
|
||||
"loc_data": "{2665,2651,0,0,1}-{2667,2651,0,0,1}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "5277",
|
||||
"loc_data": "{3264,2784,0,0,4}-{3264,2785,0,0,4}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "5291",
|
||||
"loc_data": "{3300,2792,0,0,6}-{3282,2807,0,0,6}-{3285,2811,0,0,1}-{3283,2772,0,1,5}-{3281,2771,0,1,7}-{3283,2776,0,1,6}-{3278,2770,0,1,6}-"
|
||||
@@ -8823,6 +8919,10 @@
|
||||
"npc_id": "5358",
|
||||
"loc_data": "{2874,2954,0,0,6}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "5359",
|
||||
"loc_data": "{2693,5065,0,1,0}-{2693,5089,0,1,0}-{2704,5091,0,1,0}-{2710,5095,0,1,0}-{2712,5076,0,1,0}-{2714,5108,0,1,0}-{2716,5092,0,1,0}-{2719,5071,0,1,0}-{2722,5061,0,1,0}-{2732,5087,0,1,0}-{2739,5078,0,1,0}-{2740,5104,0,1,0}-{2747,5083,0,1,0}-{2627,5093,0,1,0}-{2629,5061,0,1,0}-{2638,5090,0,1,0}-{2651,5105,0,1,0}-{2654,5079,0,1,0}-{2663,5116,0,1,0}-{2683,5059,0,1,0}-{2685,5111,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "5361",
|
||||
"loc_data": "{3176,5543,0,1,3}-{3191,5542,0,1,4}-{3175,5543,0,1,2}-{3178,5541,0,1,2}-{3187,5542,0,1,3}-{3192,5545,0,1,2}-{3192,5542,0,1,3}-{3179,5549,0,1,6}-{1757,5358,0,1,5}-{1760,5357,0,1,5}-{1755,5352,0,1,5}-{1751,5342,0,1,3}-{1745,5342,0,1,6}-{1739,5342,0,1,3}-{1737,5344,0,1,7}-{1739,5347,0,1,6}-{1740,5350,0,1,5}-{1739,5355,0,1,3}-{1747,5363,0,1,4}-{1749,5363,0,1,4}-{1743,5360,0,1,3}-{1739,5356,0,1,0}-"
|
||||
@@ -10105,11 +10205,11 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "6050",
|
||||
"loc_data": "{3252,3069,0,1,1}-{3242,3059,0,1,7}-{3235,3051,0,1,5}-{3248,3051,0,1,4}-{3257,3055,0,1,3}-{3263,3063,0,1,3}-{3253,3040,0,1,6}-{3243,3039,0,1,6}-{3254,3031,0,1,1}-{3243,3035,0,1,5}-{3232,3039,0,1,2}-{3230,3046,0,1,6}-{3219,3033,0,1,3}-{3219,3022,0,1,1}-{3227,3017,0,1,5}-{3235,3012,0,1,4}-{3243,3019,0,1,2}-{3251,3028,0,1,3}-{3259,3080,0,1,2}-{3246,3080,0,1,3}-{3244,3082,0,1,1}-{3235,3072,0,1,4}-{3267,3048,0,1,0}-{3291,3081,0,1,7}-{3298,3075,0,1,1}-{3284,3076,0,1,3}-{3266,3072,0,1,1}-"
|
||||
"loc_data": "{3264,3008,0,1,0}-{3266,3008,0,1,0}-{3285,3066,0,1,0}-{3322,3032,0,1,0}-{3323,3055,0,1,0}-{3325,3010,0,1,0}-{3174,3010,0,1,0}-{3198,3061,0,1,0}-{3199,3016,0,1,0}-{3219,3125,0,1,0}-{3233,3075,0,1,0}-{3250,3126,0,1,0}-{3223,3011,0,1,0}-{3228,3060,0,1,0}-{3251,3059,0,1,0}-{3310,3076,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "6051",
|
||||
"loc_data": "{3292,3069,0,1,1}-{3285,3071,0,1,1}-{3273,3065,0,1,3}-{3288,3066,0,1,6}-{3281,3057,0,1,5}-{3294,3056,0,1,5}-{3305,3064,0,1,3}-{3279,3078,0,1,4}-{3312,3075,0,1,6}-{3306,3086,0,1,4}-{3272,3082,0,1,4}-"
|
||||
"loc_data": "{3266,3010,0,1,0}-{3267,3068,0,1,0}-{3287,3065,0,1,0}-{3287,3067,0,1,0}-{3310,3070,0,1,0}-{3312,3068,0,1,0}-{3320,3054,0,1,0}-{3324,3013,0,1,0}-{3325,3033,0,1,0}-{3153,3047,0,1,0}-{3196,3063,0,1,0}-{3199,3036,0,1,0}-{3215,3092,0,1,0}-{3217,3124,0,1,0}-{3260,3077,0,1,0}-{3223,3035,0,1,0}-{3225,3011,0,1,0}-{3283,3084,0,1,0}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "6052",
|
||||
@@ -11041,7 +11141,7 @@
|
||||
},
|
||||
{
|
||||
"npc_id": "6779",
|
||||
"loc_data": "{3392,2759,0,1,2}-{3408,2763,0,1,7}-{3410,2786,0,1,2}-{3420,2778,0,1,6}-{3427,2792,0,1,6}-{3429,2802,0,1,4}-"
|
||||
"loc_data": "{3337,2762,0,1,0}-{3340,2767,0,1,0}-{3345,2763,0,1,0}-{3350,2766,0,1,0}-{3352,2761,0,1,0}-{3356,2769,0,1,0}-{3358,2758,0,1,0}-{3359,2763,0,1,0}-{3365,2769,0,1,0}-{3368,2764,0,1,0}-{3375,2762,0,1,0}-{3392,2759,0,1,2}-{3408,2763,0,1,7}-{3410,2786,0,1,2}-{3420,2778,0,1,6}-{3427,2792,0,1,6}-{3429,2802,0,1,4}-"
|
||||
},
|
||||
{
|
||||
"npc_id": "6780",
|
||||
|
||||
@@ -96,24 +96,24 @@ class SignpostListener : InteractionListener {
|
||||
setInterfaceText(player, "Follow the path west to Ardougne.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else if (node.asScenery().location.equals(Location(2604, 3240))) {
|
||||
setInterfaceText(player, "North to Ardougne Zoo.", 135, 3) // North
|
||||
setInterfaceText(player, "South to the Monastery.", 135, 9) // South
|
||||
setInterfaceText(player, "East to the Tower of Life.", 135, 8) // East
|
||||
setInterfaceText(player, "West to the Clocktower.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else if (node.asScenery().location.equals(Location(2605, 3298))) {
|
||||
setInterfaceText(player, "North to the Fishing Guild and Baxtorian Falls.", 135, 3) // North
|
||||
setInterfaceText(player, "South to Ardougne Zoo and Port Khazard.", 135, 9) // South
|
||||
setInterfaceText(player, "East to Ardougne Market and Witchaven.", 135, 8) // East
|
||||
setInterfaceText(player, "West to Ardougne Castle and Ardougne West.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else if (node.asScenery().location.equals(Location(2646, 3404))) {
|
||||
setInterfaceText(player, "North to the Ranging Guild and Seer's Village.", 135, 3) // North
|
||||
setInterfaceText(player, "South to the Ardougne City.", 135, 9) // South
|
||||
setInterfaceText(player, "East to the Sorcerer's Tower.", 135, 8) // East
|
||||
setInterfaceText(player, "West to the Fishing Guild.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else {
|
||||
setInterfaceText(player, "North to the Ardougne City Zoo.", 135, 3) // North
|
||||
setInterfaceText(player, "South to the Monastery.", 135, 9) // South
|
||||
setInterfaceText(player, "East to the Tower of Life.", 135, 8) // East
|
||||
setInterfaceText(player, "West to the Clocktower.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else if (node.asScenery().location.equals(Location(2605, 3298))) {
|
||||
setInterfaceText(player, "North to the Fishing Guild and Hemenster.", 135, 3) // North
|
||||
setInterfaceText(player, "South to the Ardougne City Zoo.", 135, 9) // South
|
||||
setInterfaceText(player, "East to Ardougne Market.", 135, 8) // East
|
||||
setInterfaceText(player, "West to Ardougne Castle and West Ardougne.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else if (node.asScenery().location.equals(Location(2646, 3404))) {
|
||||
setInterfaceText(player, "North to the Ranging Guild and Seer's Village.", 135, 3) // North
|
||||
setInterfaceText(player, "South to the Ardougne City.", 135, 9) // South
|
||||
setInterfaceText(player, "East to the Sorcerer's Tower.", 135, 8) // East
|
||||
setInterfaceText(player, "West to the Fishing Guild.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else {
|
||||
setInterfaceText(player, "North to unknown.", 135, 3) // North
|
||||
setInterfaceText(player, "South to unknown.", 135, 9) // South
|
||||
setInterfaceText(player, "East to unknown.", 135, 8) // East
|
||||
@@ -133,7 +133,7 @@ class SignpostListener : InteractionListener {
|
||||
setInterfaceText(player, "North to Edgeville.", 135, 3) // North
|
||||
setInterfaceText(player, "South to Draynor Manor.", 135, 9) // South
|
||||
setInterfaceText(player, "East to Varrock west gate.", 135, 8) // East
|
||||
setInterfaceText(player, "West to Barbarian Village and Falador.", 135, 12) // West
|
||||
setInterfaceText(player, "West to Barbarian Village.", 135, 12) // West
|
||||
openInterface(player, Components.AIDE_COMPASS_135)
|
||||
} else {
|
||||
setInterfaceText(player, "North to unknown.", 135, 3) // North
|
||||
@@ -204,17 +204,17 @@ class SignpostListener : InteractionListener {
|
||||
* SceneryDefinition.forId(4133).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(4134).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(4135).getHandlers().put("option:read", this);
|
||||
*
|
||||
* SceneryDefinition.forId(5164).getHandlers().put("option:read", this); No
|
||||
* SceneryDefinition.forId(10090).getHandlers().put("option:read", this); No
|
||||
*
|
||||
* SceneryDefinition.forId(13873).getHandlers().put("option:read", this); No
|
||||
*
|
||||
* SceneryDefinition.forId(15522).getHandlers().put("option:read", this); No
|
||||
* SceneryDefinition.forId(25397).getHandlers().put("option:read", this); No
|
||||
*
|
||||
* SceneryDefinition.forId(30039).getHandlers().put("option:read", this); // ????
|
||||
* SceneryDefinition.forId(30040).getHandlers().put("option:read", this); // ??????
|
||||
* SceneryDefinition.forId(5164).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(10090).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(13873).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(15522).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(25397).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(30039).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(30040).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(31296).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(31298).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(31299).getHandlers().put("option:read", this);
|
||||
* SceneryDefinition.forId(31300).getHandlers().put("option:read", this);
|
||||
* // ObjectDefinition.forId(31301).getConfigurations().put("option:read", this);//goblin village
|
||||
* return this;
|
||||
* }
|
||||
|
||||
@@ -132,7 +132,7 @@ public final class SmokeDungeon extends MapZone implements Plugin<Object> {
|
||||
* @param player the player.
|
||||
*/
|
||||
private static void effect(Player player) {
|
||||
int hit = 2;
|
||||
int hit = 10;
|
||||
setDelay(player);
|
||||
if (RandomFunction.random(2) == 1) {
|
||||
player.sendChat(CHATS[RandomFunction.random(CHATS.length)]);
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package content.region.desert.bandits.handlers
|
||||
|
||||
import content.region.desert.quest.deserttreasure.DesertTreasure
|
||||
import core.api.getAttribute
|
||||
import core.api.inInventory
|
||||
import core.api.openDialogue
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class BanditDialogue (player: Player? = null) : DialoguePlugin(player) {
|
||||
override fun newInstance(player: Player): DialoguePlugin {
|
||||
return BanditDialogue(player)
|
||||
}
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player, BanditDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.BANDIT_1926)
|
||||
}
|
||||
}
|
||||
class BanditDialogueFile : DialogueBuilderFile() {
|
||||
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 100)
|
||||
.npcl("So you're the one who freed Azzanadra from his prison? Thank you, kind @g[sir,lady]!")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
|
||||
.npcl("What do you want @g[lad,lass]?")
|
||||
.playerl("I'm here on an archaeological expedition for the Museum of Varrock. I believe there may be some interesting artefacts in the area.")
|
||||
.branch { player ->
|
||||
return@branch (0..4).random()
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.npcl("You are a crazy @g[man,woman]. The only thing you will find out here in the desert is your death.")
|
||||
.end()
|
||||
branch.onValue(1)
|
||||
.npcl("I have no interest in the world that betrayed my people. Search where you will, you will find nothing.")
|
||||
.end()
|
||||
branch.onValue(2)
|
||||
.npcl("The gods forsake us, and drove us to this place. Anything of worth has been long gone.")
|
||||
.end()
|
||||
branch.onValue(3)
|
||||
.npcl("I'm sure there are many secrets buried beneath the sands here. The thing about this being a desert, is that they're likely to stay that way.")
|
||||
.end()
|
||||
branch.onValue(4)
|
||||
.npcl("Do I look like I care who you are or where you came from?")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onPredicate { _ -> true }
|
||||
.npcl("Get out of this village. You are not welcome here.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package content.region.desert.handlers;
|
||||
|
||||
import core.cache.def.impl.SceneryDefinition;
|
||||
import core.game.global.action.DoorActionHandler;
|
||||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.game.world.map.Location;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Handles interactions in the khardian desert.
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
@Initializable
|
||||
public final class KhardianDesertPlugin extends OptionHandler {
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
SceneryDefinition.forId(6481).getHandlers().put("option:enter", this);
|
||||
SceneryDefinition.forId(6545).getHandlers().put("option:open", this);
|
||||
SceneryDefinition.forId(6547).getHandlers().put("option:open", this);
|
||||
SceneryDefinition.forId(6551).getHandlers().put("option:use", this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
switch (node.getId()) {
|
||||
case 6481:
|
||||
player.teleport(new Location(3233, 9313, 0));
|
||||
break;
|
||||
case 6545:
|
||||
case 6547:
|
||||
// player.getPacketDispatch().sendMessage("A mystical power has sealed this door...");
|
||||
DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
|
||||
break;
|
||||
case 6551:
|
||||
player.teleport(new Location(3233, 2887, 0));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
+193
-85
@@ -1,103 +1,211 @@
|
||||
package rs09.game.content.dialogue.region.lletya
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.setQuestStage
|
||||
import content.global.handlers.iface.BookInterface
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import content.data.Quests
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
*/
|
||||
|
||||
@Initializable
|
||||
/** Known in RS3 as Asgarnia Smith */
|
||||
class ArchaeologistDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npc = args[0] as NPC
|
||||
if (!player.questRepository.hasStarted(Quests.DESERT_TREASURE)) {
|
||||
if (player.questRepository.isComplete(Quests.THE_DIG_SITE) &&
|
||||
player.questRepository.isComplete(Quests.THE_TOURIST_TRAP) &&
|
||||
player.questRepository.isComplete(Quests.TEMPLE_OF_IKOV) &&
|
||||
player.questRepository.isComplete(Quests.PRIEST_IN_PERIL) &&
|
||||
player.questRepository.isComplete(Quests.WATERFALL_QUEST) &&
|
||||
player.questRepository.isComplete(Quests.TROLL_STRONGHOLD) &&
|
||||
player.skills.getStaticLevel(Skills.SLAYER) >= 10 &&
|
||||
player.skills.getStaticLevel(Skills.FIREMAKING) >= 50 &&
|
||||
player.skills.getStaticLevel(Skills.MAGIC) >= 50 &&
|
||||
player.skills.getStaticLevel(Skills.THIEVING) >= 53 ) {
|
||||
player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 0 }
|
||||
} else {
|
||||
player(FacialExpression.FRIENDLY,"Hello there.").also { stage = 999 }
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
|
||||
999 -> sendDialogue("He seems to be lost in his own thoughts...").also { stage = 99 }
|
||||
|
||||
0 -> npc(FacialExpression.FRIENDLY, "Howdy stranger. What brings you out to these parts?").also { stage++ }
|
||||
1 -> options("What are you doing here?", "Do you have any quests?", "Who are you?", "Nothing really.").also { stage++ }
|
||||
2 -> when (buttonId) {
|
||||
//1 -> todo
|
||||
2 -> player(FacialExpression.FRIENDLY, "Do you have any quests?", "Call it a hunch, but you look like the type of man who", "might...").also { stage = 20 }
|
||||
//3 -> todo
|
||||
//4 -> todo
|
||||
}
|
||||
|
||||
20 -> npc(FacialExpression.HALF_THINKING, "Well, it's funny you should say that.",
|
||||
"I'm not sure if I would really call it a quest as such,",
|
||||
"but I found this ancient stone tablet in one of my",
|
||||
"excavations, and it would really help me out if you").also { stage++ }
|
||||
21 -> npc(FacialExpression.FRIENDLY, "could go and take it back to the digsite for me and get",
|
||||
"it examined.").also { stage++ }
|
||||
22 -> npc(FacialExpression.NEUTRAL, "It's very old, and I don't recognise and of the",
|
||||
"inscriptions on it.").also { stage++ }
|
||||
23 -> options("Yes, I'll help you.", "No thanks, I don't want to help.").also { stage++ }
|
||||
24 -> when(buttonId) {
|
||||
1 -> player(FacialExpression.FRIENDLY, "Sure, I was heading that way anyways.",
|
||||
"Any particular person at the digsite you want me to",
|
||||
"talk to?").also { stage = 30 }
|
||||
// 2 -> todo
|
||||
}
|
||||
|
||||
30 -> npc(FacialExpression.NEUTRAL, "His name's Terry Balando. Give it to nobody but him.",
|
||||
"I'm sorry, I can't entrust you with the actual tablet I",
|
||||
"found, but it is far too valuable to give away, but I took",
|
||||
"these etchings - they should be enough for him to make").also { stage++ }
|
||||
31 -> npc(FacialExpression.NEUTRAL, "a preliminary translation on.",
|
||||
"Come back and let me know what he says, I would hate",
|
||||
"to waste my time excavating anything that isn't worth",
|
||||
"my time as a world famous archaeologist!").also {
|
||||
player.questRepository.getQuest(Quests.DESERT_TREASURE).start(player)
|
||||
setQuestStage(player, Quests.DESERT_TREASURE, 1)
|
||||
stage = 99
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
99 -> end()
|
||||
}
|
||||
return true
|
||||
openDialogue(player!!, ArchaeologistDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return ArchaeologistDialogue(player)
|
||||
}
|
||||
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.ARCHAEOLOGIST_1918)
|
||||
}
|
||||
}
|
||||
|
||||
class ArchaeologistDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 0)
|
||||
.player(FacialExpression.FRIENDLY,"Hello there.")
|
||||
.branch { player ->
|
||||
return@branch if (DesertTreasure.hasRequirements(player)) { 1 } else { 0 }
|
||||
}.let{ branch ->
|
||||
// Failure branch
|
||||
branch.onValue(0)
|
||||
.line("He seems to be lost in his own thoughts...")
|
||||
.end()
|
||||
return@let branch // Return DialogueBranchBuilder instead of DialogueBuilder to forward the success branch.
|
||||
}.onValue(1) // Success branch
|
||||
.npc(FacialExpression.FRIENDLY, "Howdy stranger. What brings you out to these parts?")
|
||||
.let { path ->
|
||||
val originalPath = b.placeholder()
|
||||
path.goto(originalPath)
|
||||
originalPath.builder().options().let { optionBuilder ->
|
||||
optionBuilder.option("What are you doing here?")
|
||||
.player("Nothing much - What are you doing here?", "It doesn't seem like there's much to do out here in the", "desert!")
|
||||
.npc("Well, that's where you'd be wrong.", "I work for the Archaeological Society of Varrock, and", "have been excavating around here recently.")
|
||||
.npcl("Was there something you specifically wanted?")
|
||||
.goto(originalPath)
|
||||
optionBuilder.option("Do you have any quests?")
|
||||
.player(FacialExpression.FRIENDLY, "Do you have any quests?", "Call it a hunch, but you look like the type of man who", "might...")
|
||||
.npc(FacialExpression.HALF_THINKING, "Well, it's funny you should say that.", "I'm not sure if I would really call it a quest as such,", "but I found this ancient stone tablet in one of my", "excavations, and it would really help me out if you")
|
||||
.npc(FacialExpression.FRIENDLY, "could go and take it back to the digsite for me and get", "it examined.")
|
||||
.npc(FacialExpression.NEUTRAL, "It's very old, and I don't recognise and of the", "inscriptions on it.")
|
||||
.options().let { optionBuilder2 ->
|
||||
optionBuilder2.option("Yes, I'll help you.")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
addItemOrDrop(player, Items.ETCHINGS_4654)
|
||||
}
|
||||
.player("Sure, I was heading that way anyway.", "Any particular person at the digsite you want me to", "talk to?")
|
||||
.npc(FacialExpression.NEUTRAL, "His name's Terry Balando. Give it to nobody but him.", "I'm sorry, I can't entrust you with the actual tablet I", "found, but it is far too valuable to give away, but I took", "these etchings - they should be enough for him to make")
|
||||
.npc(FacialExpression.NEUTRAL, "a preliminary translation on.", "Come back and let me know what he says, I would hate", "to waste my time excavating anything that isn't worth", "my time as a world famous archaeologist!")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 0) {
|
||||
setQuestStage(player, DesertTreasure.questName, 1)
|
||||
}
|
||||
}
|
||||
optionBuilder2.option("No thanks, I don't want to help.")
|
||||
.playerl("No thanks. Playing delivery boy doesn't really sound like much fun to me. ")
|
||||
.npcl(" Well, okay. Can't say as I blame you for thinking that. I'll go take it there myself later I guess.")
|
||||
.end()
|
||||
}
|
||||
optionBuilder.option("Who are you?")
|
||||
.playerl(FacialExpression.THINKING, "Who are you, anyway?")
|
||||
.npc(FacialExpression.EXTREMELY_SHOCKED, "You don't recognize me???", "I am the world famous Asgarnia Smith, Archaeologist", "extraordinaire!")
|
||||
.npc(FacialExpression.HALF_THINKING, "I am the one who discovered the long forgotten", "Temple of Ikov!", "The one who unearthed the strange trap filled arena", "in Brimhaven!")
|
||||
.npc(FacialExpression.HALF_THINKING, "I'm the leading archaeological expert of our time!", "I was voted archaeologist of the year four years", "running by the Varrock Herald! Are you REALLY", "sure you've never heard of me?")
|
||||
.playerl(FacialExpression.THINKING, "No, I really haven't.")
|
||||
.npc(FacialExpression.EXTREMELY_SHOCKED, "Well then, I'm confused.", "Why did you come over and speak to me if you don't", "know who I am? What do you want?")
|
||||
.goto(originalPath)
|
||||
optionBuilder.option("Nothing really.")
|
||||
.playerl("Nothing really. I'm just wandering around for no good reason.")
|
||||
.npcl("Uh-huh. Well, if you'll excuse me, I have a lot more work to do before I can bed down for the night.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 1,2)
|
||||
.npcl("So what did Terry Balando say about those etchings? Did he give you a translation for me?")
|
||||
.playerl("Um...yeah...about that... I kind of didn't go and speak to him yet...")
|
||||
.npcl("Well what are you waiting for? A written invitation? All I want you to do is take those etchings up to the digsite for me!")
|
||||
.playerl("Okay, I'll do that then.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 3)
|
||||
.playerl("Hello there.")
|
||||
.npcl("So what did Terry Balando say about those etchings? Did he give you a translation for me?")
|
||||
.branch { player ->
|
||||
return@branch if (inInventory(player, Items.TRANSLATION_4655)) { 1 } else { 0 }
|
||||
}.let{ branch ->
|
||||
// Failure branch
|
||||
branch.onValue(0)
|
||||
.playerl("Yeah, he did. But I don't have it with me.")
|
||||
.npcl("...")
|
||||
.npcl("I see.")
|
||||
.npcl("Well could you go and get me that translation? It could be vital!")
|
||||
.end()
|
||||
return@let branch // Return DialogueBranchBuilder instead of DialogueBuilder to forward the success branch.
|
||||
}.onValue(1) // Success branch
|
||||
.playerl("Yeah, he did. I have it here in this book.")
|
||||
.npcl("Did you take a read of this? It will do you good to understand how this profession works. Here, have a read.")
|
||||
.options().let { optionBuilder ->
|
||||
optionBuilder.option("Read book")
|
||||
.endWith { _, player ->
|
||||
BookInterface.openBook(player, BookInterface.FANCY_BOOK_3_49, TranslationBook.Companion::display)
|
||||
}
|
||||
return@let optionBuilder
|
||||
}
|
||||
.option("Don't read book")
|
||||
.playerl("Yeah, I did. Kind of boring really.")
|
||||
.npcl("Excellent. Just give me a moment to read this, and talk to me again in a second.")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 3) {
|
||||
removeItem(player, Items.TRANSLATION_4655) // remove if exists
|
||||
setQuestStage(player, DesertTreasure.questName, 4)
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 4)
|
||||
.playerl("Hello there.")
|
||||
.npcl("Hmmm. Interesting. It seems to me like there's some kind of treasure hidden out in the desert.")
|
||||
.npcl("So what do you say? Fancy being a treasure hunter like me?")
|
||||
.playerl("Uh... don't you mean archaeologist?")
|
||||
.npcl("Yeeees... An archaeologist...")
|
||||
.npcl("It's all this hot sun getting to me I think.")
|
||||
.npcl("Well anyway, let's just assume there is a treasure hidden in the desert somewhere, and let's just say for the sake of argument that maybe if I found a big stash of gold and treasure I wouldn't necessarily just hand it")
|
||||
.npcl("all over to the Museum of Varrock.")
|
||||
.npcl("Let's also say, purely hypothetically, that if there were such a big stash of treasure and someone were to help me find it, then that hypothetical personal might be entitled to, oh, let's say a purely for the sake of")
|
||||
.npcl("argument thirty percent split...")
|
||||
.playerl("Fifty percent.")
|
||||
.npcl("That's right!")
|
||||
.npcl("A purely for the sake of argument fifty-fifty split on this hypothetical treasure, should it exist...")
|
||||
.npcl("Do you see where I'm going with this?")
|
||||
.playerl("You want me to help you find some treasure for a fifty percent share, as long as I don't tell anybody, and your reputation as an esteemed archaeologist with the Museum of Varrock remains intact, and nobody")
|
||||
.playerl("discovers you're actually just a treasure hunter?")
|
||||
.npcl("Uh... yes, but the way you said it makes it sound like I'm doing something wrong...")
|
||||
.npcl("So what do you say? Partners?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Help him")
|
||||
.playerl("Well... I guess nobody is really going to lose out on anything, and we don't even know if there is any treasure...")
|
||||
.playerl("Aw, go on then. Count me in.")
|
||||
.npcl("Good @g[lad,lass]! Well, if we split up we'll be able to find treasure quicker.")
|
||||
.npcl("I'll continue searching around here in this Bedabin Camp, you head due South to the Bandit Village. If either of us find anything, we'll come find each other and say what, okay?")
|
||||
.npcl("You head due South, see what you can find out about this tablet.")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 4) {
|
||||
setQuestStage(player, DesertTreasure.questName, 5)
|
||||
}
|
||||
}
|
||||
optionBuilder.option("Don't help him")
|
||||
.playerl("This all sounds very immoral, and I don't want any part of your seedy little schemes.")
|
||||
.npcl("Aw, c'mon, cut me a break here man! Look, nobody is really getting hurt, right? This treasure is either going to lie around in some underground ruin, or lie around in some museum for")
|
||||
.npcl("people to look at!")
|
||||
.npcl("It makes sense for the people to go to all the risk to get a little payback for it, right? Besides, anything of real historical value we can hand over to the museum - we'll just keep the cash for")
|
||||
.npcl("ourselves!")
|
||||
.npcl("C'mon... what do you say? Partners?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Help him")
|
||||
.playerl("Well... I guess nobody is really going to lose out on anything, and we don't even know if there is any treasure...")
|
||||
.playerl("Aw, go on then. Count me in.")
|
||||
.npcl("Good @g[lad,lass]! Well, if we split up we'll be able to find treasure quicker.")
|
||||
.npcl("I'll continue searching around here in this Bedabin Camp, you head due South to the Bandit Village. If either of us find anything, we'll come find each other and say what, okay?")
|
||||
.npcl("You head due South, see what you can find out about this tablet.")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 4) {
|
||||
setQuestStage(player, DesertTreasure.questName, 5)
|
||||
}
|
||||
}
|
||||
optionBuilder.option("Don't help him")
|
||||
.playerl("I don't trust anything about your little scheme, including you! I want nothing to do with this!")
|
||||
.npcl("Eh, you'll come running back when you realize just how much money we could be talking here.")
|
||||
.npcl("I'll see you again when you come crawling back, begging to be cut in on the deal.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 5)
|
||||
.playerl("Hello there.")
|
||||
.npcl("Hello again. You find any signs of that treasure yet?")
|
||||
.playerl("Not yet...")
|
||||
.npcl("Well, head south to that bandit camp. I bet if there's anything out here, they'll know about it. Don't let on it might be valuable though! Those thieves will steal it as soon as look at you!")
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 6,7,8)
|
||||
.playerl("Hello there.")
|
||||
.npcl("Hello again. You find any signs of that treasure yet?")
|
||||
.playerl("Not as such... Although I think I'm onto something of a promising lead...")
|
||||
.playerl("Did you ever hear of something called the Diamonds of Azzanadra?")
|
||||
.npcl("Diamonds of Azzanadra? That sounds very promising indeed!")
|
||||
.playerl("So you have heard of them?")
|
||||
.npcl("Nope, never heard of them before, but you said diamonds! Diamonds are always promising!")
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.SpellBookManager
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class AzzanadraDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, AzzanadraDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return AzzanadraDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
/* This is wrong SCARABS_1970 should be AZZANADRA_1970 */
|
||||
return intArrayOf(NPCs.SCARABS_1970, NPCs.AZZANADRA_1971)
|
||||
}
|
||||
}
|
||||
|
||||
class AzzanadraDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 10)
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "I knew they could not trap me here for long!")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "Well done, soldier, tell me, how goes the battle?")
|
||||
.playerl(FacialExpression.THINKING, "Battle?")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "You do not know of the battle?")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "More time must have passed than I had thought...")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "Tell me, what news of great Paddewwa? Do the shining spires of Lassar still stand? And what of glorious Annakarl? The fortress is still intact?")
|
||||
.player("Uh...", "Sorry, I've never heard of them...")
|
||||
.npcl(FacialExpression.OLD_SAD, "No!")
|
||||
.npcl(FacialExpression.OLD_SAD, "My lord... What has become of you? I cannot hear your voice in my mind anymore!")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "My thanks to you brave warrior for your help in freeing me from this accursed tomb, but it seems I have much to do to make amends.")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "If the shining cities no longer stand, then it means that we must have failed my lord...")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "How long have I been trapped here? Master... Have you truly been dispatched from this world?")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "Warrior, for your efforts in freeing me, I offer you the gift of knowledge.")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "I bestow upon you the ancient magicks, taught me by my Lord before his disappearance, may you use them well in battle for our people!")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "They will replace the knowledge you previously had, but you may switch between them by praying at the altar in this room at any time.")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "I trust that we shall meet again adventurer, I offer you the blessings of myself and my master in all of your endeavours!")
|
||||
.npcl(FacialExpression.OLD_DEFAULT, "Now, I must leave you, for there must be some trace of my master's power left somewhere. Feel free to use the portal I shall create to return here easily in the future!")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 10) {
|
||||
sendMessage(player,"A strange wisdom has filled your mind...")
|
||||
finishQuest(player, DesertTreasure.questName)
|
||||
player.spellBookManager.setSpellBook(SpellBookManager.SpellBook.ANCIENT)
|
||||
player.spellBookManager.update(player)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.item.Item
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class BartenderDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, BartenderDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return BartenderDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.BARTENDER_1921)
|
||||
}
|
||||
}
|
||||
class BartenderDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 0,1,2,3,4)
|
||||
.npcl(FacialExpression.ANNOYED, "Get out of here. I have nothing to say to the likes of you.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 5)
|
||||
.branch { player ->
|
||||
return@branch if (getAttribute(player, DesertTreasure.attributeBoughtBeer, false)) { 1 } else { 0 }
|
||||
}.let{ branch ->
|
||||
branch.onValue(1)
|
||||
.npcl("You've had your drink, now get out of here. I have nothing to say to the-")
|
||||
.playerl("No, Wait! Look, I'm here on an archaeological expedition for the Museum of Varrock.")
|
||||
.playerl("I am only here looking for artefacts...")
|
||||
.npcl("Oh really? Our inheritance is only sand and death. What do you expect to find out here in this desert forsaken by the gods?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("I heard about treasure...")
|
||||
.playerl("As I understand it there's some kind of hidden treasure in these parts...")
|
||||
.npcl("Look around @g[pal,lady]. Does it looks like there's any treasure near here?")
|
||||
.npcl("If I were you I'd get lost before someone takes a dislike to your face and removes it for you.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("I heard about four diamonds...")
|
||||
.playerl("I heard a rumour about four diamonds or crystals...")
|
||||
.npcl("The four diamonds of Azzanadra??? How came you to know of this?")
|
||||
.playerl("You've heard of them then?")
|
||||
.npcl("It's just a fairy tale for children. Maybe one of the village elders might know more, but it's not really something I care about.")
|
||||
.npcl("Now get out of here, your sort isn't welcome in my bar.")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 5) {
|
||||
setQuestStage(player, DesertTreasure.questName, 6)
|
||||
}
|
||||
}
|
||||
|
||||
optionBuilder.option("I heard about a fortress...")
|
||||
.playerl("Certain things have led me to believe there may be some kind of ruined fortress around here...")
|
||||
.npcl("Doubt it. What in the world would someone need to guard against in the middle of this desert?")
|
||||
.npcl("A bad attack of sand? I think you're on the wrong track, mister so-called archaeologist.")
|
||||
.end()
|
||||
}
|
||||
|
||||
branch.onValue(0)
|
||||
.npcl("If you're not buying anything, I have nothing to say to you.")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Ask about Desert Treasure")
|
||||
.playerl("As I understand it there's some kind of hidden treasure in these parts...")
|
||||
.npcl("Look around @g[pal,lady]. Does it looks like there's any treasure near here?")
|
||||
.npcl("If I were you I'd get lost before someone takes a dislike to your face and removes it for you.")
|
||||
.end()
|
||||
optionBuilder.option("Buy a drink")
|
||||
.branch { player ->
|
||||
return@branch if (inInventory(player, Items.COINS_995, 650)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.npcl("What's that? You wanna buy a beer? It'll cost ya 650 coins.")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Buy a beer")
|
||||
.betweenStage { _, player, _, _ ->
|
||||
if (removeItem(player, Item(Items.COINS_995, 650))) {
|
||||
addItemOrDrop(player, Items.BANDITS_BREW_4627)
|
||||
setAttribute(player, DesertTreasure.attributeBoughtBeer, true)
|
||||
}
|
||||
}
|
||||
.npcl("There you go. Now get out, we don't like your sort around here.")
|
||||
.end()
|
||||
optionBuilder.option("Don't buy anything")
|
||||
.npcl("Get out of my bar then! We don't like your sort round here!")
|
||||
.end()
|
||||
}
|
||||
|
||||
branch.onValue(0)
|
||||
.npcl("You ain't got the 650 coins it costs to buy it, and I'm glad 'cos I didn't want to serve you anyway.")
|
||||
.end()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 6,7,8,9,10,11)
|
||||
.branch { player ->
|
||||
return@branch if (getAttribute(player, DesertTreasure.attributeBoughtBeer, false)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.npcl("You've had your drink, now get out of here. I have nothing to say to the-")
|
||||
.playerl("No, Wait! Look, I'm here on an archaeological expedition for the Museum of Varrock.")
|
||||
.playerl("I am only here looking for artefacts...")
|
||||
.npcl("Oh really? Our inheritance is only sand and death. What do you expect to find out here in this desert forsaken by the gods?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("I heard about treasure...")
|
||||
.playerl("As I understand it there's some kind of hidden treasure in these parts...")
|
||||
.npcl("Look around @g[pal,lady]. Does it looks like there's any treasure near here?")
|
||||
.npcl("If I were you I'd get lost before someone takes a dislike to your face and removes it for you.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("I heard about four diamonds...")
|
||||
.playerl("I heard a rumour about four diamonds or crystals...")
|
||||
.npcl("The four diamonds of Azzanadra??? How came you to know of this?")
|
||||
.playerl("You've heard of them then?")
|
||||
.npcl("It's just a fairy tale for children. Maybe one of the village elders might know more, but it's not really something I care about.")
|
||||
.npcl("Now get out of here, your sort isn't welcome in my bar.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("I heard about a fortress...")
|
||||
.playerl("Certain things have led me to believe there may be some kind of ruined fortress around here...")
|
||||
.npcl("Doubt it. What in the world would someone need to guard against in the middle of this desert?")
|
||||
.npcl("A bad attack of sand? I think you're on the wrong track, mister so-called archaeologist.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("I heard of the Diamonds of Azzanadra.")
|
||||
.playerl("Tell me all you know about the Diamonds of Azzanadra.")
|
||||
.npcl("Not that I think it's any of your business, but when I was a child I remember hearing the legend.")
|
||||
.npcl("I don't recall it particularly well, other than they are said to contain an incredible power.")
|
||||
.npcl("If you really want to hear more about it you'd be best off finding someone who cares about the past, and the history of this area, and stop bothering me.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 100)
|
||||
.npcl("So you're the @g[fella,lass] that freed Azzanadra, huh? Fair play to ya. What will you have?")
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.combat.BattleState
|
||||
import core.game.node.entity.combat.CombatStyle
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.item.GroundItemManager
|
||||
import core.game.node.item.Item
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class DamisBehavior : NPCBehavior(NPCs.DAMIS_1974, NPCs.DAMIS_1975) {
|
||||
|
||||
var clearTime = 0
|
||||
|
||||
override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean): Boolean {
|
||||
if (attacker is Player) {
|
||||
if (attacker == getAttribute<Player?>(self, "target", null)) {
|
||||
return true
|
||||
}
|
||||
sendMessage(attacker, "It's not after you...")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun tick(self: NPC): Boolean {
|
||||
val player: Player? = getAttribute<Player?>(self, "target", null)
|
||||
if (clearTime++ > 800) {
|
||||
clearTime = 0
|
||||
if (player != null) {
|
||||
sendMessage(player, "Damis has vanished once more into the shadows...")
|
||||
removeAttribute(player, DesertTreasure.attributeDamisInstance)
|
||||
}
|
||||
poofClear(self)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun beforeDamageReceived(self: NPC, attacker: Entity, state: BattleState) {
|
||||
if (attacker is Player) {
|
||||
if (state.estimatedHit + Integer.max(state.secondaryHit, 0) >= self.skills.lifepoints && self.id == NPCs.DAMIS_1974) {
|
||||
state.estimatedHit = self.skills.lifepoints + 1
|
||||
state.secondaryHit = -1
|
||||
|
||||
transformNpc(self, NPCs.DAMIS_1975, 500)
|
||||
self.skills.lifepoints = self.skills.maximumLifepoints
|
||||
sendChat(self, "Armour... is for restraint, not... protection...")
|
||||
queueScript(self, 2, QueueStrength.NORMAL) { stage: Int ->
|
||||
sendChat(self, "Now I show... you... my true power!")
|
||||
self.properties.attackSpeed = 3
|
||||
return@queueScript stopExecuting(self)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun beforeAttackFinalized(self: NPC, victim: Entity, state: BattleState) {
|
||||
// In second form, drain prayer by 5.
|
||||
if (self.id == NPCs.DAMIS_1975) {
|
||||
victim.skills.decrementPrayerPoints(5.0)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
override fun onDeathFinished(self: NPC, killer: Entity) {
|
||||
if (killer is Player) {
|
||||
if (self.id == NPCs.DAMIS_1975) {
|
||||
if (DesertTreasure.getSubStage(killer, DesertTreasure.attributeShadowStage) == 3) {
|
||||
GroundItemManager.create(Item(Items.SHADOW_DIAMOND_4673), self.location, killer)
|
||||
DesertTreasure.setSubStage(killer, DesertTreasure.attributeShadowStage, 100)
|
||||
removeAttribute(killer, DesertTreasure.attributeFareedInstance)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +1,544 @@
|
||||
//package rs09.game.content.quest.members.deserttreasure
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
//import core.game.node.entity.player.Player
|
||||
//import core.game.node.entity.player.link.quest.Quest
|
||||
//import core.game.node.entity.skill.Skills
|
||||
//import core.plugin.Initializable
|
||||
import content.data.Quests
|
||||
import core.api.*
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.quest.Quest
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
|
||||
/**
|
||||
* @author qmqz
|
||||
* Desert Treasure Quest
|
||||
*
|
||||
* https://www.youtube.com/watch?v=INaSdOAHdT8: Jesus fucking devil best shit on planet fuckall 31:57
|
||||
* https://www.youtube.com/watch?v=LAoOISdsX4w: This guy did the best initial quest journal and then ignored the rest.
|
||||
* https://www.youtube.com/watch?v=3cyU36qNBpI: one impt quest log part in the front.
|
||||
* https://www.youtube.com/watch?v=pY-Czja2lE4: Good shit part 2 6:24
|
||||
* https://www.youtube.com/watch?v=NB1-m_hoTPk: Blur ass quest log.
|
||||
* https://www.youtube.com/watch?v=bcy54b6NnJs: Blur ass quest log.
|
||||
* https://www.youtube.com/watch?v=J_dfMXFz3WQ: Blur ass quest log.
|
||||
* https://www.youtube.com/watch?v=7n0OcHUNFHc: Blur ass quest log 1:07.
|
||||
* https://www.youtube.com/@Gunz4Range/videos
|
||||
* https://www.youtube.com/watch?v=baQ6oJOk7Gc
|
||||
* https://www.youtube.com/watch?v=u0C2zW6mrcc: Blur ass ending quest log 3:23
|
||||
* https://www.youtube.com/watch?v=SUzM0WKY6jk: 1:03
|
||||
* https://www.youtube.com/watch?v=3AA5fkkBW-I: 2:05
|
||||
*
|
||||
* https://www.youtube.com/watch?v=ofRV2-h3Dug: 17:21 27:45
|
||||
*
|
||||
* if (VARPBIT[358] == 15) return 2; if (VARPBIT[358] == 0) return 0; return 1; }; if (arg0 == 13)
|
||||
*/
|
||||
@Initializable
|
||||
class DesertTreasure : Quest(Quests.DESERT_TREASURE,45, 44, 3, 440, 358, 0, 1, 15){
|
||||
|
||||
//@Initializable
|
||||
//class DesertTreasure : Quest("Desert Treasure",15, 44, 3, 440, 0, 1, 15){
|
||||
companion object {
|
||||
val questName = Quests.DESERT_TREASURE
|
||||
/** This is an important varbit as it is literally controlling the Quest varbit (440 Varp 0-14 bits -> 358 Varbit )*/
|
||||
const val varbitDesertTreasure = 358 // 10-15-Eblis 1924 shows up other values Eblis disappears. This is tied to the quest.
|
||||
|
||||
//override fun drawJournal(player: Player?, stage: Int) {
|
||||
// super.drawJournal(player, stage)
|
||||
// var line = 12
|
||||
// Desert Treasure Start
|
||||
const val attributeBoughtBeer = "/save:quest:deserttreasure-boughtbeer"
|
||||
const val attributeCountMagicLogs = "/save:quest:deserttreasure-countmagiclogs"
|
||||
const val attributeCountSteelBars = "/save:quest:deserttreasure-countsteelbars"
|
||||
const val attributeCountMoltenGlass = "/save:quest:deserttreasure-countmoltenglass"
|
||||
const val attributeCountBones = "/save:quest:deserttreasure-countbones"
|
||||
const val attributeCountAshes = "/save:quest:deserttreasure-countashes"
|
||||
const val attributeCountCharcoal = "/save:quest:deserttreasure-countcharocal"
|
||||
const val attributeCountBloodRune = "/save:quest:deserttreasure-countbloodrune"
|
||||
const val varbitMirrors = 392 // Set to 1 to show mirrors, they are cactuses before desert treasure.
|
||||
|
||||
//val stage = player?.questRepository?.getStage("Desert Treasure")!!
|
||||
// Blood Diamond
|
||||
const val attributeBloodStage = "/save:quest:deserttreasure-bloodstage"
|
||||
const val attributeDessousInstance = "quest:deserttreasure-dessousinstance"
|
||||
|
||||
//when (stage) {
|
||||
// 0 -> {
|
||||
// line(player,"I can start this quest by speaking to !!The Archaeologist??", line++)
|
||||
// line(player,"who is exploring the !!Bedabin Camp?? South West of the", line++)
|
||||
// line(player,"!!Shantay Pass.??", line++)
|
||||
// line(player,"To complete this quest I will need:", line++)
|
||||
// if (player.skills.getStaticLevel(Skills.SLAYER) < 10) {
|
||||
// line(player,"Level 10 Slayer", line++)
|
||||
// } else {
|
||||
// line(player,"---Level 10 Slayer/--", line++)
|
||||
// }
|
||||
// if (player.skills.getStaticLevel(Skills.SLAYER) < 10) {
|
||||
// line(player,"Level 50 Firemaking", line++)
|
||||
// }
|
||||
// if (player.skills.getStaticLevel(Skills.SLAYER) < 10) {
|
||||
// line(player,"Level 50 Magic", line++)
|
||||
// }
|
||||
// if (player.skills.getStaticLevel(Skills.SLAYER) < 10) {
|
||||
// line(player,"Level 53 Thieving", line++)
|
||||
// }
|
||||
// line(player,"I must have completed the following quests:", line++)
|
||||
// Smoke Diamond
|
||||
const val attributeSmokeStage = "/save:quest:deserttreasure-smokestage"
|
||||
const val attributeUnlockedGate = "/save:quest:deserttreasure-unlockedgate"
|
||||
const val attributeFareedInstance = "quest:deserttreasure-fareedinstance"
|
||||
const val varbitStandingTorchNorthEast = 360 // North East standing torch 6406
|
||||
const val varbitStandingTorchSouthEast = 361 // South East standing torch 6408
|
||||
const val varbitStandingTorchSouthWest = 362 // South West standing torch 6410
|
||||
const val varbitStandingTorchNorthWest = 363 // North West standing torch 6412
|
||||
|
||||
// if (player.questRepository.isComplete("The Digsite Quest")) {
|
||||
// line(player,"---!!The digsite Quest??/--", line++)
|
||||
// } else {
|
||||
// line(player,"!!The digsite Quest??", line++)
|
||||
// }
|
||||
// Ice Diamond
|
||||
const val attributeIceStage = "/save:quest:deserttreasure-icestage"
|
||||
const val attributeTrollKillCount = "/save:quest:deserttreasure-iciclecount"
|
||||
const val attributeKamilInstance = "quest:deserttreasure-kamilinstance"
|
||||
const val varbitFrozenFather = 380 // 0-frozen 1-defrosted | Base: 1943 Iced: 1944 Broke: 1948 Reunion: 1947
|
||||
const val varbitFrozenMother = 381 // 0-frozen 1-defrosted | Base: 1945 Iced: 1946 Broke: 1950 Reunion: 1949
|
||||
const val varbitChildReunite = 382 // 0-frozen 4-reunited 5-reunited 6-varbitfails/ends (This varbit seems to manage ice stages...)
|
||||
// 0 - start, 1 - feed the crying child, 2 - fought kamil, 3 - unfreeze dad/mum, 4 - reunite, 5 - all chat complete.
|
||||
const val varbitCaveEntrance = 378 // 6446 0 - 6 6441
|
||||
|
||||
// if (player.questRepository.isComplete("The Tourist Trap")) {
|
||||
// line(player,"---!!The Tourist Trap??/--", line++)
|
||||
// } else {
|
||||
// line(player,"!!The Tourist Trap??", line++)
|
||||
// }
|
||||
// Shadow Diamond
|
||||
const val attributeShadowStage = "/save:quest:deserttreasure-shadowstage"
|
||||
const val attributeDamisWarning = "quest:deserttreasure-damiswarning"
|
||||
const val attributeDamisInstance = "quest:deserttreasure-damisinstance"
|
||||
const val varbitRingOfVisibility = 393 // Set to 1 to show ladder and other cool stuff when wearing ring of visibility.
|
||||
|
||||
// if (player.questRepository.isComplete("The Temple of Ikov")) {
|
||||
// line(player,"---!!The Temple of Ikov??/--", line++)
|
||||
// } else {
|
||||
// line(player,"!!The Temple of Ikov??", line++)
|
||||
// }
|
||||
// Desert Treasure End
|
||||
const val attributeBloodDiamondInserted = "/save:quest:deserttreasure-blooddiamondinserted"
|
||||
const val attributeSmokeDiamondInserted = "/save:quest:deserttreasure-smokediamondinserted"
|
||||
const val attributeIceDiamondInserted = "/save:quest:deserttreasure-icediamondinserted"
|
||||
const val attributeShadowDiamondInserted = "/save:quest:deserttreasure-shadowdiamondinserted"
|
||||
const val varbitBloodObelisk = 390
|
||||
const val varbitSmokeObelisk = 387
|
||||
const val varbitIceObelisk = 389
|
||||
const val varbitShadowObelisk = 388
|
||||
|
||||
// if (player.questRepository.isComplete("Priest In Peril")) {
|
||||
// line(player,"---!!Priest In Peril??/--", line++)
|
||||
// } else {
|
||||
// line(player,"!!Priest In Peril??", line++)
|
||||
// }
|
||||
fun completedAllSubstages(player: Player): Boolean {
|
||||
return getSubStage(player, attributeBloodStage) == 100 &&
|
||||
getSubStage(player, attributeSmokeStage) == 100 &&
|
||||
getSubStage(player, attributeIceStage) == 100 &&
|
||||
getSubStage(player, attributeShadowStage) == 100
|
||||
}
|
||||
|
||||
// if (player.questRepository.isComplete("Waterfall Quest")) {
|
||||
// line(player,"---!!Waterfall Quest??/--", line++)
|
||||
// } else {
|
||||
// line(player,"!!Waterfall Quest??", line++)
|
||||
// }
|
||||
fun getSubStage(player: Player, attributeName: String): Int {
|
||||
return getAttribute(player, attributeName, 0)
|
||||
}
|
||||
|
||||
// if (player.questRepository.isComplete("Troll Stronghold")) {
|
||||
// line(player,"---!!Troll Stronghold??/--", line++)
|
||||
// } else {
|
||||
// line(player,"!!Troll Stronghold??", line++)
|
||||
// }
|
||||
fun setSubStage(player: Player, attributeName: String, value: Int) {
|
||||
return setAttribute(player, attributeName, value)
|
||||
}
|
||||
|
||||
fun hasRequirements(player: Player): Boolean {
|
||||
return arrayOf(
|
||||
hasLevelStat(player, Skills.SLAYER, 10),
|
||||
hasLevelStat(player, Skills.FIREMAKING, 50),
|
||||
hasLevelStat(player, Skills.MAGIC, 50),
|
||||
hasLevelStat(player, Skills.THIEVING, 53),
|
||||
isQuestComplete(player, Quests.THE_DIG_SITE),
|
||||
isQuestComplete(player, Quests.THE_TOURIST_TRAP),
|
||||
isQuestComplete(player, Quests.TEMPLE_OF_IKOV),
|
||||
isQuestComplete(player, Quests.PRIEST_IN_PERIL),
|
||||
isQuestComplete(player, Quests.WATERFALL_QUEST),
|
||||
isQuestComplete(player, Quests.TROLL_STRONGHOLD),
|
||||
).all { it }
|
||||
}
|
||||
}
|
||||
|
||||
override fun drawJournal(player: Player, stage: Int) {
|
||||
super.drawJournal(player, stage)
|
||||
var line = 12
|
||||
var stage = getStage(player)
|
||||
|
||||
var started = getQuestStage(player, questName) > 0
|
||||
|
||||
if(!started){
|
||||
line(player,"I can start this quest by speaking to !!The Archaeologist??", line++)
|
||||
line(player,"who is exploring the !!Bedabin Camp?? South West of the", line++)
|
||||
line(player,"!!Shantay Pass??.", line++)
|
||||
line(player,"To complete this quest I will need:", line++)
|
||||
line(player, "Level 10 Slayer", line++, hasLevelStat(player, Skills.SLAYER, 10))
|
||||
line(player, "Level 50 Firemaking", line++, hasLevelStat(player, Skills.FIREMAKING, 50))
|
||||
line(player, "Level 50 Magic", line++, hasLevelStat(player, Skills.MAGIC, 50))
|
||||
line(player, "Level 53 Thieving", line++, hasLevelStat(player, Skills.THIEVING, 53))
|
||||
line(player,"I must have completed the following quests:", line++) // After - I have completed all of the required quests:
|
||||
line(player, "The Digsite Quest", line++, isQuestComplete(player, Quests.THE_DIG_SITE))
|
||||
line(player, "The Tourist Trap", line++, isQuestComplete(player, Quests.THE_TOURIST_TRAP))
|
||||
line(player, "The Temple of Ikov", line++, isQuestComplete(player, Quests.TEMPLE_OF_IKOV))
|
||||
line(player, "Priest In Peril", line++, isQuestComplete(player, Quests.PRIEST_IN_PERIL))
|
||||
line(player, "Waterfall Quest", line++, isQuestComplete(player, Quests.WATERFALL_QUEST))
|
||||
line(player, "Troll Stronghold", line++, isQuestComplete(player, Quests.TROLL_STRONGHOLD))
|
||||
} else {
|
||||
|
||||
if (stage >= 2) {
|
||||
line(player, "I took some etchings of a stone tablet discovered by the", line++, true)
|
||||
line(player, "archaeologist in the desert to Terry Balando at the", line++, true)
|
||||
line(player, "Varrock digsite.", line++, true)
|
||||
} else if (stage >= 1) {
|
||||
line(player, "The !!archaeologist?? has given me some !!etchings from a??", line++, false)
|
||||
line(player, "!!stone tablet?? that he discovered in the desert somewhere,", line++, false)
|
||||
line(player, "and asked me to take it to an archaeological expert called", line++, false)
|
||||
line(player, "!!Terry Balando?? at the Varrock !!digsite??.", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 4) {
|
||||
line(player, "He made a rough translation, which I returned to the", line++, true)
|
||||
line(player, "archaeologist.", line++, true)
|
||||
} else if (stage == 3) {
|
||||
line(player, "Terry Balando made some quick !!translation notes?? of the", line++, false)
|
||||
line(player, "tablet and asked me to return them to the !!archaeologist?? in", line++, false)
|
||||
line(player, "the !!Bedabin Camp??.", line++, false)
|
||||
} else if (stage == 2) {
|
||||
line(player, "I should get the !!translation notes?? from !!Terry Balando??", line++, false)
|
||||
}
|
||||
|
||||
if(stage >= 5) {
|
||||
line(player, "The archaeologist I met in the desert seemed to think that", line++, true)
|
||||
line(player, "there was some hidden treasure in the desert somewhere,", line++, true)
|
||||
line(player, "I agreed to help him find it in return for a fifty percent", line++, true)
|
||||
line(player, "share of whatever we found.", line++, true)
|
||||
} else if (stage == 4) {
|
||||
line(player, "I should find out what the !!archaeologist?? has to say about", line++, false)
|
||||
line(player, "the !!translation notes??.", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 6) {
|
||||
line(player, "I headed South and found a Bandit Camp.", line++, true)
|
||||
} else if (stage >= 5) {
|
||||
line(player, "I should head South to the !!Bandit Camp?? and try to find out", line++, false)
|
||||
line(player, "more about this !!treasure??.", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 7) {
|
||||
line(player, "I asked around the Bandit Camp and discovered someone", line++, true)
|
||||
line(player, "who was willing to help me find the diamonds, by using a", line++, true)
|
||||
line(player, "magic spell and some scrying glasses.", line++, true)
|
||||
} else if (stage >= 6) {
|
||||
line(player, "After some searching, the barman let slip some", line++, true)
|
||||
line(player, "information about the 'Four Diamonds of Azzanadra'.", line++, true)
|
||||
line(player, "I should ask around the !!Bandit Camp?? and see if anyone", line++, false)
|
||||
line(player, "else has any information about the !!Four Diamonds of??", line++, false)
|
||||
line(player, "!!Azzanadra??", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 10 || (stage >= 9 && completedAllSubstages(player))) {
|
||||
// This disappears after you find all the diamonds.
|
||||
} else if (stage >= 8) {
|
||||
line(player, "I brought Eblis the ingredients so that he could cast the", line++, true)
|
||||
line(player, "spell to see the places touched by the magic of the", line++, true)
|
||||
line(player, "diamonds.", line++, true)
|
||||
} else if (stage >= 7) {
|
||||
// Crosses out gradually as you SUBMIT them.
|
||||
line(player, "To make the scrying glasses I need to bring the following", line++, false)
|
||||
// Crosses out with "I have brought him all xxx(6 Steel bars)"
|
||||
line(player, "items to Eblis:", line++, false)
|
||||
line(player, "!!12 Magic logs??", line++, false)
|
||||
line(player, "!!6 Steel bars??", line++, false)
|
||||
line(player, "!!6 Molten glass??", line++, false)
|
||||
line(player, "To cast the spell I will need to bring Eblis:", line++, false)
|
||||
// Crosses out with "I have brought him xxx(some bones)"
|
||||
line(player, "!!Some bones??", line++, false)
|
||||
line(player, "!!Some ash??", line++, false)
|
||||
line(player, "!!Some charcoal??", line++, false)
|
||||
line(player, "!!A blood rune??", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 10 || (stage >= 9 && completedAllSubstages(player))) {
|
||||
// This disappears after you find all the diamonds.
|
||||
} else if (stage >= 9 && !completedAllSubstages(player)) {
|
||||
// This was supposed to disappear... youtu.be/J4cQMY66MI4 is old but disagrees
|
||||
line(player, "I headed East into the desert and used the scrying", line++, true)
|
||||
line(player, "glasses set up for me there by Eblis to try and find the", line++, true)
|
||||
line(player, "Four Diamonds of Azzanadra.", line++, true)
|
||||
line++
|
||||
} else if (stage >= 8) {
|
||||
line(player, "I should head !!East into the desert?? and meet Eblis where he", line++, false)
|
||||
line(player, "has set up the scrying glasses, and use them to try and", line++, false)
|
||||
line(player, "track down the !!Four Diamonds of Azzanadra??.", line++, false)
|
||||
line++
|
||||
}
|
||||
|
||||
|
||||
// line(player,"", line++)
|
||||
//}
|
||||
// }
|
||||
//}
|
||||
// The huge one with sub quests.
|
||||
if (stage >= 9 && completedAllSubstages(player)) {
|
||||
line(player, "I found all four diamonds using this spell.", line++, true)
|
||||
} else if (stage == 9) {
|
||||
line++
|
||||
// DIAMOND OF BLOOD (DESSOUS)
|
||||
// Dessous returns to his grave, bored of toying with you. // https://youtu.be/7CvfS7pypso
|
||||
if (getSubStage(player, attributeBloodStage) == 100) {
|
||||
line(player, "I defeated a vampire named Dessous to claim the Diamond", line++, true)
|
||||
line(player, "of Blood.", line++, true)
|
||||
} else if (getSubStage(player, attributeBloodStage) >= 1) {
|
||||
// ZSOCwWEwimM 4:25 helped the first line.
|
||||
line(player, "I discovered that the location of the Diamond of Blood was", line++, true)
|
||||
line(player, "somewhere in Morytania, and in the possession of a", line++, true)
|
||||
line(player, "vampire warrior named Dessous.", line++, true)
|
||||
|
||||
// override fun finish(player: Player) {
|
||||
// var ln = 10
|
||||
// super.finish(player)
|
||||
// player.packetDispatch.sendString("You have completed Desert Treasure!", 277, 4)
|
||||
// player.packetDispatch.sendItemZoomOnInterface(1891, 240, 277, 5)
|
||||
//
|
||||
// drawReward(player,"3 Quest Points", ln++)
|
||||
// drawReward(player,"20,000 Magic XP", ln++)
|
||||
// drawReward(player,"Ability to use", ln++)
|
||||
// drawReward(player,"Ancient Magicks", ln)
|
||||
if (getSubStage(player, attributeBloodStage) >= 3) {
|
||||
line(player, "I don't fully trust Malek, but he has agreed to help me kill", line++, true)
|
||||
line(player, "Dessous.", line++, true)
|
||||
|
||||
// player.skills.addExperience(Skills.MAGIC, 20000.0)
|
||||
line(player, "I made a special blessed pot, filled with blood, garlic and", line++, true)
|
||||
line(player, "spices, which I used to lure Dessous from his tomb.", line++, true)
|
||||
line(player, "I managed to defeat the vampire warrior Dessous, but", line++, true)
|
||||
line(player, "there was no sign of the Diamond of Blood anywhere.", line++, true)
|
||||
line(player, "I should find out what game !!Malek?? has been playing with", line++, false)
|
||||
line(player, "me, and where I can actually find the !!Diamond of Blood??.", line++, false)
|
||||
} else if (getSubStage(player, attributeBloodStage) >= 2) {
|
||||
line(player, "I don't fully trust Malek, but he has agreed to help me kill", line++, true)
|
||||
line(player, "Dessous.", line++, true)
|
||||
|
||||
// }
|
||||
// None of these lines cross out when you do it. So it remains like this.
|
||||
line(player, "Apparently I can find an old !!assistant of Count Draynor?? in", line++, false)
|
||||
line(player, "the !!sewers of Draynor Village??, who will be able to help me", line++, false)
|
||||
line(player, "make a !!sacrificial pot??", line++, false)
|
||||
line(player, "I then need to take that !!sacrificial pot?? to !!Entrana?? and get", line++, false)
|
||||
line(player, "it blessed by the !!head priest??", line++, false)
|
||||
line(player, "When I have done that, I should return to !!Malak??, and he will", line++, false)
|
||||
line(player, "provide me with some !!fresh blood??", line++, false)
|
||||
line(player, "I then need to add !!garlic?? and !!spices?? to the pot in order to", line++, false)
|
||||
line(player, "lure Dessous from his tomb.", line++, false)
|
||||
line(player, "When I have done all of this, I must !!kill Dessous!??", line++, false)
|
||||
} else if (getSubStage(player, attributeBloodStage) >= 1) {
|
||||
line(player, "I should speak to !!Malek?? again and find out how exactly I", line++, false)
|
||||
line(player, "can kill !!Dessous??.", line++, false) // This doesn't stay
|
||||
}
|
||||
} else if (getSubStage(player, attributeBloodStage) == 0) {
|
||||
line(player, "I can use the !!scrying glasses?? to help find the", line++, false)
|
||||
line(player, "!!Diamond of Blood??.", line++, false)
|
||||
}
|
||||
|
||||
// override fun newInstance(`object`: Any?): Quest {
|
||||
// return this
|
||||
// }
|
||||
//}
|
||||
line++
|
||||
// DIAMOND OF SMOKE (FAREED)
|
||||
// Fareed has lost interest in you, and returned to his flames.
|
||||
if (getSubStage(player, attributeSmokeStage) == 100) {
|
||||
line(player, "I defeated a fire warrior, and now have the Diamond of", line++, true)
|
||||
line(player, "Smoke.", line++, true)
|
||||
} else if (getSubStage(player, attributeSmokeStage) >= 1) {
|
||||
line(player, "I entered a smokey well and lit up the path. I found a", line++, true) // Derived.
|
||||
line(player, "key in a chest.", line++, true) // Derived.
|
||||
line(player, "I should find out what the !!key?? unlocks.", line++, false) // Derived.
|
||||
} else if (getSubStage(player, attributeSmokeStage) == 0) {
|
||||
// This doesn't change to stage 1 even when you are lighting the fires...
|
||||
line(player, "I can use the !!scrying glasses?? to help find the", line++, false)
|
||||
line(player, "!!Diamond of Smoke??.", line++, false)
|
||||
}
|
||||
|
||||
line++
|
||||
// DIAMOND OF ICE (KAMIL)
|
||||
// Kamil vanishes on an icy wind...
|
||||
if (getSubStage(player, attributeIceStage) == 100) {
|
||||
line(player, "I defeated a warrior named Kamil, and now have the", line++, true)
|
||||
line(player, "Diamond of Ice.", line++, true)
|
||||
} else if (getSubStage(player, attributeIceStage) >= 1) {
|
||||
// https://www.youtube.com/watch?v=F5F6Ds-T1P8 28:52
|
||||
line(player, "I met a crying ice troll child to the North of Trollheim.", line++, true)
|
||||
if (getSubStage(player, attributeIceStage) >= 3) {
|
||||
line(player, "I managed to cheer him up slightly with a sweet treat.", line++, true)
|
||||
line(player, "After speaking with him, I discovered that his parents had", line++, true)
|
||||
line(player, "been hurt by a 'bad man' who had the Diamond of Ice, and I", line++, true)
|
||||
line(player, "agreed to help him rescue them.", line++, true)
|
||||
line(player, "While heading through the icy area, I was attacked by an", line++, true)
|
||||
line(player, "ice warrior named Kamil, and managed to defeat him.", line++, true)
|
||||
line(player, "Was this the 'bad man' the troll child has spoken of?", line++, true)
|
||||
line(player, "I should head further into the icy area to try and find", line++, false)
|
||||
line(player, "them.", line++, false)
|
||||
} else if (getSubStage(player, attributeIceStage) >= 2) {
|
||||
line(player, "I managed to cheer him up slightly with a sweet treat.", line++, true)
|
||||
line(player, "After speaking with him, I discovered that his parents had", line++, true)
|
||||
line(player, "been hurt by a 'bad man' who had the Diamond of Ice, and I", line++, true)
|
||||
line(player, "agreed to help him rescue them.", line++, true)
|
||||
line(player, "I should head further into the icy area to try and find", line++, false)
|
||||
line(player, "them.", line++, false)
|
||||
} else if (getSubStage(player, attributeIceStage) >= 1) {
|
||||
line(player, "I should cheer him up with something sweet.", line++, false) // Derived
|
||||
}
|
||||
} else if (getSubStage(player, attributeIceStage) == 0) {
|
||||
line(player, "I can use the !!scrying glasses?? to help find the", line++, false)
|
||||
line(player, "!!Diamond of Ice??.", line++, false)
|
||||
}
|
||||
|
||||
line++
|
||||
// DIAMOND OF SHADOW (DAMIS)
|
||||
// Damis has vanished once more into the shadows...
|
||||
if (getSubStage(player, attributeShadowStage) == 100) {
|
||||
line(player, "I defeated a warrior named Damis, and now have the", line++, true)
|
||||
line(player, "Diamond of Shadow.", line++, true)
|
||||
} else if (getSubStage(player, attributeShadowStage) >= 1) {
|
||||
line(player, "A travelling merchant named Rasolo had some information", line++, true)
|
||||
line(player, "about the Diamond of Shadow.", line++, true)
|
||||
line(player, "Apparently it was owned by an invisible warrior, who I", line++, true)
|
||||
line(player, "needed a special ring to see.", line++, true)
|
||||
line(player, "Rasolo owned such a ring, but would only trade it in return", line++, true)
|
||||
line(player, "for a gilded cross stolen from him by a bandit named.", line++, true)
|
||||
line(player, "Laheeb.", line++, true)
|
||||
if (getSubStage(player, attributeShadowStage) >= 3) {
|
||||
line(player, "I found Laheeb's treasure chest, and managed to bypass", line++, true)
|
||||
line(player, "the traps on it to take the gilded cross, which I returned to", line++, true)
|
||||
line(player, "Rasolo.", line++, true)
|
||||
line(player, "In return, he gave me the Ring of Visibility.", line++, true)
|
||||
line(player, "I should put the !!Ring of Visibility?? on and try and find the", line++, false)
|
||||
line(player, "hidden home of !!Damis?? - Rasolo suggested it was very", line++, false)
|
||||
line(player, "close by to where he is...", line++, false)
|
||||
} else if (getSubStage(player, attributeShadowStage) >= 2) {
|
||||
line(player, "I found Laheeb's treasure chest, and managed to bypass", line++, true)
|
||||
line(player, "the traps on it to take the gilded cross.", line++, true)
|
||||
line(player, "I need to return the !!gilded cross?? to !!Rasolo??.", line++, false) // Derived
|
||||
} else if (getSubStage(player, attributeShadowStage) >= 1) {
|
||||
line(player, "I need to find !!Laheeb's loot?? and retrieve the stolen !!gilded??", line++, false)
|
||||
line(player, "!!cross??.", line++, false)
|
||||
}
|
||||
} else if (getSubStage(player, attributeShadowStage) == 0) {
|
||||
line(player, "I can use the !!scrying glasses?? to help find the", line++, false)
|
||||
line(player, "!!Diamond of Shadow??.", line++, false)
|
||||
}
|
||||
}
|
||||
|
||||
// If you hold a diamond too long a stranger will try to kill you.
|
||||
// https://oldschool.runescape.wiki/w/Transcript:Stranger
|
||||
// After defeating the stranger
|
||||
// player(THINKING, "I wonder what that was all about?")
|
||||
|
||||
// After all 4 diamonds
|
||||
// Player dialogue("I should make sure I have all four diamonds with me", "before speaking to Eblis again.")
|
||||
|
||||
if (stage >= 10) {
|
||||
// This disappears after you place all the diamonds.
|
||||
} else if (stage >= 9 && completedAllSubstages(player)) {
|
||||
line(player, "Now that I have recovered all of the !!Diamonds of??", line++, false)
|
||||
line(player, "!!Azzanadra?? I should take them all to !!Eblis?? and find out what.", line++, false)
|
||||
line(player, "is so special about them.", line++, false)
|
||||
// This is the current message even AFTER you speak to Eblis... baQ6oJOk7Gc
|
||||
}
|
||||
|
||||
if (stage >= 11) {
|
||||
// This disappears at the end of this quest.
|
||||
} else if (stage >= 10) {
|
||||
line(player, "I should explore the !!pyramid?? and see what !!treasure?? awaits", line++, false)
|
||||
line(player, "me!", line++, false)
|
||||
}
|
||||
|
||||
if (stage >= 100) {
|
||||
line(player, "At the heart of the pyramid I found a strange being, who", line++, true)
|
||||
line(player, "gave me some powerful new magic spells.", line++, true)
|
||||
line(player, "I can switch between my old spells and my new spells any", line++, true)
|
||||
line(player, "time by using the altar there, and can avoid the traps by", line++, true)
|
||||
line(player, "using the secret passage.", line++, true)
|
||||
line++
|
||||
line++
|
||||
line(player,"<col=FF0000>QUEST COMPLETE!</col>", line)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun reset(player: Player) {
|
||||
setVarbit(player, varbitChildReunite, 0, true)
|
||||
|
||||
removeAttribute(player, attributeBoughtBeer)
|
||||
removeAttribute(player, attributeCountMagicLogs)
|
||||
removeAttribute(player, attributeCountSteelBars)
|
||||
removeAttribute(player, attributeCountMoltenGlass)
|
||||
removeAttribute(player, attributeCountBones)
|
||||
removeAttribute(player, attributeCountAshes)
|
||||
removeAttribute(player, attributeCountCharcoal)
|
||||
removeAttribute(player, attributeCountBloodRune)
|
||||
setVarbit(player, varbitMirrors, 0, true)
|
||||
|
||||
removeAttribute(player, attributeBloodStage)
|
||||
removeAttribute(player, attributeDessousInstance)
|
||||
|
||||
removeAttribute(player, attributeSmokeStage)
|
||||
removeAttribute(player, attributeFareedInstance)
|
||||
removeAttribute(player, attributeUnlockedGate)
|
||||
setVarbit(player, varbitStandingTorchNorthEast, 0, true)
|
||||
setVarbit(player, varbitStandingTorchSouthEast, 0, true)
|
||||
setVarbit(player, varbitStandingTorchSouthWest, 0, true)
|
||||
setVarbit(player, varbitStandingTorchNorthWest, 0, true)
|
||||
|
||||
removeAttribute(player, attributeIceStage)
|
||||
removeAttribute(player, attributeKamilInstance)
|
||||
removeAttribute(player, attributeTrollKillCount)
|
||||
setVarbit(player, varbitFrozenFather, 0, true) // 0-frozen 1-defrosted
|
||||
setVarbit(player, varbitFrozenMother, 0, true) // 0-frozen 1-defrosted
|
||||
setVarbit(player, varbitChildReunite, 0, true) // 0-frozen 4-reunited 5-reunited 6-varbitfails/ends (This varbit seems to manage ice stages...)
|
||||
setVarbit(player, varbitCaveEntrance, 0, true) // 6446 0 - 6 6441
|
||||
|
||||
removeAttribute(player, attributeShadowStage)
|
||||
removeAttribute(player, attributeDamisInstance)
|
||||
removeAttribute(player, attributeDamisWarning)
|
||||
setVarbit(player, varbitRingOfVisibility, 0, true) // Set to 1 to show ladder when wearing ring of visibility.
|
||||
|
||||
removeAttribute(player, attributeBloodDiamondInserted)
|
||||
removeAttribute(player, attributeSmokeDiamondInserted)
|
||||
removeAttribute(player, attributeIceDiamondInserted)
|
||||
removeAttribute(player, attributeShadowDiamondInserted)
|
||||
setVarbit(player, varbitBloodObelisk, 0, true)
|
||||
setVarbit(player, varbitSmokeObelisk, 0, true)
|
||||
setVarbit(player, varbitIceObelisk, 0, true)
|
||||
setVarbit(player, varbitShadowObelisk, 0, true)
|
||||
}
|
||||
|
||||
|
||||
override fun finish(player: Player) {
|
||||
var ln = 10
|
||||
super.finish(player)
|
||||
player.packetDispatch.sendString("You have completed the Desert Treasure Quest!", 277, 4)
|
||||
player.packetDispatch.sendItemZoomOnInterface(Items.ANCIENT_STAFF_4675, 240, 277, 5)
|
||||
|
||||
drawReward(player,"3 Quest Points", ln++)
|
||||
drawReward(player,"20,000 Magic XP", ln++)
|
||||
drawReward(player,"Ancient Magicks", ln)
|
||||
|
||||
player.skills.addExperience(Skills.MAGIC, 20000.0)
|
||||
}
|
||||
|
||||
override fun setStage(player: Player, stage: Int) {
|
||||
super.setStage(player, stage)
|
||||
this.updateVarps(player)
|
||||
}
|
||||
|
||||
override fun updateVarps(player: Player) {
|
||||
|
||||
// Ice: Cave Entrance Varbit
|
||||
setVarbit(player, varbitCaveEntrance, getAttribute(player,attributeTrollKillCount, 0))
|
||||
|
||||
// Shadow: Ring of Visibility Ladder Varbit
|
||||
if (inEquipment(player, Items.RING_OF_VISIBILITY_4657)) {
|
||||
setVarbit(player, varbitRingOfVisibility, 1)
|
||||
} else {
|
||||
setVarbit(player, varbitRingOfVisibility, 0)
|
||||
}
|
||||
|
||||
// Obelisks Varbits
|
||||
if (getAttribute(player, attributeBloodDiamondInserted, 0) == 1) {
|
||||
setVarbit(player, varbitBloodObelisk, 1)
|
||||
} else {
|
||||
setVarbit(player, varbitBloodObelisk, 0)
|
||||
}
|
||||
|
||||
if (getAttribute(player, attributeSmokeDiamondInserted, 0) == 1) {
|
||||
setVarbit(player, varbitSmokeObelisk, 1)
|
||||
} else {
|
||||
setVarbit(player, varbitSmokeObelisk, 0)
|
||||
}
|
||||
|
||||
if (getAttribute(player, attributeIceDiamondInserted, 0) == 1) {
|
||||
setVarbit(player, varbitIceObelisk, 1)
|
||||
} else {
|
||||
setVarbit(player, varbitIceObelisk, 0)
|
||||
}
|
||||
|
||||
if (getAttribute(player, attributeShadowDiamondInserted, 0) == 1) {
|
||||
setVarbit(player, varbitShadowObelisk, 1)
|
||||
} else {
|
||||
setVarbit(player, varbitShadowObelisk, 0)
|
||||
}
|
||||
|
||||
// Special Varbit for Ice Stage
|
||||
if (getAttribute(player, attributeIceStage, 0) > 5) {
|
||||
setVarbit(player, varbitChildReunite, 5)
|
||||
} else {
|
||||
setVarbit(player, varbitChildReunite, 0)
|
||||
}
|
||||
|
||||
// Stage Varbits
|
||||
if(getQuestStage(player, questName) == 0) {
|
||||
setVarbit(player, varbitDesertTreasure, 0, true)
|
||||
setVarbit(player, varbitMirrors, 0, true)
|
||||
}
|
||||
if(getQuestStage(player, questName) in 1..7) {
|
||||
setVarbit(player, varbitDesertTreasure, 1, true)
|
||||
setVarbit(player, varbitMirrors, 0, true)
|
||||
}
|
||||
if(getQuestStage(player, questName) in 8..9) {
|
||||
setVarbit(player, varbitDesertTreasure, 10, true)
|
||||
setVarbit(player, varbitMirrors, 1, true)
|
||||
}
|
||||
if(getQuestStage(player, questName) == 10) {
|
||||
setVarbit(player, varbitDesertTreasure, 13, true)
|
||||
setVarbit(player, varbitMirrors, 1, true)
|
||||
}
|
||||
if(getQuestStage(player, questName) >= 100) {
|
||||
setVarbit(player, varbitDesertTreasure, 15, true)
|
||||
setVarbit(player, varbitMirrors, 1, true)
|
||||
}
|
||||
}
|
||||
|
||||
override fun newInstance(`object`: Any?): Quest {
|
||||
return this
|
||||
}
|
||||
}
|
||||
+464
@@ -0,0 +1,464 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.activity.Cutscene
|
||||
import core.game.global.action.DoorActionHandler
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Location
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class DesertTreasureListeners : InteractionListener {
|
||||
|
||||
companion object {
|
||||
fun allDiamondsInserted(player: Player): Boolean{
|
||||
return getAttribute(player, DesertTreasure.attributeBloodDiamondInserted, 0) == 1 &&
|
||||
getAttribute(player, DesertTreasure.attributeSmokeDiamondInserted, 0) == 1 &&
|
||||
getAttribute(player, DesertTreasure.attributeIceDiamondInserted, 0) == 1 &&
|
||||
getAttribute(player, DesertTreasure.attributeShadowDiamondInserted, 0) == 1
|
||||
}
|
||||
}
|
||||
var temp = 6517
|
||||
|
||||
override fun defineListeners() {
|
||||
|
||||
// THE MIRRORS
|
||||
on(Scenery.MYSTICAL_MIRROR_6423, SCENERY, "look-into") { player, node ->
|
||||
SouthMirrorLookCutscene(player).start()
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.MYSTICAL_MIRROR_6425, SCENERY, "look-into") { player, node ->
|
||||
SouthWestMirrorLookCutscene(player).start()
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.MYSTICAL_MIRROR_6427, SCENERY, "look-into") { player, node ->
|
||||
NorthWestMirrorLookCutscene(player).start()
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.MYSTICAL_MIRROR_6429, SCENERY, "look-into") { player, node ->
|
||||
NorthMirrorLookCutscene(player).start()
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.MYSTICAL_MIRROR_6431, SCENERY, "look-into") { player, node ->
|
||||
NorthEastMirrorLookCutscene(player).start()
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.MYSTICAL_MIRROR_6433, SCENERY, "look-into") { player, node ->
|
||||
SouthEastMirrorLookCutscene(player).start()
|
||||
return@on true
|
||||
}
|
||||
|
||||
|
||||
// THE OBELISKS
|
||||
onUseWith(IntType.SCENERY, intArrayOf(Items.ICE_DIAMOND_4671, Items.SMOKE_DIAMOND_4672, Items.SHADOW_DIAMOND_4673), Scenery.OBELISK_6483) { player, used, with ->
|
||||
sendMessage(player, "That doesn't appear to be the correct diamond...")
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, Items.BLOOD_DIAMOND_4670, Scenery.OBELISK_6483) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.MAGIC) > 50) {
|
||||
if (removeItem(player, used)) {
|
||||
sendMessage(player, "The diamond is absorbed into the pillar.")
|
||||
setVarbit(player, DesertTreasure.varbitBloodObelisk, 1)
|
||||
setAttribute(player, DesertTreasure.attributeBloodDiamondInserted, 1)
|
||||
if (allDiamondsInserted(player)) {
|
||||
sendMessage(player, "The force preventing access to the Pyramid has now vanished.")
|
||||
if (getQuestStage(player, DesertTreasure.questName) == 9) {
|
||||
setQuestStage(player, DesertTreasure.questName, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You are not a powerful enough mage to breach the protective aura.")
|
||||
sendMessage(player, "You need a magic level of at least 50 to enter the Pyramid.")
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, intArrayOf(Items.BLOOD_DIAMOND_4670, Items.ICE_DIAMOND_4671, Items.SHADOW_DIAMOND_4673), Scenery.OBELISK_6486) { player, used, with ->
|
||||
sendMessage(player, "That doesn't appear to be the correct diamond...")
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, Items.SMOKE_DIAMOND_4672, Scenery.OBELISK_6486) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.MAGIC) > 50) {
|
||||
if (removeItem(player, used)) {
|
||||
sendMessage(player, "The diamond is absorbed into the pillar.")
|
||||
setVarbit(player, DesertTreasure.varbitSmokeObelisk, 1)
|
||||
setAttribute(player, DesertTreasure.attributeSmokeDiamondInserted, 1)
|
||||
if (allDiamondsInserted(player)) {
|
||||
sendMessage(player, "The force preventing access to the Pyramid has now vanished.")
|
||||
if (getQuestStage(player, DesertTreasure.questName) == 9) {
|
||||
setQuestStage(player, DesertTreasure.questName, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You are not a powerful enough mage to breach the protective aura.")
|
||||
sendMessage(player, "You need a magic level of at least 50 to enter the Pyramid.")
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, intArrayOf(Items.BLOOD_DIAMOND_4670, Items.SMOKE_DIAMOND_4672, Items.SHADOW_DIAMOND_4673), Scenery.OBELISK_6489) { player, used, with ->
|
||||
sendMessage(player, "That doesn't appear to be the correct diamond...")
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, Items.ICE_DIAMOND_4671, Scenery.OBELISK_6489) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.MAGIC) > 50) {
|
||||
if (removeItem(player, used)) {
|
||||
sendMessage(player, "The diamond is absorbed into the pillar.")
|
||||
setVarbit(player, DesertTreasure.varbitIceObelisk, 1)
|
||||
setAttribute(player, DesertTreasure.attributeIceDiamondInserted, 1)
|
||||
if (allDiamondsInserted(player)) {
|
||||
sendMessage(player, "The force preventing access to the Pyramid has now vanished.")
|
||||
if (getQuestStage(player, DesertTreasure.questName) == 9) {
|
||||
setQuestStage(player, DesertTreasure.questName, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You are not a powerful enough mage to breach the protective aura.")
|
||||
sendMessage(player, "You need a magic level of at least 50 to enter the Pyramid.")
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, intArrayOf(Items.BLOOD_DIAMOND_4670, Items.ICE_DIAMOND_4671, Items.SMOKE_DIAMOND_4672), Scenery.OBELISK_6492) { player, used, with ->
|
||||
sendMessage(player, "That doesn't appear to be the correct diamond...")
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(IntType.SCENERY, Items.SHADOW_DIAMOND_4673, Scenery.OBELISK_6492) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.MAGIC) > 50) {
|
||||
if (removeItem(player, used)) {
|
||||
sendMessage(player, "The diamond is absorbed into the pillar.")
|
||||
setVarbit(player, DesertTreasure.varbitShadowObelisk, 1)
|
||||
setAttribute(player, DesertTreasure.attributeShadowDiamondInserted, 1)
|
||||
if (allDiamondsInserted(player)) {
|
||||
sendMessage(player, "The force preventing access to the Pyramid has now vanished.")
|
||||
if (getQuestStage(player, DesertTreasure.questName) == 9) {
|
||||
setQuestStage(player, DesertTreasure.questName, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You are not a powerful enough mage to breach the protective aura.")
|
||||
sendMessage(player, "You need a magic level of at least 50 to enter the Pyramid.")
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// THE DOOR
|
||||
on(intArrayOf(Scenery.PYRAMID_ENTRANCE_6545, Scenery.PYRAMID_ENTRANCE_6547), SCENERY, "open") { player, node ->
|
||||
if (allDiamondsInserted(player)) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
|
||||
} else {
|
||||
sendMessage(player, "A mystical power has sealed this door...")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
// THE LADDERS
|
||||
on(Scenery.LADDER_6497, SCENERY, "climb-down") { player, node ->
|
||||
teleport(player, Location(2913, 4954, 3))
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.LADDER_6504, SCENERY, "climb-up") { player, node ->
|
||||
teleport(player, Location(3233, 2898, 0))
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.LADDER_6498, SCENERY, "climb-down") { player, node ->
|
||||
teleport(player, Location(2846, 4964, 2))
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.LADDER_6503, SCENERY, "climb-up") { player, node ->
|
||||
teleport(player, Location(2909, 4963, 3))
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.LADDER_6499, SCENERY, "climb-down") { player, node ->
|
||||
teleport(player, Location(2782, 4972, 1))
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.LADDER_6502, SCENERY, "climb-up") { player, node ->
|
||||
teleport(player, Location(2845, 4973, 2))
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.LADDER_6500, SCENERY, "climb-down") { player, node ->
|
||||
teleport(player, Location(3233, 9293, 0))
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.LADDER_6501, SCENERY, "climb-up") { player, node ->
|
||||
teleport(player, Location(2783, 4941, 1))
|
||||
return@on true
|
||||
}
|
||||
|
||||
on((6512..6517).toIntArray(), SCENERY, "search") { player, node ->
|
||||
// Technically there is loot, but I'm lazy as hell.
|
||||
sendMessage(player, "You don't find anything interesting.")
|
||||
return@on true
|
||||
}
|
||||
|
||||
// After Quest
|
||||
|
||||
// Backdoor
|
||||
on(Scenery.TUNNEL_6481, SCENERY, "enter") { player, node ->
|
||||
if (isQuestComplete(player, DesertTreasure.questName)){
|
||||
teleport(player, Location(3233, 9313, 0))
|
||||
} else {
|
||||
sendMessage(player, "This passage does not seem to lead anywhere...") // https://youtu.be/uNkBucGaqac
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
// Portal, which only appears after DT
|
||||
on(Scenery.PORTAL_6551, SCENERY, "use") { player, node ->
|
||||
teleport(player, Location(3233, 2887, 0))
|
||||
return@on true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// https://www.youtube.com/watch?v=yMwp78OI2y8
|
||||
|
||||
// Ice Troll
|
||||
class NorthMirrorLookCutscene(player: Player) : Cutscene(player) {
|
||||
|
||||
override fun setup() {
|
||||
setExit(player.location.transform(0, 0, 0))
|
||||
loadRegion(11322)
|
||||
}
|
||||
|
||||
override fun runStage(stage: Int) {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, 5, 27)
|
||||
moveCamera(5, 27, 1000)
|
||||
rotateCamera(6, 27, 1000)
|
||||
timedUpdate(1)
|
||||
}
|
||||
2 -> {
|
||||
openInterface(player, 155)
|
||||
closeOverlay()
|
||||
timedUpdate(6)
|
||||
}
|
||||
3-> {
|
||||
closeInterface(player)
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
4-> {
|
||||
end(false){
|
||||
fadeFromBlack()
|
||||
// resetCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Canifis
|
||||
class NorthEastMirrorLookCutscene(player: Player) : Cutscene(player) {
|
||||
|
||||
override fun setup() {
|
||||
setExit(player.location.transform(0, 0, 0))
|
||||
loadRegion(13878)
|
||||
}
|
||||
|
||||
override fun runStage(stage: Int) {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, 47, 31)
|
||||
moveCamera(47, 31, 1000)
|
||||
rotateCamera(43, 31, 1000)
|
||||
timedUpdate(1)
|
||||
}
|
||||
2 -> {
|
||||
openInterface(player, 155)
|
||||
closeOverlay()
|
||||
timedUpdate(6)
|
||||
}
|
||||
3-> {
|
||||
closeInterface(player)
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
4-> {
|
||||
end(false){
|
||||
fadeFromBlack()
|
||||
// resetCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Smoke Dungeon
|
||||
class SouthEastMirrorLookCutscene(player: Player) : Cutscene(player) {
|
||||
|
||||
override fun setup() {
|
||||
setExit(player.location.transform(0, 0, 0))
|
||||
loadRegion(13102)
|
||||
}
|
||||
|
||||
override fun runStage(stage: Int) {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, 36, 20)
|
||||
moveCamera(36, 20, 1000)
|
||||
rotateCamera(44, 20, 1000)
|
||||
timedUpdate(1)
|
||||
}
|
||||
2 -> {
|
||||
openInterface(player, 155)
|
||||
closeOverlay()
|
||||
timedUpdate(6)
|
||||
}
|
||||
3-> {
|
||||
closeInterface(player)
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
4-> {
|
||||
end(false){
|
||||
fadeFromBlack()
|
||||
// resetCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pyramid
|
||||
class SouthMirrorLookCutscene(player: Player) : Cutscene(player) {
|
||||
|
||||
override fun setup() {
|
||||
setExit(player.location.transform(0, 0, 0))
|
||||
loadRegion(12845)
|
||||
}
|
||||
|
||||
override fun runStage(stage: Int) {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, 33, 41)
|
||||
moveCamera(33, 41, 1000)
|
||||
rotateCamera(33, 39, 990)
|
||||
timedUpdate(1)
|
||||
}
|
||||
2 -> {
|
||||
openInterface(player, 155)
|
||||
closeOverlay()
|
||||
timedUpdate(6)
|
||||
}
|
||||
3-> {
|
||||
closeInterface(player)
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
4-> {
|
||||
end(false){
|
||||
fadeFromBlack()
|
||||
// resetCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bedabin
|
||||
class SouthWestMirrorLookCutscene(player: Player) : Cutscene(player) {
|
||||
|
||||
override fun setup() {
|
||||
setExit(player.location.transform(0, 0, 0))
|
||||
loadRegion(12590)
|
||||
}
|
||||
|
||||
override fun runStage(stage: Int) {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, 40, 39)
|
||||
moveCamera(40, 39, 1200)
|
||||
rotateCamera(10, 39, 1200)
|
||||
timedUpdate(1)
|
||||
}
|
||||
2 -> {
|
||||
openInterface(player, 155)
|
||||
closeOverlay()
|
||||
timedUpdate(6)
|
||||
}
|
||||
3-> {
|
||||
closeInterface(player)
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
4-> {
|
||||
end(false){
|
||||
fadeFromBlack()
|
||||
// resetCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rasolo
|
||||
class NorthWestMirrorLookCutscene(player: Player) : Cutscene(player) {
|
||||
|
||||
override fun setup() {
|
||||
setExit(player.location.transform(0, 0, 0))
|
||||
loadRegion(10037)
|
||||
}
|
||||
|
||||
override fun runStage(stage: Int) {
|
||||
when (stage) {
|
||||
0 -> {
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player, 56, 40)
|
||||
moveCamera(56, 40, 1400)
|
||||
rotateCamera(56, 35, 1000)
|
||||
timedUpdate(1)
|
||||
}
|
||||
2 -> {
|
||||
openInterface(player, 155)
|
||||
closeOverlay()
|
||||
timedUpdate(6)
|
||||
}
|
||||
3-> {
|
||||
closeInterface(player)
|
||||
fadeToBlack()
|
||||
timedUpdate(4)
|
||||
}
|
||||
4-> {
|
||||
end(false){
|
||||
fadeFromBlack()
|
||||
// resetCamera()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import content.region.kandarin.quest.templeofikov.TempleOfIkov
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueFile
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.combat.*
|
||||
import core.game.node.entity.combat.equipment.SwitchAttack
|
||||
import core.game.node.entity.impl.Projectile
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.prayer.PrayerType
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import core.game.world.update.flag.context.Graphics
|
||||
import core.tools.END_DIALOGUE
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class DessousMeleeBehavior : NPCBehavior(NPCs.DESSOUS_1914, NPCs.DESSOUS_1915) {
|
||||
|
||||
var clearTime = 0
|
||||
|
||||
override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean): Boolean {
|
||||
if (attacker is Player) {
|
||||
if (attacker == getAttribute<Player?>(self, "target", null)) {
|
||||
return true
|
||||
}
|
||||
sendMessage(attacker, "It's not after you...")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun tick(self: NPC): Boolean{
|
||||
// Dessous just continually hisses independently of projectile fires.
|
||||
if (self.id == NPCs.DESSOUS_1915 && self.properties.combatPulse.isInCombat) {
|
||||
animate(self, Animation(1914))
|
||||
}
|
||||
// This is probably the prayer flicking nonsense.
|
||||
val player: Player? = getAttribute<Player?>(self, "target", null)
|
||||
if (self.id == NPCs.DESSOUS_1914 && player != null && player.prayer.get(PrayerType.PROTECT_FROM_MELEE)) {
|
||||
self.transform(NPCs.DESSOUS_1915)
|
||||
Graphics.send(Graphics(86), self.location)
|
||||
} else if (self.id == NPCs.DESSOUS_1915 && player != null && (player.prayer.get(PrayerType.PROTECT_FROM_MAGIC) || player.prayer.get(PrayerType.PROTECT_FROM_MISSILES))) {
|
||||
self.transform(NPCs.DESSOUS_1914)
|
||||
Graphics.send(Graphics(86), self.location)
|
||||
}
|
||||
if (clearTime++ > 800) {
|
||||
self.transform(NPCs.DESSOUS_1914)
|
||||
clearTime = 0
|
||||
if (player != null) {
|
||||
removeAttribute(player, DesertTreasure.attributeDessousInstance)
|
||||
sendMessage(player, "Dessous returns to his grave, bored of toying with you.")
|
||||
}
|
||||
poofClear(self)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun getSwingHandlerOverride(self: NPC, original: CombatSwingHandler): CombatSwingHandler {
|
||||
if (self.id == NPCs.DESSOUS_1915) {
|
||||
// 2 x 5HP (One Magic, One Ranged)
|
||||
return CombatHandler()
|
||||
} else {
|
||||
// Fast melee attack 3 ticks up to 19HP
|
||||
return original
|
||||
}
|
||||
}
|
||||
|
||||
override fun beforeAttackFinalized(self: NPC, victim: Entity, state: BattleState) {
|
||||
// Teleport nearer, if too far.
|
||||
if (victim is Player) {
|
||||
if (victim.location.getDistance(self.location) >= 5) {
|
||||
Graphics.send(Graphics(86), self.location)
|
||||
self.properties.teleportLocation = victim.location
|
||||
Graphics.send(Graphics(86), self.location)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDeathFinished(self: NPC, killer: Entity) {
|
||||
if (killer is Player) {
|
||||
val player = killer
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeBloodStage) == 2) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeBloodStage, 3)
|
||||
}
|
||||
removeAttribute(player, DesertTreasure.attributeDessousInstance)
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> player(FacialExpression.ANGRY, "Well that's Dessous dead, but where is the Diamond he", "was supposed to have?").also { stage++ }
|
||||
1 -> playerl(FacialExpression.ANGRY, "If Malak lied to me about it, he is going to pay!").also {
|
||||
stage = END_DIALOGUE
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/** Handler for ranged. */
|
||||
class CombatHandler : MultiSwingHandler(
|
||||
SwitchAttack(CombatStyle.MAGIC.swingHandler, null),
|
||||
SwitchAttack(CombatStyle.RANGE.swingHandler, null)
|
||||
) {
|
||||
override fun swing(entity: Entity?, victim: Entity?, state: BattleState?): Int {
|
||||
if (entity is NPC && victim is Player) {
|
||||
val projectile = Projectile.create(
|
||||
victim.location.transform(Location(intArrayOf(3, -3).random(),intArrayOf(3, -3).random())),
|
||||
victim.location,
|
||||
350,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
60,
|
||||
0,
|
||||
255
|
||||
)
|
||||
// 2 x 5HP (One Magic, One Ranged)
|
||||
state!!.estimatedHit = 5
|
||||
state.secondaryHit = 5 // I have no idea what I'm doing
|
||||
queueScript(entity, 0, QueueStrength.STRONG) { stage: Int ->
|
||||
when (stage) {
|
||||
0 -> {
|
||||
sendChat(entity, "Hssssssssssss")
|
||||
projectile.send()
|
||||
return@queueScript delayScript(entity, entity.location.getDistance(victim.location).toInt())
|
||||
}
|
||||
1 -> {
|
||||
return@queueScript stopExecuting(entity)
|
||||
}
|
||||
else -> return@queueScript stopExecuting(entity)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return super.swing(entity, victim, state)
|
||||
}
|
||||
}
|
||||
}
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.world.map.Direction
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class DiamondOfBloodListeners : InteractionListener {
|
||||
override fun defineListeners() {
|
||||
|
||||
// Silver pot conversions
|
||||
onUseWith(ITEM, Items.SILVER_POT_4660, Items.SPICE_2007) { player, used, with ->
|
||||
sendMessage(player, "You add some spices to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.SILVER_POT_4664)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(ITEM, Items.SILVER_POT_4660, Items.GARLIC_POWDER_4668) { player, used, with ->
|
||||
sendMessage(player, "You add some crushed garlic to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.SILVER_POT_4662)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(ITEM, Items.SILVER_POT_4662, Items.SPICE_2007) { player, used, with ->
|
||||
sendMessage(player, "You add some spices to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.SILVER_POT_4666)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(ITEM, Items.SILVER_POT_4664, Items.GARLIC_POWDER_4668) { player, used, with ->
|
||||
sendMessage(player, "You add some crushed garlic to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.SILVER_POT_4666)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
// Blessed pot conversions
|
||||
onUseWith(ITEM, Items.BLESSED_POT_4661, Items.SPICE_2007) { player, used, with ->
|
||||
sendMessage(player, "You add some spices to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.BLESSED_POT_4665)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(ITEM, Items.BLESSED_POT_4661, Items.GARLIC_POWDER_4668) { player, used, with ->
|
||||
sendMessage(player, "You add some crushed garlic to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.BLESSED_POT_4663)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(ITEM, Items.BLESSED_POT_4663, Items.SPICE_2007) { player, used, with ->
|
||||
sendMessage(player, "You add some spices to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.BLESSED_POT_4667)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
onUseWith(ITEM, Items.BLESSED_POT_4665, Items.GARLIC_POWDER_4668) { player, used, with ->
|
||||
sendMessage(player, "You add some crushed garlic to the pot.")
|
||||
if(removeItem(player, used) && removeItem(player, with)) {
|
||||
addItemOrDrop(player, Items.BLESSED_POT_4667)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// You need to crush the garlic.
|
||||
onUseWith(ITEM, intArrayOf(Items.SILVER_POT_4660, Items.BLESSED_POT_4661, Items.SILVER_POT_4662, Items.BLESSED_POT_4663, Items.SILVER_POT_4664, Items.BLESSED_POT_4665, Items.SILVER_POT_4666, Items.BLESSED_POT_4667 ), Items.GARLIC_1550) { player, used, with ->
|
||||
sendMessage(player, "You need to crush the garlic before adding it to the pot.")
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// Dessous jumps out.
|
||||
onUseWith(SCENERY, Items.BLESSED_POT_4667, Scenery.VAMPIRE_TOMB_6437) { player, used, with ->
|
||||
val prevNpc = getAttribute<NPC?>(player, DesertTreasure.attributeDessousInstance, null)
|
||||
if (prevNpc != null) {
|
||||
prevNpc.clear()
|
||||
}
|
||||
sendMessage(player, "You pour the blood from the pot onto the tomb.")
|
||||
removeItem(player, used)
|
||||
val scenery = with.asScenery()
|
||||
// Swap to a splittable vampire tomb scenery.
|
||||
replaceScenery(scenery, Scenery.VAMPIRE_TOMB_6438, Animation(1915).duration)
|
||||
// Vampire Tomb breaks open.
|
||||
animateScenery(player, scenery, 1915)
|
||||
// 8 Bat projectiles
|
||||
spawnProjectile(Location(3570, 3402), Location(3570, 3404), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3570, 3400), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3568, 3402), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3572, 3402), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3568, 3404), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3572, 3404), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3568, 3400), 350, 0, 0, 0, 60, 0)
|
||||
spawnProjectile(Location(3570, 3402), Location(3572, 3400), 350, 0, 0, 0, 60, 0)
|
||||
val npc = NPC(NPCs.DESSOUS_1914)
|
||||
queueScript(player, 1, QueueStrength.SOFT) { stage: Int ->
|
||||
when (stage) {
|
||||
0 -> {
|
||||
// Projectile gfx for Dessous to jump out.
|
||||
spawnProjectile(Location(3570, 3402), Location(3570, 3405), 351, 0, 0, 0, 40, 0)
|
||||
return@queueScript delayScript(player, 1)
|
||||
}
|
||||
1 -> {
|
||||
npc.isRespawn = false
|
||||
npc.isWalks = false
|
||||
npc.location = Location(3570, 3405, 0)
|
||||
npc.direction = Direction.NORTH
|
||||
setAttribute(player, DesertTreasure.attributeDessousInstance, npc)
|
||||
setAttribute(npc, "target", player)
|
||||
|
||||
npc.init()
|
||||
npc.attack(player)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
else -> return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
|
||||
//sendGraphics(350, Location(3570, 3402))
|
||||
//sendGraphics(351, Location(3570, 3402))
|
||||
return@onUseWith true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueFile
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.map.zone.ZoneBorders
|
||||
import core.tools.END_DIALOGUE
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class DiamondOfIceListeners : InteractionListener {
|
||||
override fun defineListeners() {
|
||||
onUseWith(IntType.NPC, Items.CHOCOLATE_CAKE_1897, NPCs.BANDIT_1932 /* should be NPCs.TROLL_CHILD_1932 */) { player, used, with ->
|
||||
if (removeItem(player, used)) {
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 0) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeIceStage, 1)
|
||||
}
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> player("Hey there little troll...", "Take this and dry those tears...").also { stage++ }
|
||||
1 -> npc(FacialExpression.OLD_NEARLY_CRYING, "(sniff)").also {
|
||||
stage = END_DIALOGUE
|
||||
}
|
||||
}
|
||||
}
|
||||
}, with as NPC)
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
on(intArrayOf(Scenery.ICE_GATE_5043, Scenery.ICE_GATE_5044), SCENERY, "go-through") { player, node ->
|
||||
|
||||
if ((getQuestStage(player, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) > 1) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
sendMessage(player, "You squeeze through the large icy bars of the gate.")
|
||||
// Anim 3272 to squeeze through?
|
||||
if(player.location.x > 2838) {
|
||||
teleport(player, Location(2837, 3739, 0))
|
||||
} else {
|
||||
teleport(player, Location(2839, 3739, 0))
|
||||
}
|
||||
} else {
|
||||
// j_SdwOX1JWg
|
||||
sendDialogueLines(player, "The bars are frozen tightly shut and a sturdy layer of ice prevents", "you from slipping through.")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.CAVE_ENTRANCE_6441, SCENERY, "enter") { player, node ->
|
||||
lock(player, 3)
|
||||
animate(player, 2796) // Crawling
|
||||
queueScript(player, 3, QueueStrength.SOFT) {
|
||||
teleport(player, Location(2874, 3720, 0))
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.CAVE_ENTRANCE_6446, SCENERY, "enter") { player, node ->
|
||||
sendMessage(player, "The entrance to the cave is covered in too much ice to get through.")
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.CAVE_EXIT_6447, SCENERY, "enter") { player, node ->
|
||||
lock(player, 3)
|
||||
animate(player, 2796) // Crawling
|
||||
queueScript(player, 3, QueueStrength.SOFT) {
|
||||
teleport(player, Location(2867, 3719, 0))
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(Scenery.ICE_LEDGE_6455, SCENERY, "use") { player, node ->
|
||||
|
||||
if ((getQuestStage(player, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) >= 3) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
if (inEquipment(player, Items.SPIKED_BOOTS_3107)) {
|
||||
teleport(player, Location(2838, 3803, 1))
|
||||
} else {
|
||||
sendPlayerDialogue(player, "I don't think I'll make much headway along that icy slope without some spiked boots...")
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "You have not defeated Kamil yet.")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(intArrayOf(Scenery.ICE_GATE_6461, Scenery.ICE_GATE_6462), SCENERY, "go-through") { player, node ->
|
||||
|
||||
teleport(player, Location(2852, 3810, 2))
|
||||
return@on true
|
||||
}
|
||||
|
||||
// This is 1943 as base
|
||||
on(NPCs.ICE_BLOCK_1944, NPC, "talk-to") { player, node ->
|
||||
sendDialogueLines(player, "There is a thick layer of ice covering this troll.", "You will have to find some way of shattering it.")
|
||||
return@on true
|
||||
}
|
||||
on(NPCs.ICE_BLOCK_1944, NPC, "smash-ice") { player, node ->
|
||||
player.attack(node)
|
||||
return@on true
|
||||
}
|
||||
|
||||
// This is 1945 as base
|
||||
on(NPCs.ICE_BLOCK_1946, NPC, "talk-to") { player, node ->
|
||||
sendDialogueLines(player, "There is a thick layer of ice covering this troll.", "You will have to find some way of shattering it.")
|
||||
return@on true
|
||||
}
|
||||
on(NPCs.ICE_BLOCK_1946, NPC, "smash-ice") { player, node ->
|
||||
player.attack(node)
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** This is while you are walking up the ice path. **/
|
||||
class ComicalTrippingIceArea : MapArea {
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf(
|
||||
ZoneBorders(2815, 3775, 2880, 3839, 1),
|
||||
ZoneBorders(2815, 3775, 2880, 3839, 2)
|
||||
)
|
||||
}
|
||||
|
||||
override fun entityStep(entity: Entity, location: Location, lastLocation: Location) {
|
||||
if (entity is Player) {
|
||||
if ((1..10).random() == 1) {
|
||||
lock(entity, 2)
|
||||
stopWalk(entity)
|
||||
animate(entity, 767)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class IceAreaAttack : MapArea {
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf(ZoneBorders(2850, 3750, 2880, 3770))
|
||||
}
|
||||
|
||||
override fun areaEnter(entity: Entity) {
|
||||
if (entity is Player &&
|
||||
getQuestStage(entity, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(entity, DesertTreasure.attributeIceStage) == 2 &&
|
||||
getAttribute<NPC?>(entity, DesertTreasure.attributeKamilInstance, null) == null
|
||||
) {
|
||||
sendMessage(entity, "You can feel an evil presence nearby...")
|
||||
val npc = NPC.create(NPCs.KAMIL_1913, Location(2857, 3754, 0))
|
||||
setAttribute(entity, DesertTreasure.attributeKamilInstance, npc)
|
||||
setAttribute(npc, "target", entity)
|
||||
npc.isRespawn = false
|
||||
npc.init()
|
||||
npc.attack(entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
+265
@@ -0,0 +1,265 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueFile
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.dialogue.Topic
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.item.GroundItemManager
|
||||
import core.game.node.item.Item
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.map.zone.ZoneBorders
|
||||
import core.tools.END_DIALOGUE
|
||||
import core.tools.RandomFunction
|
||||
import core.tools.START_DIALOGUE
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class DiamondOfShadowListeners : InteractionListener {
|
||||
|
||||
companion object {
|
||||
|
||||
fun roll(player: Player): Boolean {
|
||||
|
||||
val chance = RandomFunction.randomDouble(1.0, 100.0)
|
||||
val successChance = RandomFunction.getSkillSuccessChance(52.0, 128.0, getDynLevel(player, Skills.THIEVING))
|
||||
|
||||
return chance < successChance
|
||||
}
|
||||
|
||||
fun pickAttempt(player: Player, picklockItem: Item?) {
|
||||
queueScript(player, 0, QueueStrength.SOFT) { stage: Int ->
|
||||
when (stage) {
|
||||
0 -> {
|
||||
sendMessage(player, "You attempt to pick the first lock...")
|
||||
return@queueScript delayScript(player, 1)
|
||||
}
|
||||
|
||||
1 -> {
|
||||
if (roll(player)) {
|
||||
sendMessage(player, "...You successfully picked the first lock!")
|
||||
return@queueScript delayScript(player, 1)
|
||||
} else {
|
||||
if(picklockItem != null) {
|
||||
removeItem(player, picklockItem)
|
||||
} else {
|
||||
removeItem(player, Items.LOCKPICK_1523)
|
||||
}
|
||||
sendMessage(player, "...and fail. The locking mechanism has reset itself.")
|
||||
sendMessage(player, "Your lock pick snapped while attempting to pick the lock.")
|
||||
impact(player, 3)
|
||||
applyPoison(player, player, 6)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
|
||||
2 -> {
|
||||
sendMessage(player, "You attempt to pick the second lock...")
|
||||
return@queueScript delayScript(player, 1)
|
||||
}
|
||||
|
||||
3 -> {
|
||||
if (roll(player)) {
|
||||
sendMessage(player, "...You successfully picked the second lock!")
|
||||
return@queueScript delayScript(player, 1)
|
||||
} else {
|
||||
if(picklockItem != null) {
|
||||
removeItem(player, picklockItem)
|
||||
} else {
|
||||
removeItem(player, Items.LOCKPICK_1523)
|
||||
}
|
||||
sendMessage(player, "...and fail. The locking mechanism has reset itself.")
|
||||
sendMessage(player, "Your lock pick snapped while attempting to pick the lock.")
|
||||
impact(player, 3)
|
||||
applyPoison(player, player, 6)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
|
||||
4 -> {
|
||||
sendMessage(player, "You attempt to pick the final lock...")
|
||||
return@queueScript delayScript(player, 1)
|
||||
}
|
||||
|
||||
5 -> {
|
||||
if (roll(player)) {
|
||||
sendMessage(player, "You managed to pick the final lock.")
|
||||
return@queueScript delayScript(player, 1)
|
||||
} else {
|
||||
if(picklockItem != null) {
|
||||
removeItem(player, picklockItem)
|
||||
} else {
|
||||
removeItem(player, Items.LOCKPICK_1523)
|
||||
}
|
||||
sendMessage(player, "...and fail. The locking mechanism has reset itself.")
|
||||
sendMessage(player, "Your lock pick snapped while attempting to pick the lock.")
|
||||
impact(player, 3)
|
||||
applyPoison(player, player, 6)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
|
||||
6 -> {
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 1) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeShadowStage, 2)
|
||||
}
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
|
||||
else -> return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun defineListeners() {
|
||||
|
||||
// Hidden entrance to the shadow dungeon.
|
||||
on(Scenery.LADDER_6561, SCENERY, "climb-down") { player, node ->
|
||||
teleport(player, Location(2630, 5072))
|
||||
return@on true
|
||||
}
|
||||
|
||||
/** This will open up a lot of other places. Maybe have this in a general file? */
|
||||
onEquip(Items.RING_OF_VISIBILITY_4657) { player, _ ->
|
||||
|
||||
if((DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) >= 3 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
|
||||
setVarbit(player, DesertTreasure.varbitRingOfVisibility, 1)
|
||||
return@onEquip true
|
||||
}
|
||||
sendMessage(player, "You need to complete part of Desert Treasure to equip this.")
|
||||
return@onEquip false
|
||||
}
|
||||
|
||||
onUnequip(Items.RING_OF_VISIBILITY_4657) { player, _ ->
|
||||
setVarbit(player, DesertTreasure.varbitRingOfVisibility, 0)
|
||||
return@onUnequip true
|
||||
}
|
||||
|
||||
|
||||
|
||||
on(Scenery.SECURE_CHEST_6448, SCENERY, "open") { player, node ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 1) {
|
||||
if (inInventory(player, Items.LOCKPICK_1523)) {
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
START_DIALOGUE -> dialogue("Your skill as a thief allows you to see some kind of elaborate booby", "trapped locking mechanism on this chest.").also { stage++ }
|
||||
1 -> showTopics(
|
||||
Topic(FacialExpression.NEUTRAL, "Yes", 2, true),
|
||||
Topic(FacialExpression.NEUTRAL, "No", END_DIALOGUE, true),
|
||||
title = "Try to open the chest?"
|
||||
)
|
||||
2 -> end().also {
|
||||
if (inInventory(player, Items.LOCKPICK_1523)) {
|
||||
pickAttempt(player, null)
|
||||
} else {
|
||||
sendMessage(player, "You need a lockpick in order to attempt this.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
sendMessage(player, "You need a lockpick in order to attempt this.")
|
||||
}
|
||||
} else if ((DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) >= 2 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
if (inInventory(player, Items.GILDED_CROSS_4674)) {
|
||||
sendMessage(player, "The chest is empty.")
|
||||
} else {
|
||||
replaceScenery(node as core.game.node.scenery.Scenery, 6449, 2)
|
||||
sendMessage(player, "Inside the chest, hidden under some rags, you find a Gilded Cross.")
|
||||
addItemOrDrop(player, Items.GILDED_CROSS_4674)
|
||||
}
|
||||
} else {
|
||||
sendPlayerDialogue(player, "These bandits are hostile enough without me trying to rob them!")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
onUseWith(SCENERY, Items.LOCKPICK_1523, Scenery.SECURE_CHEST_6448) { player, used, with ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 1) {
|
||||
pickAttempt(player, used as Item)
|
||||
} else if((DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) >= 2 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
sendMessage(player, "The chest is unlocked.")
|
||||
} else {
|
||||
sendPlayerDialogue(player, "These bandits are hostile enough without me trying to rob them!")
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class ShadowDungeonWarning : MapArea {
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf(ZoneBorders(2726, 5072, 2728, 5072))
|
||||
}
|
||||
|
||||
override fun areaEnter(entity: Entity) {
|
||||
if (entity is Player) {
|
||||
if (
|
||||
getQuestStage(entity, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(entity, DesertTreasure.attributeShadowStage) == 3 &&
|
||||
getAttribute(entity, DesertTreasure.attributeDamisWarning, false)
|
||||
) {
|
||||
sendMessage(entity, "A voice seems to come from the walls around you;")
|
||||
sendMessage(entity, "'You... do not be... long in this... place")
|
||||
sendMessage(entity, "Turn... back now, or... prepare... to meet your... doom'")
|
||||
getAttribute(entity, DesertTreasure.attributeDamisWarning, true)
|
||||
} else if (
|
||||
getQuestStage(entity, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(entity, DesertTreasure.attributeShadowStage) == 100
|
||||
) {
|
||||
if (!inInventory(entity, Items.SHADOW_DIAMOND_4673) && !inBank(entity, Items.SHADOW_DIAMOND_4673)) {
|
||||
sendMessage(entity, "The Diamond of Shadow seems to have mystically found its way back here...")
|
||||
GroundItemManager.create(Item(Items.SHADOW_DIAMOND_4673), Location(2739, 5088, 0), entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ShadowDungeonAttack : MapArea {
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf(ZoneBorders(2731, 5085, 2748, 5097))
|
||||
}
|
||||
|
||||
override fun areaEnter(entity: Entity) {
|
||||
if (entity is Player) {
|
||||
if (getQuestStage(entity, DesertTreasure.questName) == 9) {
|
||||
if (DesertTreasure.getSubStage(entity, DesertTreasure.attributeShadowStage) == 3 &&
|
||||
getAttribute<NPC?>(entity, DesertTreasure.attributeDamisInstance, null) == null
|
||||
) {
|
||||
val npc = NPC.create(NPCs.DAMIS_1974, Location(2739, 5088, 0))
|
||||
setAttribute(entity, DesertTreasure.attributeDamisInstance, npc)
|
||||
setAttribute(npc, "target", entity)
|
||||
npc.isRespawn = false
|
||||
npc.walkRadius = 30
|
||||
npc.init()
|
||||
npc.attack(entity)
|
||||
sendChat(npc, "You should have listened to me!")
|
||||
}
|
||||
} else if (DesertTreasure.getSubStage(entity, DesertTreasure.attributeShadowStage) >= 100) {
|
||||
if (!inInventory(entity, Items.SHADOW_DIAMOND_4673) && !inBank(entity, Items.SHADOW_DIAMOND_4673)) {
|
||||
sendMessage(entity, "The Diamond of Shadow seems to have mystically found its way back here...")
|
||||
GroundItemManager.create(Item(Items.SHADOW_DIAMOND_4673), Location(2739, 5088, 0), entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.global.action.DoorActionHandler
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.item.GroundItemManager
|
||||
import core.game.node.item.Item
|
||||
import core.game.system.timer.RSTimer
|
||||
import core.game.world.map.Location
|
||||
import core.tools.secondsToTicks
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class DiamondOfSmokeListeners : InteractionListener {
|
||||
companion object {
|
||||
const val timerIdentifierTorchNE = "deserttreasureNEtorch"
|
||||
const val timerIdentifierTorchSE = "deserttreasureSEtorch"
|
||||
const val timerIdentifierTorchSW = "deserttreasureSWtorch"
|
||||
const val timerIdentifierTorchNW = "deserttreasureNWtorch"
|
||||
|
||||
fun checkAllTorchesLit(player: Player) : Boolean {
|
||||
return getVarbit(player, DesertTreasure.varbitStandingTorchNorthEast) == 1 &&
|
||||
getVarbit(player, DesertTreasure.varbitStandingTorchSouthEast) == 1 &&
|
||||
getVarbit(player, DesertTreasure.varbitStandingTorchSouthWest) == 1 &&
|
||||
getVarbit(player, DesertTreasure.varbitStandingTorchNorthWest) == 1
|
||||
}
|
||||
}
|
||||
|
||||
override fun defineListeners() {
|
||||
on(Scenery.BURNT_CHEST_6420, SCENERY, "open") { player, node ->
|
||||
if (checkAllTorchesLit(player)) {
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeSmokeStage) == 0) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeSmokeStage, 1)
|
||||
}
|
||||
}
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeSmokeStage) >= 1) {
|
||||
replaceScenery(node as core.game.node.scenery.Scenery, 6421, 2)
|
||||
addItemOrDrop(player, Items.WARM_KEY_4656)
|
||||
sendMessage(player, "You open the chest and take a key.")
|
||||
} else {
|
||||
sendDialogueLines(player, "There seems to be no way to open this chest. Engraved where the", "keyhole should be is a message:", "'Light the path, and find the key...'")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
on(intArrayOf(Scenery.GATE_6451, Scenery.GATE_6452), SCENERY, "open") { player, node ->
|
||||
if (getQuestStage(player, DesertTreasure.questName) == 9) {
|
||||
// Set attributeUnlockedGate to true if warm key and first time unlocking the gate.
|
||||
if (!getAttribute(player, DesertTreasure.attributeUnlockedGate, false) && inInventory(player, Items.WARM_KEY_4656)) {
|
||||
if(removeItem(player, Items.WARM_KEY_4656)) {
|
||||
sendMessage(player, "You unlock the gate and enter the room.")
|
||||
setAttribute(player, DesertTreasure.attributeUnlockedGate, true)
|
||||
}
|
||||
}
|
||||
// Fight if unlocked gate, drop recovery diamond if done.
|
||||
if (getAttribute(player, DesertTreasure.attributeUnlockedGate, false)) {
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeSmokeStage) == 1 &&
|
||||
getAttribute<NPC?>(player, DesertTreasure.attributeFareedInstance, null) == null) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
|
||||
val npc = core.game.node.entity.npc.NPC.create(NPCs.FAREED_1977, Location(3315, 9376, 0))
|
||||
setAttribute(player, DesertTreasure.attributeFareedInstance, npc)
|
||||
setAttribute(npc, "target", player)
|
||||
npc.isRespawn = false
|
||||
npc.init()
|
||||
npc.attack(player)
|
||||
sendChat(npc, "You dare trespass in my realm?")
|
||||
} else if (DesertTreasure.getSubStage(player, DesertTreasure.attributeSmokeStage) >= 100) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
|
||||
if (!inInventory(player, Items.SMOKE_DIAMOND_4672) && !inBank(player, Items.SMOKE_DIAMOND_4672)) {
|
||||
sendMessage(player, "The Diamond of Smoke seems to have mystically found its way back here...")
|
||||
GroundItemManager.create(Item(Items.SMOKE_DIAMOND_4672), Location(3315, 9376, 0), player)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sendMessage(player, "The gate is locked.")
|
||||
}
|
||||
|
||||
} else if (getQuestStage(player, DesertTreasure.questName) in 9..100) {
|
||||
DoorActionHandler.handleAutowalkDoor(player, node.asScenery())
|
||||
} else {
|
||||
sendMessage(player, "The gate is locked.")
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
|
||||
|
||||
on(Scenery.A_DARK_HOLE_31367, SCENERY, "enter") { player, node ->
|
||||
// You have to come from the Pollnivneach Slayer Dungeon, then this will tele you back.
|
||||
sendDialogueLines(player, "This hole leads to a maze of other passages. Without knowing where", "you are headed, there's no chance of reaching anywhere interesting.")
|
||||
return@on true
|
||||
}
|
||||
|
||||
// NE Standing Torch
|
||||
onUseWith(IntType.SCENERY, Items.TINDERBOX_590, Scenery.STANDING_TORCH_6406, Scenery.STANDING_TORCH_6413) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.FIREMAKING) < 50) {
|
||||
sendMessage(player, "You need a firemaking level of 50 to light this torch.")
|
||||
return@onUseWith true
|
||||
}
|
||||
setVarbit(player, DesertTreasure.varbitStandingTorchNorthEast, 1)
|
||||
sendMessage(player, "You light the torch.")
|
||||
if (checkAllTorchesLit(player)) {
|
||||
sendMessage(player, "The path is lit, now claim the key...")
|
||||
}
|
||||
removeTimer(player, timerIdentifierTorchNE)
|
||||
registerTimer(player, StandingTorchTimer(timerIdentifierTorchNE, DesertTreasure.varbitStandingTorchNorthEast))
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// SE Standing Torch
|
||||
onUseWith(IntType.SCENERY, Items.TINDERBOX_590, Scenery.STANDING_TORCH_6408, Scenery.STANDING_TORCH_6414) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.FIREMAKING) < 50) {
|
||||
sendMessage(player, "You need a firemaking level of 50 to light this torch.")
|
||||
return@onUseWith true
|
||||
}
|
||||
setVarbit(player, DesertTreasure.varbitStandingTorchSouthEast, 1)
|
||||
sendMessage(player, "You light the torch.")
|
||||
if (checkAllTorchesLit(player)) {
|
||||
sendMessage(player, "The path is lit, now claim the key...")
|
||||
}
|
||||
removeTimer(player, timerIdentifierTorchSE)
|
||||
registerTimer(player, StandingTorchTimer(timerIdentifierTorchSE, DesertTreasure.varbitStandingTorchSouthEast))
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// SW Standing Torch
|
||||
onUseWith(IntType.SCENERY, Items.TINDERBOX_590, Scenery.STANDING_TORCH_6410, Scenery.STANDING_TORCH_6415) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.FIREMAKING) < 50) {
|
||||
sendMessage(player, "You need a firemaking level of 50 to light this torch.")
|
||||
return@onUseWith true
|
||||
}
|
||||
setVarbit(player, DesertTreasure.varbitStandingTorchSouthWest, 1)
|
||||
sendMessage(player, "You light the torch.")
|
||||
if (checkAllTorchesLit(player)) {
|
||||
sendMessage(player, "The path is lit, now claim the key...")
|
||||
}
|
||||
removeTimer(player, timerIdentifierTorchSW)
|
||||
registerTimer(player, StandingTorchTimer(timerIdentifierTorchSW, DesertTreasure.varbitStandingTorchSouthWest))
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
// NW Standing Torch
|
||||
onUseWith(IntType.SCENERY, Items.TINDERBOX_590, Scenery.STANDING_TORCH_6412, Scenery.STANDING_TORCH_6416) { player, used, with ->
|
||||
if (getDynLevel(player, Skills.FIREMAKING) < 50) {
|
||||
sendMessage(player, "You need a firemaking level of 50 to light this torch.")
|
||||
return@onUseWith true
|
||||
}
|
||||
setVarbit(player, DesertTreasure.varbitStandingTorchNorthWest, 1)
|
||||
sendMessage(player, "You light the torch.")
|
||||
if (checkAllTorchesLit(player)) {
|
||||
sendMessage(player, "The path is lit, now claim the key...")
|
||||
}
|
||||
removeTimer(player, timerIdentifierTorchNW)
|
||||
registerTimer(player, StandingTorchTimer(timerIdentifierTorchNW, DesertTreasure.varbitStandingTorchNorthWest))
|
||||
return@onUseWith true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class StandingTorchTimer(private val timerIdentifier: String = "deserttreasureunknowntimer", private val torchVarbit: Int = 0) : RSTimer(secondsToTicks(150), timerIdentifier) {
|
||||
override fun run(entity: Entity): Boolean {
|
||||
if (entity is Player) {
|
||||
when(timerIdentifier) {
|
||||
DiamondOfSmokeListeners.timerIdentifierTorchNE -> sendMessage(entity, "The North-east torch burns out...")
|
||||
DiamondOfSmokeListeners.timerIdentifierTorchSE -> sendMessage(entity, "The South-east torch burns out...")
|
||||
DiamondOfSmokeListeners.timerIdentifierTorchSW -> sendMessage(entity, "The South-west torch burns out...")
|
||||
DiamondOfSmokeListeners.timerIdentifierTorchNW -> sendMessage(entity, "The North-west torch burns out...")
|
||||
else -> sendMessage(entity, "The torch burns out...")
|
||||
}
|
||||
setVarbit(entity, torchVarbit, 0)
|
||||
}
|
||||
entity.timers.removeTimer(this)
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,328 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class EblisDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, EblisDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return EblisDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.EBLIS_1923)
|
||||
}
|
||||
|
||||
}
|
||||
class EblisDialogueFile : DialogueBuilderFile() {
|
||||
|
||||
companion object {
|
||||
fun checkAllGiven(player: Player): Boolean {
|
||||
return (getAttribute(player, DesertTreasure.attributeCountMagicLogs, 0) >= 12 &&
|
||||
getAttribute(player, DesertTreasure.attributeCountSteelBars, 0) >= 6 &&
|
||||
getAttribute(player, DesertTreasure.attributeCountMoltenGlass, 0) >= 6 &&
|
||||
getAttribute(player, DesertTreasure.attributeCountBones, 0) >= 1 &&
|
||||
getAttribute(player, DesertTreasure.attributeCountAshes, 0) >= 1 &&
|
||||
getAttribute(player, DesertTreasure.attributeCountCharcoal, 0) >= 1 &&
|
||||
getAttribute(player, DesertTreasure.attributeCountBloodRune, 0) >= 1)
|
||||
}
|
||||
}
|
||||
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 0,1,2,3,4)
|
||||
.npcl("Leave us to our fate. We care nothing for the world that betrayed us, or those that come from it.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 5,6)
|
||||
.playerl("Hello. I represent the Museum of Varrock, and I have reason to believe there may be some kinds of artefacts of historical significance in the nearby area...")
|
||||
.npcl("Ah yes. The only time people care about our existence is when they think they have something to gain from us.")
|
||||
.npcl("I have nothing to say to you. You and your kind are not welcome here.")
|
||||
.playerl("Please, if I can just have a few minutes of your time to ask some questions...?")
|
||||
.npcl("(sigh) I suppose I can spare you that. What do you wish to know about?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Why is this village so hostile?")
|
||||
.playerl("Why are all of the people here so hostile? You would think I was asking you for money instead of just for answers to a few questions...")
|
||||
.npcl("It is a long story, and I doubt you have much interest in hearing it. Your sort never are, you just take what you can of ours, and then abandon us once more to the desert.")
|
||||
.options()
|
||||
.let { optionBuilder2 ->
|
||||
optionBuilder2.option("No, I want to hear this story.")
|
||||
.playerl("Actually, I'd be quite interested to hear what it is you have to say to excuse the attitude everybody in this village seems to have.")
|
||||
.npcl("Ah, it all begun many generations ago, when our ancestors were the proud rulers of these lands...")
|
||||
.npcl("My ancestors lived far to the North of here, and our lands stretched from the sea in the East to the river Lum, and the mountain of ice. From coast to coast, North to South, our domain was absolute.")
|
||||
.npcl("Our god was kind to us, and blessed us with prosperity and happiness, and in return we were merciless to his enemies wherever we found them.")
|
||||
.npcl("Then came the betrayal.")
|
||||
.npcl("Our god was banished, leaving us helpless to our fates.")
|
||||
.npcl("Without his protection, we were forced to fend for ourselves once more, against the enemies that sought to destroy us through their petty jealousies.")
|
||||
.npcl("But we did not succumb without fighting! The spiteful Saradomin and pathetic Zamorak warred with each other, but the hatred they had for each other was as nothing to the hatred they held towards us!")
|
||||
.npcl("With each battle they waged, we lost more and more land, unable to fight on all fronts, and were pushed further and further South into this gods-forsaken desert.")
|
||||
.npcl("Our greatest hero, Azzanadra, was finally trapped in a strange stone structure to the South of here, and bound within by terrible powers...")
|
||||
.npcl("And with that our lands, our homes, our very lives were stolen from us! Too weak to reclaim what was rightfully ours, we made our homes here, knowing that someday Azzanadra will")
|
||||
.npcl("return with his magnificent power, and bring us back to our former glory...")
|
||||
.playerl("So you're upset because of something that happened hundreds of years ago?")
|
||||
.playerl("Seems to me like maybe you should find some closure, and let the past go...")
|
||||
.npcl("The insults heaped upon my race will never be forgotten, will never be forgiven and will never again be overlooked.")
|
||||
.npcl("Someday, a harsh wind will blow upon this land, uncovering the wrongs of the past, and we will get back what is rightfully ours. Until such a day we will bide our time here, and will")
|
||||
.npcl("always be ready with our blades for our righteous vengeance.")
|
||||
.end()
|
||||
|
||||
optionBuilder2.option("I don't care about your story.")
|
||||
.playerl("I don't really care what your story is to be honest, there is no excuse for such rudeness or hostility.")
|
||||
.playerl("I have done nothing wrong to you, but everybody here treats me like I have committed some great crime against the village.")
|
||||
.npcl("That is because, from our point of view, you have.")
|
||||
.playerl("What? Just because I entered your village?")
|
||||
.npcl("You have no right to be here! You have no right to the life you have, for it was taken at our expense!")
|
||||
.playerl("Whatever... No wonder all you loonies live out here in the desert by yourselves.")
|
||||
.end()
|
||||
}
|
||||
|
||||
optionBuilder.option("Do you know anything about treasure near here?")
|
||||
.playerl("I was wondering if you knew anything about some treasure somewhere around here?")
|
||||
.playerl("I have some evidence that there might be some kind of treasure hidden very close to this village...")
|
||||
.npcl("If I knew of any treasure I would not choose to spend my life in this gods-forsaken desert.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("Do you know anything about a fortress near here?")
|
||||
.playerl("Do you know anything about some kind of fortress nearby? I have reason to believe there is, or at least used to be, some kind of fortress very close to here...")
|
||||
.npcl("Nobody would build anything in this wasteland unless they were forced to, to survive.")
|
||||
.npcl("I know of no fortress, I know of no reason why anyone would ever bother doing anything out here in the desert.")
|
||||
.end()
|
||||
|
||||
|
||||
// This will only show up after you've talked to the bartender.
|
||||
optionBuilder.optionIf("Tell me of the four diamonds of Azzanadra.") { player ->
|
||||
return@optionIf getQuestStage(player, DesertTreasure.questName) == 6
|
||||
}
|
||||
.playerl("So tell me... Did you ever hear of something called the Diamonds of Azzanadra?")
|
||||
.npcl("This is the treasure which you seek???")
|
||||
.npcl("Please accept my apologies noble @g[sir,madam]! I thought you were but some opportunistic thief, looking to steal what heritage we have left! Now I see that you are in fact a brave adventurer,")
|
||||
.npcl("looking to restore our glories back upon us!")
|
||||
.playerl("Uh... yeah... So anyway, you have heard of them?")
|
||||
.npcl("Heard of them? Of course I have heard of them! They are the legacy of the great Mahjarrat hero, Azzanadra!")
|
||||
.playerl("So... do you have any idea where they might be? I have a feeling they will be very valuable.")
|
||||
.playerl("Uh, valuable as historical artefacts I mean, obviously.")
|
||||
.npcl("They were stolen by warriors of the false god Zamorak generations ago. When you find the warriors, you will find the diamonds.")
|
||||
.npcl("I suspect they will not willingly part with such objects of power however.")
|
||||
.npc("Beware too, for these warriors are very powerful;", "they have taken the powers of the diamonds into themselves!")
|
||||
.playerl("How do you mean?")
|
||||
.npcl("Each diamond has an elemental quality...")
|
||||
.npcl("There is the Diamond of Blood, the Diamond of Ice, the Diamond of Smoke and the Diamond of Shadow.")
|
||||
.npcl("You should expect the warriors to have taken some aspect of these diamonds as their own...")
|
||||
.playerl("Do you have any idea how I could track down these warriors somehow, then?")
|
||||
.npcl("There is an ancient spell I know of that may spy upon such power... But it will require a few ingredients for it to work.")
|
||||
.npcl("Should you be willing to get these ingredients for me, I will be able to locate the rough area where each of these warriors has taken refuge. The spell is imprecise, but it should help you get on the")
|
||||
.npcl("right track in your search.")
|
||||
.npcl("Is your desire for our freedom strong enough? Will you gather the ingredients for this spell for me?")
|
||||
.options()
|
||||
.let { optionBuilder2 ->
|
||||
|
||||
optionBuilder2.option("Yes")
|
||||
// The quest should jump to the next stage here, but I didn't want to write some weird if else here.
|
||||
.playerl("Sure, what do you need?")
|
||||
.npcl("For this spell, I will need to make some scrying glasses. I will need enough so that we can view the realm in its entirety.")
|
||||
.npcl("When enchanted, the scrying glass will be able to let us view any area that has been influenced by the presence of the Diamonds of Azzanadra.")
|
||||
.playerl("Okay, but what exactly do you need for this spell?")
|
||||
.npcl("Well, six scrying glasses should be sufficient. For each scrying glass, I will need two magic logs, a steel bar and some molten glass. This makes a total of 12 magic logs, 6 pieces of molten")
|
||||
.npcl("glass, and 6 steel bars.")
|
||||
.npcl("In addition, for the actual spell to enchant the glasses, I will require one set of normal bones, some ash, some charcoal and a single blood rune.")
|
||||
.npcl("Do you understand me, adventurer?")
|
||||
.playerl("Quick question; what kind of bones do you need?")
|
||||
.npcl("Standard bones. Other types of bones are of no use to me in this spell.")
|
||||
.options()
|
||||
.let { optionBuilder3 ->
|
||||
optionBuilder3.option("Yes, I will go get those for you.")
|
||||
.playerl("It's a slightly odd collection of ingredients, but I shouldn't have too much trouble getting those for you.")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 6) {
|
||||
setQuestStage(player, DesertTreasure.questName, 7)
|
||||
}
|
||||
}
|
||||
|
||||
optionBuilder3.option("No, please repeat those ingredients.")
|
||||
.npcl("Before I can complete the spell I will still need the following items;")
|
||||
.npc("12 magic logs", "6 steel bars", "6 molten glass")
|
||||
.npc("1 bones,", "1 ashes,", "1 charcoal", "and 1 blood rune.") // This is sic authentic trash dialogue.
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 6) {
|
||||
setQuestStage(player, DesertTreasure.questName, 7)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
optionBuilder2.option("No")
|
||||
.playerl("Actually I don't feel like going on a shopping trip for you right now.")
|
||||
.npcl("As you wish. I should have known not to get my hopes up that our long cursed life may soon be at an end...")
|
||||
.end()
|
||||
}
|
||||
|
||||
optionBuilder.option("Nothing thanks.")
|
||||
.playerl("Actually, there was nothing I really wanted to ask you about.")
|
||||
.npcl("Yes, it is exactly like your sort to waste my time in such a way.")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 7)
|
||||
// Branch to check
|
||||
|
||||
.branch { player ->
|
||||
return@branch if (checkAllGiven(player)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.npcl("Excellent! Those are all the ingredients I need to create the scrying glasses.")
|
||||
.npcl("I will find a suitable spot in the desert to the East of here, and set them up. When you are ready to begin your search, please come and find me there, I will show you how to utilise the")
|
||||
.npcl("mirrors to find the diamonds.")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 7) {
|
||||
setQuestStage(player, DesertTreasure.questName, 8)
|
||||
}
|
||||
}
|
||||
|
||||
branch.onValue(0)
|
||||
.npcl("Before I can complete the spell I will still need the following items;")
|
||||
.manualStage { df, player, _, _ ->
|
||||
df.interpreter!!.sendDialogues(npc!!.id, FacialExpression.NEUTRAL,
|
||||
"" + (12 - getAttribute(player, DesertTreasure.attributeCountMagicLogs, 0)) + " magic logs",
|
||||
"" + (6 - getAttribute(player, DesertTreasure.attributeCountSteelBars, 0)) + " steel bars",
|
||||
"" + (6 - getAttribute(player, DesertTreasure.attributeCountMoltenGlass, 0)) + " molten glass")
|
||||
}
|
||||
.manualStage { df, player, _, _ ->
|
||||
df.interpreter!!.sendDialogues(npc!!.id, FacialExpression.NEUTRAL,
|
||||
"" + (1 - getAttribute(player, DesertTreasure.attributeCountBones, 0)) + " bones,",
|
||||
"" + (1 - getAttribute(player, DesertTreasure.attributeCountAshes, 0)) + " ashes,",
|
||||
"" + (1 - getAttribute(player, DesertTreasure.attributeCountCharcoal, 0)) + " charcoal",
|
||||
"and " + (1 - getAttribute(player, DesertTreasure.attributeCountBloodRune, 0)) + " blood rune.") // This is sic authentic trash dialogue.
|
||||
}
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 8,9,10)
|
||||
.npcl("Meet me again in the desert East of here, I will use these ingredients to create a scrying glass for you.")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 100)
|
||||
.npcl("Meet me again in the desert East of here.")
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class EblisCollectionsListeners : InteractionListener {
|
||||
override fun defineListeners() {
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.MAGIC_LOGS_1513, Items.MAGIC_LOGS_1514), NPCs.EBLIS_1923) { player, used, with ->
|
||||
for(i in 0..11) {
|
||||
if (inInventory(player, used.id)) {
|
||||
if (getAttribute(player, DesertTreasure.attributeCountMagicLogs, 0) < 12) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountMagicLogs,
|
||||
getAttribute(player, DesertTreasure.attributeCountMagicLogs, 0) + 1)
|
||||
sendMessage(player, "You hand over a magic log.")
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.STEEL_BAR_2353, Items.STEEL_BAR_2354), NPCs.EBLIS_1923) { player, used, with ->
|
||||
for(i in 0..5) {
|
||||
if (inInventory(player, used.id)) {
|
||||
if (getAttribute(player, DesertTreasure.attributeCountSteelBars, 0) < 6) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountSteelBars,
|
||||
getAttribute(player, DesertTreasure.attributeCountSteelBars, 0) + 1)
|
||||
sendMessage(player, "You hand over a steel bar.")
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.MOLTEN_GLASS_1775, Items.MOLTEN_GLASS_1776), NPCs.EBLIS_1923) { player, used, with ->
|
||||
for(i in 0..5) {
|
||||
if (inInventory(player, used.id)) {
|
||||
if (getAttribute(player, DesertTreasure.attributeCountMoltenGlass, 0) < 6) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountMoltenGlass,
|
||||
getAttribute(player, DesertTreasure.attributeCountMoltenGlass, 0) + 1)
|
||||
sendMessage(player, "You hand over some molten glass.")
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.BONES_526, Items.BONES_527), NPCs.EBLIS_1923) { player, used, with ->
|
||||
if (getAttribute(player, DesertTreasure.attributeCountBones, 0) < 1) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountBones,
|
||||
getAttribute(player, DesertTreasure.attributeCountBones, 0) + 1)
|
||||
sendNPCDialogue(player, NPCs.EBLIS_1923, "Thank you, those are enough bones for the spell.")
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.ASHES_592, Items.ASHES_593), NPCs.EBLIS_1923) { player, used, with ->
|
||||
if (getAttribute(player, DesertTreasure.attributeCountAshes, 0) < 1) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountAshes,
|
||||
getAttribute(player, DesertTreasure.attributeCountAshes, 0) + 1)
|
||||
sendNPCDialogue(player, NPCs.EBLIS_1923, "Thank you, that is enough ash for the spell.")
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.CHARCOAL_973, Items.CHARCOAL_974), NPCs.EBLIS_1923) { player, used, with ->
|
||||
if (getAttribute(player, DesertTreasure.attributeCountCharcoal, 0) < 1) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountCharcoal,
|
||||
getAttribute(player, DesertTreasure.attributeCountCharcoal, 0) + 1)
|
||||
sendNPCDialogue(player, NPCs.EBLIS_1923, "Thank you, that is enough charcoal for the spell.")
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
onUseWith(IntType.NPC, intArrayOf(Items.BLOOD_RUNE_565), NPCs.EBLIS_1923) { player, used, with ->
|
||||
if (getAttribute(player, DesertTreasure.attributeCountBloodRune, 0) < 1) {
|
||||
if (removeItem(player, used.id)) {
|
||||
setAttribute(player, DesertTreasure.attributeCountBloodRune,
|
||||
getAttribute(player, DesertTreasure.attributeCountBloodRune, 0) + 1)
|
||||
sendNPCDialogue(player, NPCs.EBLIS_1923, "Thank you, that blood rune should be sufficient for the spell.")
|
||||
}
|
||||
}
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.item.Item
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class EblisMirrorsDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, EblisMirrorsDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return EblisMirrorsDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.EBLIS_1924, NPCs.EBLIS_1925)
|
||||
}
|
||||
}
|
||||
class EblisMirrorsDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 8)
|
||||
.npcl("Ah, so you got here at last.")
|
||||
.npc("As you may noticed, I have made the mirrors for", "the spell, and cast the enchantment upon them.")
|
||||
.npc("By simply looking into each mirror, you will be able to", "see the area where the trace magics from the Diamonds", "of Azzanadra are emanating from.")
|
||||
.npc("Unfortunately, I cannot narrow the search closer with", "this kind of spell, but if you search the areas shown to", "you, you may be able to find some clues leading you to", "the evil warriors of Zamorak who stole the diamonds in")
|
||||
.npc("the first place.")
|
||||
.player(FacialExpression.THINKING, "So you can't be anymore specific about where to look", "for these warriors and their diamonds?")
|
||||
.npc("I'm afraid not, other than the direction that the mirror", "is facing will be approximately the direction you will", "need to head in.")
|
||||
.npc("Make sure to come and speak to me when you have", "retrieved all four diamonds.")
|
||||
.endWith { _, player ->
|
||||
if (getQuestStage(player, DesertTreasure.questName) == 8) {
|
||||
setQuestStage(player, DesertTreasure.questName, 9)
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 9, 10)
|
||||
.branch { player ->
|
||||
return@branch if (DesertTreasure.completedAllSubstages(player)) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.player(FacialExpression.THINKING, "So I have all four of these Diamonds of Azzanadra, now", "what?")
|
||||
.npc("Azzanadra was our greatest ever hero.", "He was unkillable, and the cowardly traitors who stole", "our lands did not know what to do with him, for his", "hatred for them was as strong as his magics.")
|
||||
.npc(FacialExpression.SAD, "In the end, they cast a spell upon him, to trap him in", "the stone structure to the South of here.")
|
||||
.npc(FacialExpression.ANNOYED, "They stole his very life force, the essence of his power,", "and trapped it within four crystals - the very same", "Four Diamonds which you have now recovered from", "the brigands who stole from us.")
|
||||
.npc(FacialExpression.ANNOYED, "The four pillars surrounding the structure are keeping", "the containment spell intact.", "By placing a diamond into each, you will breach the", "magical defenses and begin to restore Azzanadra's")
|
||||
.npcl(FacialExpression.ANNOYED, "power, and be able to enter the structure.")
|
||||
.npcl("Go, place the diamonds, and free my lord Azzanadra!")
|
||||
.npc(FacialExpression.FRIENDLY, "The path will be hard, for his prison is full of traps", "and danger to prevent his rescue, but he will reward you", "beyond your wildest dreams when freed!")
|
||||
.npc("Quickly...", "After all these centuries, Lord Azzanadra is nearly free!", "You must spare no time, place the Diamonds upon the", "pillars and enter the pyramid so that you may free him!")
|
||||
.end()
|
||||
|
||||
branch.onValue(0)
|
||||
.playerl("So can you give me any help on where to find these warriors and their diamonds?")
|
||||
.npcl("No, the magic used in this spell is powerful, but inaccurate. The direction the scrying glass faces is roughly the direction you will find the warrior, but I'm afraid I")
|
||||
.npcl("can't be any more help than that.")
|
||||
.playerl("I don't understand why there are six mirrors when there are only four diamonds...")
|
||||
.npcl("As I say, the enchantment is very inaccurate.")
|
||||
.npcl("I can only focus upon the aura the diamonds have left behind them, so any place where the Diamonds were present for a significant period of time will still be shown - such as the Bandit Camp where I make my home.")
|
||||
.npcl("My apologies, but magic is an inaccurate art in many respects.")
|
||||
.npcl("Don't forget to come back here when you have collected all four diamonds.")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 100)
|
||||
.branch { player ->
|
||||
if (inInventory(player, Items.ANCIENT_STAFF_4675)) {
|
||||
1
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.playerl("Hello again.")
|
||||
.npcl("Greetings. I await the return of my Lord Azzanadra and of our god. I do not know why, but I feel this spot has some significance...")
|
||||
.end()
|
||||
|
||||
branch.onValue(0)
|
||||
.npcl("So have you spoken to my Lord Azzanadra yet?")
|
||||
.playerl("Yes I have.")
|
||||
.npcl("And what words did he have for his followers?")
|
||||
.playerl("Er... He didn't really mention you at all, but he did teach me some cool new magic spells.")
|
||||
.npcl("It is understandable perhaps... His poor mind must be addled after all of those years of confinement, he would not willingly ignore his followers...")
|
||||
.npcl("Anyway, if he has taught you our ancient magics, you may be interested in purchasing an ancient heirloom that was passed down to me. My ancestor fought in the ancient battles using the")
|
||||
.npcl("magic of our god. This heirloom will help you with the speed of your spell-casting.")
|
||||
.npcl("Normally I could not bear to part with such a priceless relic, but for your help in freeing my Lord Azzanadra, I will be prepared to sell it to you for a mere 80,000 gold.")
|
||||
.npcl("Are you interested?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Yes please")
|
||||
.branch { player ->
|
||||
if (inInventory(player, Items.COINS_995, 80000)) { 1 } else { 0 }
|
||||
}
|
||||
.let { branch2 ->
|
||||
branch2.onValue(1)
|
||||
.npcl("Take care of it, it is the only heirloom from those times I possess, although rumour has it many of our ancient warriors were buried with identical weapons so that they could continue to fight for my Lord in their deaths.")
|
||||
.endWith { _, player ->
|
||||
if (removeItem(player, Item(Items.COINS_995, 80000))) {
|
||||
addItemOrDrop(player, Items.ANCIENT_STAFF_4675)
|
||||
}
|
||||
}
|
||||
|
||||
branch2.onValue(0)
|
||||
.linel("You don't have enough money to buy that.")
|
||||
.end()
|
||||
}
|
||||
|
||||
optionBuilder.option("No thanks")
|
||||
.playerl("No, not really.")
|
||||
.npcl("As you wish. Bear my offer in mind should you ever change your decision, I will remain here.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import content.global.skill.magic.modern.WaterSpell
|
||||
import core.api.*
|
||||
import core.game.container.impl.EquipmentContainer
|
||||
import core.game.global.action.EquipHandler
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.combat.BattleState
|
||||
import core.game.node.entity.combat.CombatStyle
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.node.entity.player.Player
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class FareedBehavior : NPCBehavior(NPCs.FAREED_1977) {
|
||||
|
||||
var clearTime = 0
|
||||
|
||||
override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean): Boolean {
|
||||
if (attacker is Player) {
|
||||
if (attacker == getAttribute<Player?>(self, "target", null)) {
|
||||
return true
|
||||
}
|
||||
sendMessage(attacker, "It's not after you...")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun tick(self: NPC): Boolean {
|
||||
val player: Player? = getAttribute<Player?>(self, "target", null)
|
||||
if (clearTime++ > 800) {
|
||||
clearTime = 0
|
||||
if (player != null) {
|
||||
sendMessage(player, "Fareed has lost interest in you, and returned to his flames.")
|
||||
removeAttribute(player, DesertTreasure.attributeFareedInstance)
|
||||
}
|
||||
poofClear(self)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun beforeDamageReceived(self: NPC, attacker: Entity, state: BattleState) {
|
||||
if (state.style == CombatStyle.MAGIC && state.spell !is WaterSpell) {
|
||||
state.neutralizeHits()
|
||||
}
|
||||
}
|
||||
|
||||
override fun beforeAttackFinalized(self: NPC, victim: Entity, state: BattleState) {
|
||||
if (victim is Player) {
|
||||
if (!inEquipment(victim, Items.ICE_GLOVES_1580)) {
|
||||
val weapon = getItemFromEquipment(victim, EquipmentSlot.WEAPON)
|
||||
if(weapon != null) {
|
||||
EquipHandler.unequip(victim, EquipmentContainer.SLOT_WEAPON, weapon.id)
|
||||
}
|
||||
// val weapon = getItemFromEquipment(victim, EquipmentSlot.WEAPON)
|
||||
// if(weapon != null && removeItem(victim, weapon.id, Container.EQUIPMENT)) {
|
||||
// addItemOrDrop(victim, weapon.id)
|
||||
// }
|
||||
sendMessage(victim, "The heat from the warrior causes you to drop your weapon.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDeathFinished(self: NPC, killer: Entity) {
|
||||
if (killer is Player) {
|
||||
addItemOrDrop(killer, Items.SMOKE_DIAMOND_4672)
|
||||
sendMessage(killer, "You take the Diamond of Smoke from the ashes of the warrior.")
|
||||
if (DesertTreasure.getSubStage(killer, DesertTreasure.attributeSmokeStage) == 1) {
|
||||
DesertTreasure.setSubStage(killer, DesertTreasure.attributeSmokeStage, 100)
|
||||
removeAttribute(killer, DesertTreasure.attributeFareedInstance)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.combat.BattleState
|
||||
import core.game.node.entity.combat.CombatStyle
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.node.entity.player.Player
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class FatherTrollBehavior : NPCBehavior(NPCs.ICE_TROLL_1943 /** WRONG NAME ITS ICE_BLOCK */) {
|
||||
|
||||
override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean): Boolean {
|
||||
return attacker is Player
|
||||
}
|
||||
override fun beforeDamageReceived(self: NPC, attacker: Entity, state: BattleState) {
|
||||
if (attacker is Player) {
|
||||
self.properties.combatPulse.stop()
|
||||
attacker.properties.combatPulse.stop()
|
||||
if (state.estimatedHit + Integer.max(state.secondaryHit, 0) >= self.skills.lifepoints) {
|
||||
state.estimatedHit = self.skills.lifepoints + 1
|
||||
state.secondaryHit = -1
|
||||
self.skills.lifepoints = self.skills.maximumLifepoints // Reset life of ice block
|
||||
|
||||
setVarbit(attacker, DesertTreasure.varbitFrozenFather, 1)
|
||||
if (getVarbit(attacker, DesertTreasure.varbitFrozenMother) == 1) {
|
||||
setVarbit(attacker, DesertTreasure.varbitChildReunite, 4)
|
||||
queueScript(self, 1, QueueStrength.NORMAL) { stage: Int ->
|
||||
openDialogue(attacker, ChatFatherAndMotherTrollDialogueFile())
|
||||
return@queueScript stopExecuting(self)
|
||||
}
|
||||
} else {
|
||||
queueScript(self, 1, QueueStrength.NORMAL) { stage: Int ->
|
||||
sendNPCDialogue(attacker, NPCs.TROLL_FATHER_1948, "Oh thank you! It was really cold in there! But please, you must free my wife as well! Our son is depending on us!", FacialExpression.OLD_CALM_TALK2)
|
||||
return@queueScript stopExecuting(self)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MotherTrollBehavior : NPCBehavior(NPCs.ICE_BLOCK_1945) {
|
||||
override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean): Boolean {
|
||||
return attacker is Player
|
||||
}
|
||||
override fun beforeDamageReceived(self: NPC, attacker: Entity, state: BattleState) {
|
||||
if (attacker is Player) {
|
||||
self.properties.combatPulse.stop()
|
||||
attacker.properties.combatPulse.stop()
|
||||
if (state.estimatedHit + Integer.max(state.secondaryHit, 0) >= self.skills.lifepoints) {
|
||||
state.estimatedHit = self.skills.lifepoints + 1
|
||||
state.secondaryHit = -1
|
||||
self.skills.lifepoints = self.skills.maximumLifepoints // Reset life of ice block
|
||||
|
||||
setVarbit(attacker, DesertTreasure.varbitFrozenMother, 1)
|
||||
if (getVarbit(attacker, DesertTreasure.varbitFrozenFather) == 1) {
|
||||
setVarbit(attacker, DesertTreasure.varbitChildReunite, 4)
|
||||
queueScript(self, 1, QueueStrength.NORMAL) { stage: Int ->
|
||||
openDialogue(state.attacker!!.asPlayer(), ChatFatherAndMotherTrollDialogueFile())
|
||||
return@queueScript stopExecuting(self)
|
||||
}
|
||||
} else {
|
||||
queueScript(self, 1, QueueStrength.NORMAL) { stage: Int ->
|
||||
sendNPCDialogue(attacker, NPCs.TROLL_MOTHER_1950, "Wow, thanks for breaking me out of that ice! But please, my husband is still trapped in there!", FacialExpression.OLD_CALM_TALK2)
|
||||
return@queueScript stopExecuting(self)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.*
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.world.map.Location
|
||||
import core.plugin.Initializable
|
||||
import core.tools.END_DIALOGUE
|
||||
import org.rs09.consts.Components
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
// Base: 1943 Iced: 1944 Broke: 1948 Reunion: 1947
|
||||
// Base: 1945 Iced: 1946 Broke: 1950 Reunion: 1949
|
||||
|
||||
@Initializable
|
||||
class FatherTrollDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 3 &&
|
||||
getVarbit(player, DesertTreasure.varbitFrozenFather) == 1 &&
|
||||
getVarbit(player, DesertTreasure.varbitFrozenMother) == 1) {
|
||||
openDialogue(player!!, ChatFatherAndMotherTrollDialogueFile(), npc)
|
||||
} else if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 3) {
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> npcl(FacialExpression.OLD_CALM_TALK2, "Oh thank you! It was really cold in there! But please, you must free my wife as well! Our son is depending on us!").also { stage = END_DIALOGUE }
|
||||
}
|
||||
}
|
||||
}, npc)
|
||||
} else if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 4) {
|
||||
openDialogue(player!!, ChatFatherAndMotherTrollAfterDialogueFile(), npc)
|
||||
} else if ((getQuestStage(player, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) >= 5) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> npcl(FacialExpression.OLD_CALM_TALK2, "Thanks again for freeing me from that ice block! I might be a troll, but it was real uncomfortable in there!").also { stage = END_DIALOGUE }
|
||||
}
|
||||
}
|
||||
}, npc)
|
||||
}
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return FatherTrollDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(1943)
|
||||
}
|
||||
}
|
||||
|
||||
@Initializable
|
||||
class MotherTrollDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
println(getQuestStage(player, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) >= 5)
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 3 &&
|
||||
getVarbit(player, DesertTreasure.varbitFrozenFather) == 1 &&
|
||||
getVarbit(player, DesertTreasure.varbitFrozenMother) == 1) {
|
||||
openDialogue(player!!, ChatFatherAndMotherTrollDialogueFile(), npc)
|
||||
} else if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 3) {
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> npcl(FacialExpression.OLD_CALM_TALK2, "Wow, thanks for breaking me out of that ice! But please, my husband is still trapped in there!").also { stage = END_DIALOGUE }
|
||||
}
|
||||
}
|
||||
}, npc)
|
||||
} else if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 4) {
|
||||
openDialogue(player!!, ChatFatherAndMotherTrollAfterDialogueFile(), npc)
|
||||
} else if ((getQuestStage(player, DesertTreasure.questName) == 9 &&
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) >= 5) ||
|
||||
getQuestStage(player, DesertTreasure.questName) >= 10) {
|
||||
openDialogue(player, object : DialogueFile() {
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> npcl(FacialExpression.OLD_CALM_TALK2, "Thanks again for freeing me from that ice block! I don't know what my little snookums would have done without us!").also { stage = END_DIALOGUE }
|
||||
}
|
||||
}
|
||||
}, npc)
|
||||
}
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return MotherTrollDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.TROLL_MOTHER_1950)
|
||||
}
|
||||
}
|
||||
|
||||
class ChatFatherAndMotherTrollDialogueFile : DialogueFile() {
|
||||
// We gon do like this as the old way allows to easily jump between npcs.
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "Phew! Am I glad to be out of that big ice cube! Are you okay too darling?").also { stage++ }
|
||||
1 -> npcl(NPCs.TROLL_MOTHER_1950, FacialExpression.OLD_CALM_TALK2, "Yes, I thought we were done for! Why ever did that nasty Kamil freeze us up there anyway?").also { stage++ }
|
||||
2 -> playerl("He must have been trying to protect his Diamond...").also { stage++ }
|
||||
3 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "You mean that diamond I found the other day belonged to him? But why didn't he just ask for it back? It's not like I really want it or anything!").also { stage++ }
|
||||
4 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "And how did you know we had that diamond anyway, fleshy?").also { stage++ }
|
||||
5 -> playerl("Your son told me. That's why I rescued you, it is very important that I have that diamond...").also { stage++ }
|
||||
6 -> npcl(NPCs.TROLL_MOTHER_1950, FacialExpression.OLD_CALM_TALK2, "Ooohhhhh, my poor baby! He must have been so worried about us...").also { stage++ }
|
||||
7 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "Yes, but he certainly inherited his Dad's smarts!").also { stage++ }
|
||||
8 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "If he'd told this fleshy that he had the Diamond and not us, we might never have been rescued!").also { stage++ }
|
||||
9 -> playerl("Wait... what? That stupid little troll kid had the diamond all along?").also { stage++ }
|
||||
10 -> npcl(NPCs.TROLL_MOTHER_1950, FacialExpression.OLD_CALM_TALK2, "Don't you talk about my baby like that!").also { stage++ }
|
||||
11 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "Now, now dear, all's well that ends well. We've been freed and this fleshy has certainly earned himself that diamond.").also { stage++ }
|
||||
12 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK2, "Let's get out of this terrible place and see our son!").also {
|
||||
stage++
|
||||
if (DesertTreasure.getSubStage(player!!, DesertTreasure.attributeIceStage) == 3) {
|
||||
DesertTreasure.setSubStage(player!!, DesertTreasure.attributeIceStage, 4)
|
||||
}
|
||||
}
|
||||
|
||||
13 -> {
|
||||
queueScript(player!!, 0, QueueStrength.SOFT) { stage: Int ->
|
||||
when (stage) {
|
||||
0 -> {
|
||||
closeOverlay(player!!)
|
||||
openOverlay(player!!, Components.FADE_TO_BLACK_120)
|
||||
return@queueScript delayScript(player!!, 6)
|
||||
}
|
||||
1 -> {
|
||||
teleport(player!!, Location(2836, 3739, 0))
|
||||
return@queueScript delayScript(player!!, 1)
|
||||
}
|
||||
2 -> {
|
||||
openOverlay(player!!, Components.FADE_FROM_BLACK_170)
|
||||
return@queueScript delayScript(player!!, 6)
|
||||
}
|
||||
3 -> {
|
||||
closeOverlay(player!!)
|
||||
openDialogue(player!!, ChatFatherAndMotherTrollAfterDialogueFile())
|
||||
return@queueScript stopExecuting(player!!)
|
||||
}
|
||||
else -> return@queueScript stopExecuting(player!!)
|
||||
}
|
||||
}
|
||||
end()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ChatFatherAndMotherTrollAfterDialogueFile : DialogueFile() {
|
||||
// We gon do like this as the old way allows to easily jump between npcs.
|
||||
override fun handle(componentID: Int, buttonID: Int) {
|
||||
when (stage) {
|
||||
0 -> npcl(NPCs.TROLL_CHILD_1933, FacialExpression.OLD_CALM_TALK2, "Mommy! Daddy! You're free!").also { stage++ }
|
||||
1 -> npc(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK1, "That's right son, and it's all thanks to this brave", "adventurer here.", "Now, make sure you hand over that diamond he was", "looking for.").also { stage++ }
|
||||
2 -> npcl(NPCs.TROLL_FATHER_1948, FacialExpression.OLD_CALM_TALK1, "It has been nothing but trouble for us, let's just get back to our cave and have dinner.").also { stage++ }
|
||||
3 -> npcl(NPCs.TROLL_MOTHER_1950, FacialExpression.OLD_CALM_TALK2, "That's right son, it's your favorite tonight too! A big plate of raw mackerel!").also { stage++ }
|
||||
4 -> npcl(NPCs.TROLL_CHILD_1933, FacialExpression.OLD_CALM_TALK2, "RAW MACKEREL! YUMMY!").also { stage++ }
|
||||
5 -> npcl(NPCs.TROLL_CHILD_1933, FacialExpression.OLD_CALM_TALK1, "Here ya go mister! Thanks for getting my mom and dad away from the bad man!").also {
|
||||
stage++
|
||||
if (DesertTreasure.getSubStage(player!!, DesertTreasure.attributeIceStage) in 3 .. 4) {
|
||||
addItemOrDrop(player!!, Items.ICE_DIAMOND_4671)
|
||||
DesertTreasure.setSubStage(player!!, DesertTreasure.attributeIceStage, 100)
|
||||
}
|
||||
}
|
||||
6 -> playerl("Don't worry about it, just as long as I don't have to go back into that blizzard.").also {
|
||||
stage = END_DIALOGUE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.node.entity.player.Player
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class IceTrollBehavior : NPCBehavior(*iceTrollIds) {
|
||||
companion object {
|
||||
private val iceTrollIds = intArrayOf(
|
||||
NPCs.ICE_TROLL_1936,
|
||||
NPCs.ICE_TROLL_1937,
|
||||
NPCs.ICE_TROLL_1938,
|
||||
NPCs.ICE_TROLL_1939,
|
||||
NPCs.ICE_TROLL_1940,
|
||||
NPCs.ICE_TROLL_1941,
|
||||
NPCs.ICE_TROLL_1942,
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDeathFinished(self: NPC, killer: Entity) {
|
||||
if (killer is Player) {
|
||||
if (getQuestStage(killer, DesertTreasure.questName) >= 9) {
|
||||
val currentIceTrollKill = getAttribute(killer, DesertTreasure.attributeTrollKillCount, 0)
|
||||
if (currentIceTrollKill < 5) {
|
||||
setAttribute(killer, DesertTreasure.attributeTrollKillCount, currentIceTrollKill + 1)
|
||||
setVarbit(killer, DesertTreasure.varbitCaveEntrance, getAttribute(killer, DesertTreasure.attributeTrollKillCount, 0))
|
||||
sendMessage(killer, "A chunk of ice falls away from the cave entrance...")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class IceTrollDialogue (player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, IceTrollDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return IceTrollDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.ICE_TROLL_1935)
|
||||
}
|
||||
|
||||
}
|
||||
class IceTrollDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onPredicate { _ -> true }
|
||||
.npc(FacialExpression.OLD_LAUGH1, "Hur hur hur!", "Well look here, a puny fleshy human!")
|
||||
.npc(FacialExpression.OLD_LAUGH1, "You should beware of the icy wind that runs through", "this valley, it will bring a fleshy like you to a cold end", "indeed!")
|
||||
.end()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.combat.*
|
||||
import core.game.node.entity.combat.equipment.SwitchAttack
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import core.tools.RandomFunction
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
// https://www.youtube.com/watch?v=xeu6Ncmt1fY
|
||||
|
||||
class KamilBehavior : NPCBehavior(NPCs.KAMIL_1913) {
|
||||
|
||||
var clearTime = 0
|
||||
|
||||
override fun canBeAttackedBy(self: NPC, attacker: Entity, style: CombatStyle, shouldSendMessage: Boolean): Boolean {
|
||||
if (attacker is Player) {
|
||||
if (attacker == getAttribute<Player?>(self, "target", null)) {
|
||||
return true
|
||||
}
|
||||
sendMessage(attacker, "It's not after you...")
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun tick(self: NPC): Boolean {
|
||||
val player: Player? = getAttribute<Player?>(self, "target", null)
|
||||
if (clearTime++ > 800) {
|
||||
clearTime = 0
|
||||
if (player != null) {
|
||||
sendMessage(player, "Kamil vanishes on an icy wind...")
|
||||
removeAttribute(player, DesertTreasure.attributeKamilInstance)
|
||||
}
|
||||
poofClear(self)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onDeathFinished(self: NPC, killer: Entity) {
|
||||
if (killer is Player) {
|
||||
if (DesertTreasure.getSubStage(killer, DesertTreasure.attributeIceStage) == 2) {
|
||||
DesertTreasure.setSubStage(killer, DesertTreasure.attributeIceStage, 3)
|
||||
removeAttribute(killer, DesertTreasure.attributeKamilInstance)
|
||||
sendPlayerDialogue(killer, "Well, that must have been the 'bad man' that the troll kid was on about... His parents must be up ahead somewhere.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getSwingHandlerOverride(self: NPC, original: CombatSwingHandler): CombatSwingHandler {
|
||||
return KamilCombatHandler()
|
||||
}
|
||||
}
|
||||
|
||||
// All these combat shit is the most trash level thing to use or decipher.
|
||||
class KamilCombatHandler: MultiSwingHandler(
|
||||
SwitchAttack(CombatStyle.MELEE.swingHandler, null),
|
||||
) {
|
||||
override fun impact(entity: Entity?, victim: Entity?, state: BattleState?) {
|
||||
if (victim is Player) {
|
||||
// This is following RevenantCombatHandler.java, no idea if this is good.
|
||||
// I can't be bothered to fix fucking frozen. The player can hit through frozen. What the fuck is frozen for then, to glue his fucking legs???
|
||||
if (RandomFunction.roll(3) && !hasTimerActive(victim, "frozen") && !hasTimerActive(victim, "frozen:immunity")) {
|
||||
registerTimer(victim, spawnTimer("frozen", 7, true))
|
||||
sendMessage(victim, "You've been frozen!")
|
||||
sendChat(entity as NPC, "Sallamakar Ro!") // Salad maker roll.
|
||||
sendGraphics(539, victim.location)
|
||||
victim.properties.combatPulse.stop() // Force the victim to stop fighting. Whatever.
|
||||
// Audio?
|
||||
}else {
|
||||
animate(entity!!, Animation(440))
|
||||
}
|
||||
}
|
||||
super.impact(entity, victim, state)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.node.entity.combat.ImpactHandler.HitsplatType
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class MalakDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, MalakDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return MalakDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.MALAK_1920)
|
||||
}
|
||||
}
|
||||
|
||||
class MalakDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
b.onQuestStages(DesertTreasure.questName, 0,1,2,3,4,5,6,7,8)
|
||||
.npc("Away from me, dog.", "I have business to discuss with the barkeeper.")
|
||||
.end()
|
||||
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 9)
|
||||
.branch { player ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeBloodStage) == 1) {
|
||||
return@branch 0 // Same branch as 0
|
||||
}
|
||||
return@branch DesertTreasure.getSubStage(player, DesertTreasure.attributeBloodStage)
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.npcl("A human, eh? Give me one good reason why I should not just take you to Lord Drakan now.")
|
||||
// There's a ring of charos dialogue here, but its one line and doesn't change anything...
|
||||
.npcl("You had better make it a good one too, or you will not survive the night, I'll wager.")
|
||||
.let { builder ->
|
||||
val returnJoin = b.placeholder()
|
||||
builder.goto(returnJoin)
|
||||
return@let returnJoin.builder()
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
val continuePath = b.placeholder()
|
||||
optionBuilder.option("I am here to worship Zamorak")
|
||||
.playerl("I am here to worship the almighty Zamorak! Yay! Go Zamorak!")
|
||||
.npcl("I see. You are a moron. You have probably settled right in with the rest of the idiots in this pathetic excuse for a village.")
|
||||
.npcl("Unfortunately for you, that is not a good enough reason to explain your presence here.")
|
||||
.npcl("Now tell me the reason for your coming here, or I will ensure you suffer a horrible fate indeed.")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("I am here to praise Lord Drakan")
|
||||
.playerl("I am here only to serve the mighty Drakan. Yup, Drakan, he's the man.")
|
||||
.npcl("I see. I would perhaps be more inclined to believe you if I could not smell the death blood of his brother Draynor upon you.")
|
||||
.npcl("What are you real intentions here?")
|
||||
// "If the player has not completed Vampyre Slayer" but I'm lazy again
|
||||
// .npcl("Really? That is interesting, that you would want to give your life by tresspassing in this land for such an unbelievable reason.")
|
||||
// .npcl("Now speak, what is your purpose in coming here?")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("I am here to worship you, oh mighty Malak")
|
||||
.playerl("I am here only to serve the mighty Drakan.")
|
||||
.playerl("I came here looking for you, oh mighty Malak, so that I might serve your glory.")
|
||||
.npcl("Please. Do not think that I am so vain and foolish as to allow you to avoid my question with such obvious sycophancy.")
|
||||
.npcl("Now tell me the reason behind your being here, or I will ensure that you suffer.")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("I am here to kill Lord Drakan")
|
||||
.playerl("I am here to kill Lord Drakan, and every stinking one of his vampyre brood!")
|
||||
.npcl("Hah! Most entertaining, human!")
|
||||
.npcl("Now tell me the reason you are here, or we shall soon see who will be killing whom.")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("I am looking for a special Diamond...")
|
||||
.playerl("I am here looking for a special diamond... I have reason to believe it is somewhere in this vicinity, and it is probably in the possession of a warrior of Zamorak.")
|
||||
.playerl("I'm fairly sure it will have some kind of magical aura or something too. I don't suppose you've seen it, or know where it might be?")
|
||||
.npcl("Interesting... Well perhaps we can come to a little... arrangement, human.")
|
||||
.npcl("I may have information that may assist you, but you in turn will have to do something for me. What do you say? Do you think we could come to some form of")
|
||||
.npcl("agreement?")
|
||||
.playerl("Well, what kind of something? No offence, but you're not exactly the trustworthy type...")
|
||||
.npcl("Ah, you have a healthy sense of paranoia, I see. It is not a particularly unfair request on my part...")
|
||||
.npcl("All I ask is that you ensure that the current owner of the diamond is killed. For my part, I will let you know his whereabouts, and how exactly to kill him.")
|
||||
.npcl("When he is dead, you may take the diamond from his corpse and do with it what you will. I have no interest in such baubles.")
|
||||
.npcl("So what say you? A life for a diamond. As a mark of good faith, I will give you some information free:")
|
||||
.npcl("The current owner of this diamond is named Dessous.")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeBloodStage) == 0) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeBloodStage, 1)
|
||||
}
|
||||
}
|
||||
.options("Agree to this arrangement?")
|
||||
.let { optionBuilder2 ->
|
||||
optionBuilder2.option("Yes")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeBloodStage) == 1) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeBloodStage, 2)
|
||||
}
|
||||
}
|
||||
.playerl("Well... I can't see any drawback. Okay, I accept your offer. Now tell me what you know.")
|
||||
.goto(continuePath)
|
||||
|
||||
optionBuilder2.option("No")
|
||||
.playerl("I don't trust you, or anything you say. I'm afraid I have to decline.")
|
||||
.npcl("As you wish human. I doubt anybody near here knows of the diamond you seek, however.")
|
||||
.npcl("If you wish to claim it as your own, you have little choice but to accept my bargain. I will wait here until such time as you change your mind.")
|
||||
.end()
|
||||
}
|
||||
return@let continuePath.builder()
|
||||
}
|
||||
}
|
||||
.npcl("What I know? Hah! After you have been alive for as long as I, the things I know are enough to fill a library.")
|
||||
.npcl("I'm afraid you will need to be a little more specific.")
|
||||
.let { builder ->
|
||||
val returnJoin = b.placeholder()
|
||||
builder.goto(returnJoin)
|
||||
returnJoin.builder()
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Why do you want Dessous dead?")
|
||||
.playerl("I don't see exactly how this bargain benefits you... Why exactly do you want Dessous killed anyway?")
|
||||
.npcl("That is an impertinent question to demand from myself.")
|
||||
.npcl("However, if it will help seal our deal, I will let you know some of the details.")
|
||||
.npcl("As you may or may not know, myself and my blood kin are the rulers of this land, all serving under Lord Drakan. However, we tend not to die of old age or similar")
|
||||
.npcl("natural causes, which means that to gain another Lords tithe or land, there often need to be...")
|
||||
.npcl("Unnatural causes of death involved. Let us just say, that Dessous is in control of some land that I myself would like some say in, and that it is not in my interest to be seen to be responsible for the")
|
||||
.npcl("death of a fellow Lord.")
|
||||
.npcl("It would however be extremely advantageous to myself should some random human adventurer take it upon themself to remove this rival for me... Do you understand?")
|
||||
.playerl("Yes... I think so...")
|
||||
.npcl("Good, we understand each other then. We will both benefit from the death of Dessous.")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("Where can I find Dessous?")
|
||||
.playerl("Where can I find this Dessous?")
|
||||
.npcl("He currently resides in a graveyard to the South-East of here. You will not be able to move the gravestone which he lies beneath however, you will need to find some way to")
|
||||
.npcl("lure him out from his tomb.")
|
||||
.playerl("And how exactly would I go about doing that?")
|
||||
.npcl("Well, he is a vampyre, so fresh blood would almost certainly entice him out.")
|
||||
.npcl("However, even though he is a frail and decrepit example of our species, he will be able to kill a weakling human such as yourself extremely easily. Having him in a bloodlust as he does so, will not make")
|
||||
.npcl("your job any easier.")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("How can I kill Dessous?")
|
||||
.playerl("So what advice can you give me on killing Dessous?")
|
||||
.npcl("As ancient and weak as Dessous is, he is still more than a match for the likes of you.")
|
||||
.npcl("That is, assuming you were to fight him fairly.")
|
||||
.npcl("My proposal would be for you to even the odds up a little bit...")
|
||||
.playerl("How would I go about doing that?")
|
||||
.npcl("Well, my plan would be as follows. First, take a silver bar to the man living in the sewers in Draynor. He was an assistant to Count Draynor in some of his...")
|
||||
.npcl("more interesting experiments many years past. Tell him you need a sacrificial offering pot. He will know what you speak of, it is a unique type of container used in various ancient vampyric ceremonies.")
|
||||
.npcl("Then take the pot to Entrana and get it blessed by the Head Monk. This will lend the pot some holy power.")
|
||||
.npcl("If you then bring that silver pot back to me, I will provide you with some fresh blood, to put into it. To that pot of blood, you will add some crushed garlic, and some spice to disguise the smell.")
|
||||
.npcl("Use that pot of blood upon Dessous' tomb, and he will be unable to resist rising and drinking from it.")
|
||||
.npcl("The combination of garlic, silver, and blessings from Saradomin will act upon him as a poison, and allow you to kill him.")
|
||||
.npcl("This is just my suggestion of course, you may ignore it if you wish, although I offer no guarantees of your ability to defeat him otherwise.")
|
||||
.npcl("Was there anything else you wanted?")
|
||||
.goto(returnJoin)
|
||||
|
||||
optionBuilder.option("Actually, I don't need to know anything.")
|
||||
.playerl("Never mind, I will figure out all I need to know by myself.")
|
||||
.npcl("As you wish. Come and see me when you have managed to kill Dessous.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
||||
branch.onValue(2)
|
||||
.branch { player ->
|
||||
return@branch if(inInventory(player, Items.BLESSED_POT_4659) || inInventory(player, Items.SILVER_POT_4658)) { 1 } else { 0}
|
||||
}.let { branch2 ->
|
||||
branch2.onValue(1)
|
||||
.player("I found Ruantun in Draynors sewers.", "He made me this pot, now where can I get some fresh", "blood to fill it with?")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
sendMessage(player, "Malak cuts you and pours some of your blood into the pot.")
|
||||
if (removeItem(player, Items.SILVER_POT_4658)) {
|
||||
addItemOrDrop(player, Items.SILVER_POT_4660)
|
||||
} else if (removeItem(player, Items.BLESSED_POT_4659)) {
|
||||
addItemOrDrop(player, Items.BLESSED_POT_4661)
|
||||
}
|
||||
animate(npc!!, 1264)
|
||||
player.impactHandler.manualHit(player, 5, HitsplatType.NORMAL)
|
||||
}
|
||||
.linel("Malak cuts you and pours some of your blood into the pot.") // Supposed to be a sendMessage not a dialogue, but why...
|
||||
.playerl("Ow!")
|
||||
.npcl("There you go. As fresh as it gets.")
|
||||
.playerl("Thanks for nothing.")
|
||||
.npcl("Come and speak to me again when you have managed to kill Dessous.")
|
||||
.end()
|
||||
|
||||
branch2.onValue(0)
|
||||
.npcl("Why are you still here? I notice Dessous still lives.")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Where can I find Dessous?")
|
||||
.playerl("Where can I find this Dessous?")
|
||||
.npcl("He currently resides in a graveyard to the South-East of here. You will not be able to move the gravestone which he lies beneath however, you will need to find some way to")
|
||||
.npcl("lure him out from his tomb.")
|
||||
.playerl("And how exactly would I go about doing that?")
|
||||
.npcl("Come and see my when you have prepared a silver ritual pot in the manner I have told you.")
|
||||
.npcl("I will ensure that you get some fresh blood that you may taint with garlic and spices, to lure our Dessous.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("How do I kill Dessous again?")
|
||||
.playerl("How am I supposed to kill Dessous again?")
|
||||
.npcl("Take a silver bar to the man in the Draynor sewers. He will fashion a ritualistic pot for you, which you should then take to Entrana and get blessed.")
|
||||
.npcl("When you have done that, come back here and speak to me, I will provide you with some fresh blood which you will then crush some garlic into, and then add some spices to hide the garlic.")
|
||||
.npcl("In this way, you will be able to lure him from his tomb and he should be sufficiently weakened to be vulnerable to your attacks.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("Actually, I don't need to know anything.")
|
||||
.playerl("Never mind, I will figure out all I need to know by myself.")
|
||||
.npcl("As you wish. Come and see me when you have managed to kill Dessous.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
||||
branch.onValue(3)
|
||||
.npcl("Ah, the wandering hero returns! I take it you have dispatched poor old Dessous for me?")
|
||||
.playerl("Quit playing games with me, Malak. I want that diamond, and I want it now!")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeBloodStage) == 3) {
|
||||
addItemOrDrop(player, Items.BLOOD_DIAMOND_4670)
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeBloodStage, 100)
|
||||
}
|
||||
}
|
||||
.npcl("Do not take that tone of voice with me, meat. You should be thankful I have allowed you your life.")
|
||||
.npcl("Here, take your precious little bauble.")
|
||||
.npcl("I will take that silver pot from you as well, humans are not meant to possess such artefacts. Now get out of my sight, our deal is complete, and if I see you here again I will not hesistate to take you to")
|
||||
.npcl("Lord Drakan.")
|
||||
.npcl("He will be extremely pleased to meet the murderer of poor Dessous, I suspect.")
|
||||
.end()
|
||||
|
||||
branch.onValue(100)
|
||||
.branch { player ->
|
||||
return@branch if(!inInventory(player, Items.BLOOD_DIAMOND_4670)) { 1 } else { 0 }
|
||||
}.let { branch2 ->
|
||||
branch2.onValue(1)
|
||||
.playerl("Where is the Diamond of Blood? I know you have it!")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
addItemOrDrop(player, Items.BLOOD_DIAMOND_4670)
|
||||
}
|
||||
.npcl("Do not take that tone of voice with me, meat. Here, take your bauble. I have no use for it.")
|
||||
.end()
|
||||
|
||||
branch2.onValue(0)
|
||||
.npcl("Be lucky I have let you live, meat. Our deal is done, I wish no further dealing with you.")
|
||||
.end()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 10,11,12,13,100)
|
||||
.npcl("Be lucky I have let you live, meat. Our deal is done, I wish no further dealing with you.")
|
||||
.end()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.world.map.Direction
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.map.zone.ZoneBorders
|
||||
import core.tools.RandomFunction
|
||||
import org.rs09.consts.Components
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class PyramidArea {
|
||||
companion object {
|
||||
/** All The Sarcophagus Locations */
|
||||
val sarcophagusList = arrayOf(
|
||||
// Level 1
|
||||
Location(2901, 4946, 3),
|
||||
Location(2902, 4969, 3),
|
||||
Location(2903, 4961, 3),
|
||||
Location(2909, 4954, 3),
|
||||
Location(2913, 4950, 3),
|
||||
Location(2916, 4954, 3),
|
||||
Location(2917, 4951, 3),
|
||||
Location(2917, 4959, 3),
|
||||
Location(2918, 4963, 3),
|
||||
// Level 2
|
||||
Location(2831, 4962, 2),
|
||||
Location(2837, 4970, 2),
|
||||
Location(2843, 4964, 2),
|
||||
Location(2847, 4947, 2),
|
||||
Location(2858, 4956, 2),
|
||||
Location(2858, 4973, 2),
|
||||
Location(2864, 4942, 2),
|
||||
Location(2868, 4948, 2),
|
||||
Location(2869, 4968, 2),
|
||||
// Level 3
|
||||
Location(2759, 4962, 1),
|
||||
Location(2760, 4956, 1),
|
||||
Location(2763, 4966, 1),
|
||||
Location(2764, 4941, 1),
|
||||
Location(2765, 4936, 1),
|
||||
Location(2765, 4940, 1),
|
||||
Location(2767, 4945, 1),
|
||||
Location(2768, 4947, 1),
|
||||
Location(2771, 4944, 1),
|
||||
Location(2774, 4947, 1),
|
||||
Location(2776, 4941, 1),
|
||||
Location(2786, 4974, 1),
|
||||
Location(2787, 4964, 1),
|
||||
Location(2790, 4968, 1),
|
||||
Location(2791, 4977, 1),
|
||||
Location(2798, 4947, 1),
|
||||
Location(2798, 4952, 1),
|
||||
Location(2800, 4960, 1),
|
||||
Location(2802, 4940, 1),
|
||||
Location(2806, 4936, 1),
|
||||
Location(2806, 4942, 1),
|
||||
Location(2810, 4968, 1),
|
||||
Location(2810, 4975, 1),
|
||||
// Level 4
|
||||
Location(3208, 9315, 0),
|
||||
Location(3211, 9330, 0),
|
||||
Location(3217, 9295, 0),
|
||||
Location(3218, 9281, 0),
|
||||
Location(3221, 9313, 0),
|
||||
Location(3221, 9320, 0),
|
||||
Location(3221, 9324, 0),
|
||||
Location(3222, 9281, 0),
|
||||
Location(3225, 9308, 0),
|
||||
Location(3225, 9310, 0),
|
||||
Location(3226, 9312, 0),
|
||||
Location(3226, 9318, 0),
|
||||
Location(3227, 9288, 0),
|
||||
Location(3229, 9309, 0),
|
||||
Location(3231, 9297, 0),
|
||||
Location(3233, 9309, 0),
|
||||
Location(3234, 9297, 0),
|
||||
Location(3234, 9330, 0),
|
||||
Location(3236, 9302, 0),
|
||||
Location(3237, 9309, 0),
|
||||
Location(3240, 9312, 0),
|
||||
Location(3240, 9318, 0),
|
||||
Location(3241, 9282, 0),
|
||||
Location(3242, 9302, 0),
|
||||
Location(3246, 9282, 0),
|
||||
Location(3246, 9308, 0),
|
||||
Location(3246, 9324, 0),
|
||||
Location(3247, 9323, 0),
|
||||
Location(3249, 9293, 0),
|
||||
Location(3250, 9324, 0),
|
||||
Location(3251, 9323, 0),
|
||||
Location(3251, 9330, 0),
|
||||
Location(3251, 9337, 0),
|
||||
Location(3252, 9330, 0),
|
||||
Location(3252, 9337, 0),
|
||||
Location(3253, 9301, 0),
|
||||
Location(3254, 9324, 0),
|
||||
Location(3255, 9323, 0),
|
||||
Location(3255, 9330, 0),
|
||||
Location(3255, 9337, 0),
|
||||
Location(3256, 9330, 0),
|
||||
Location(3256, 9337, 0),
|
||||
Location(3257, 9289, 0),
|
||||
Location(3259, 9310, 0),
|
||||
Location(3259, 9313, 0),
|
||||
)
|
||||
|
||||
val safeZone = ZoneBorders(3227, 3239, 9310, 9320)
|
||||
|
||||
// Direction.NORTH - LEFT
|
||||
// rot 0 - LEFT
|
||||
// rot 1 - NORTH
|
||||
// rot 2 - RIGHT
|
||||
// rot 3 - SOUTH
|
||||
/** Sarcophagus Opening Location (Note, they are all wrongly mapped due to Scenery) */
|
||||
fun getNewLocation(direction: Direction): Location {
|
||||
return when (direction) {
|
||||
Direction.NORTH -> Location(-1, 0)
|
||||
Direction.WEST -> Location(0, -1)
|
||||
Direction.EAST -> Location(0, 1)
|
||||
Direction.SOUTH -> Location(1, 0)
|
||||
else -> Location(0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
/** Sarcophagus Opening Facing (Note, they are all wrongly mapped due to Scenery) */
|
||||
fun getNewFacing(direction: Direction): Direction {
|
||||
return when (direction) {
|
||||
Direction.NORTH -> Direction.NORTH
|
||||
Direction.WEST -> Direction.NORTH_WEST
|
||||
Direction.SOUTH -> Direction.WEST
|
||||
Direction.EAST -> Direction.NORTH_EAST
|
||||
else -> direction
|
||||
}
|
||||
}
|
||||
|
||||
fun nearSarcophagus(loc: Location): Location? {
|
||||
for (sarcoph in sarcophagusList) {
|
||||
if(loc.withinDistance(sarcoph, 3)) {
|
||||
return sarcoph
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/** Trapdoor randomly throws you out of the Pyramid. */
|
||||
fun trapdoorTrap(player: Player) {
|
||||
stopWalk(player)
|
||||
lock(player, 8)
|
||||
sendMessage(player, "You accidentally trigger a trap...")
|
||||
// addScenery(6521, location) -> animateScenery(scenery, 1939), but 6522 does it for you.
|
||||
val pitfallScenery = addScenery(6522, player.location) // Scenery - Trapdoor Scenery
|
||||
animate(player, 1950) // Anim - Player Falling Animation
|
||||
queueScript(player, 4, QueueStrength.SOFT) { stage ->
|
||||
when (stage) {
|
||||
0 -> {
|
||||
sendGraphics(354, player.location) // Gfx - Puff of Smoke
|
||||
closeOverlay(player)
|
||||
openOverlay(player, Components.FADE_TO_BLACK_120)
|
||||
return@queueScript delayScript(player, 2)
|
||||
}
|
||||
1 -> {
|
||||
removeScenery(pitfallScenery)
|
||||
teleport(player, Location(3233, 2887, 0))
|
||||
sendMessage(player, "...and tumble unharmed outside the pyramid.")
|
||||
closeOverlay(player)
|
||||
openOverlay(player, Components.FADE_FROM_BLACK_170)
|
||||
// animate(player, ??) // Anim - Player Getting Up https://www.youtube.com/watch?v=95OvIPFYCwg
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
else -> return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Mummies randomly spawns out of a sarcophagus. */
|
||||
fun spawnMummy(player: Player, sarcophagusLocation: Location) {
|
||||
stopWalk(player)
|
||||
lock(player, 3)
|
||||
val sarcophagusScenery = getScenery(sarcophagusLocation) ?: return
|
||||
val locationInFront = sarcophagusScenery.location.transform(getNewLocation(sarcophagusScenery.direction))
|
||||
// There are 6 sarcophagus, 6512 - 6517 with different door designs.
|
||||
// They map nicely to 6506 - 6511 and act like a door.
|
||||
// 6505 is the underlying hole scenery after the door opens, but it is done for you.
|
||||
replaceScenery(
|
||||
sarcophagusScenery,
|
||||
sarcophagusScenery.id - 6,
|
||||
5,
|
||||
getNewFacing(sarcophagusScenery.direction),
|
||||
locationInFront
|
||||
)
|
||||
val mummyNpc = NPC(NPCs.MUMMY_1958)
|
||||
mummyNpc.isRespawn = false
|
||||
mummyNpc.isWalks = false
|
||||
mummyNpc.isAggressive = true
|
||||
mummyNpc.location = sarcophagusScenery.location
|
||||
mummyNpc.init()
|
||||
mummyNpc.walkingQueue.addPath(locationInFront.x, locationInFront.y)
|
||||
sendChat(mummyNpc, "Rawr!")
|
||||
stopWalk(player)
|
||||
queueScript(player, 2, QueueStrength.SOFT) { stage ->
|
||||
stopWalk(player)
|
||||
mummyNpc.walkingQueue.addPath(locationInFront.x, locationInFront.y)
|
||||
mummyNpc.isWalks = true
|
||||
mummyNpc.isAggressive = true
|
||||
mummyNpc.attack(player)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Scarabs randomly spawns somewhere near you. */
|
||||
fun spawnScarabs(player: Player) {
|
||||
stopWalk(player)
|
||||
lock(player, 3)
|
||||
val scarabsLocation = Location.getRandomLocation(player.location, 3, true)
|
||||
sendGraphics(356, scarabsLocation) // Gfx - Cracks before scarab appears.
|
||||
val scarabNpc = NPC(NPCs.SCARABS_1969)
|
||||
stopWalk(player)
|
||||
queueScript(player, 2, QueueStrength.STRONG) { stage ->
|
||||
stopWalk(player)
|
||||
when (stage) {
|
||||
0 -> {
|
||||
scarabNpc.isRespawn = false
|
||||
scarabNpc.isWalks = false
|
||||
scarabNpc.location = scarabsLocation
|
||||
scarabNpc.init()
|
||||
animate(scarabNpc, 1949) // Anim - Scarabs appearing from ground.
|
||||
return@queueScript delayScript(player, 3)
|
||||
}
|
||||
1 -> {
|
||||
scarabNpc.isWalks = true
|
||||
scarabNpc.isAggressive = true
|
||||
scarabNpc.attack(player)
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PyramidAreaFirstThree: MapArea {
|
||||
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf(
|
||||
getRegionBorders(11597),
|
||||
getRegionBorders(11341),
|
||||
getRegionBorders(11085),
|
||||
getRegionBorders(12945),
|
||||
)
|
||||
}
|
||||
|
||||
override fun entityStep(entity: Entity, location: Location, lastLocation: Location) {
|
||||
if (entity is Player) {
|
||||
|
||||
if (!PyramidArea.safeZone.insideBorder(entity.location)) { // Safezone is talking to Azzanadra.
|
||||
val averageLevel = (
|
||||
getDynLevel(entity, Skills.AGILITY) +
|
||||
getDynLevel(entity, Skills.THIEVING)
|
||||
) / 2
|
||||
val randomValue = RandomFunction.randomDouble(99.5)
|
||||
|
||||
if ((1..10).random() == 1) {
|
||||
// A mummy would jump out if you walk near a sarcophagus of 2 radius.
|
||||
val sarcoph = PyramidArea.nearSarcophagus(entity.location)
|
||||
if (sarcoph != null) {
|
||||
PyramidArea.spawnMummy(entity, sarcoph)
|
||||
}
|
||||
}
|
||||
|
||||
if ((1..60).random() == 1) {
|
||||
PyramidArea.spawnScarabs(entity)
|
||||
}
|
||||
if (randomValue > averageLevel) {
|
||||
PyramidArea.trapdoorTrap(entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class PyramidAreaFinal: MapArea {
|
||||
|
||||
override fun defineAreaBorders(): Array<ZoneBorders> {
|
||||
return arrayOf(
|
||||
getRegionBorders(12945),
|
||||
)
|
||||
}
|
||||
|
||||
override fun entityStep(entity: Entity, location: Location, lastLocation: Location) {
|
||||
if (entity is Player) {
|
||||
|
||||
if ((1..30).random() == 1) {
|
||||
PyramidArea.spawnScarabs(entity)
|
||||
}
|
||||
|
||||
if ((1..15).random() == 1) {
|
||||
// A mummy would jump out if you walk near a sarcophagus of 2 radius.
|
||||
val sarcoph = PyramidArea.nearSarcophagus(entity.location)
|
||||
if (sarcoph != null) {
|
||||
PyramidArea.spawnMummy(entity, sarcoph)
|
||||
}
|
||||
}
|
||||
|
||||
// No Trapdoor For The Final Level
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
@Initializable
|
||||
class RasoloDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, RasoloDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return RasoloDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.RASOLO_1972)
|
||||
}
|
||||
}
|
||||
|
||||
class RasoloDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 0,1,2,3,4,5,6,7,8)
|
||||
.npc("Greetings friend.", "I am Rasolo, the famous merchant.", "Would you care to see my wares?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Yes")
|
||||
.endWith { _, player ->
|
||||
openNpcShop(player, npc!!.id)
|
||||
}
|
||||
optionBuilder.option("No")
|
||||
.playerl("No, not really.")
|
||||
.npcl("As you wish. I will travel wherever the business takes me.")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onPredicate { player ->
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 0 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9
|
||||
}
|
||||
.npc("Greetings friend.", "I am Rasolo, the famous merchant.", "Would you care to see my wares?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Yes")
|
||||
.endWith { _, player ->
|
||||
openNpcShop(player, npc!!.id)
|
||||
}
|
||||
optionBuilder.option("No")
|
||||
.playerl("No, not really.")
|
||||
.npcl("As you wish. I will travel wherever the business takes me.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("Ask about the Diamonds of Azzanadra")
|
||||
.playerl("No, actually I was looking for something specific...")
|
||||
.npcl("Hmmmm? And what would that be?")
|
||||
.playerl("I am looking for one of the Diamonds of Azzanadra. I have reason to believe it may be somewhere around here...")
|
||||
.npcl("Ahhh... The Shadow Diamond...")
|
||||
.npcl("I know the object of which you speak. It is guarded by a fearsome warrior known as Damis, they say, who lives in the shadows, invisible to prying eyes...")
|
||||
.playerl("How can I find this 'Damis' then?")
|
||||
.npcl("Well now... perhaps we can help each other out here.")
|
||||
.npcl("I have in my possession a small trinket, a ring, that allows its wearer to see the unseen...")
|
||||
.playerl("How much do you want for it?")
|
||||
.npcl("Ah, but it is not for sale... As such...")
|
||||
.npcl("I am offering to trade it for an item that was rightfully mine, but that was stolen by a bandit named Laheeb.")
|
||||
.npcl("The item is question is a gilded cross, that has some sentimental value to myself. I wish for you to recover this item for me, and I will happily let you have my ring of visibility.")
|
||||
.playerl("Where can I find this Laheeb?")
|
||||
.npcl("Well, as a travelling merchant I have roamed these lands for many years...")
|
||||
.npcl("To the far east of here there is an area that is dry and barren like the desert... it is called...")
|
||||
.playerl("Al Kharid?")
|
||||
.npcl("...Yes, Al Kharid. Now to the south of Al Kharid there is a passageway, it is called the...")
|
||||
.playerl("Shantay Pass.")
|
||||
.npcl("...Yes. I didn't realise you had travelled there yourself.")
|
||||
.npcl("Anyway, when you have gone through the Shantay Pass, you will find yourself in a hostile desert... You will need to bring water with you to keep your life. Now, to the south-west of this pass, you will find a small")
|
||||
.npcl("village...")
|
||||
.playerl("The Bedabin camp.")
|
||||
.npcl(FacialExpression.ANNOYED, "If you know where Laheeb lives, why did you ask me?")
|
||||
.playerl("I don't. Sorry, please continue.")
|
||||
.npcl("Well, okay then. Anyway, south of this encampment there is an area where few have ever been... It is a village of murderous bandits, and treacherous")
|
||||
.npcl("thieves... This is where Laheeb makes his home.")
|
||||
.npcl("He will have hidden his stolen treasure somewhere in that village, I am sure of it. When you find his loot, you will find my gilded cross. Return it to me, and I will reward you with my ring")
|
||||
.npcl("of visibility, so that you may find Damis. Does this seem fair to you?")
|
||||
.options()
|
||||
.let { optionBuilder2 ->
|
||||
optionBuilder2.option("Yes")
|
||||
.playerl("Not a problem. I'll be back with your cross before you know it.")
|
||||
.endWith { _, player ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 0) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeShadowStage, 1)
|
||||
}
|
||||
}
|
||||
optionBuilder2.option("No")
|
||||
.playerl("Sounds like too much effort to me. I'll find this Damis by myself.")
|
||||
.npcl("As you wish.")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
|
||||
b.onPredicate { player ->
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) in 1 .. 2 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9
|
||||
}
|
||||
.npcl("Have you retrieved my gilded cross for me yet?")
|
||||
.branch { player ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 2 && inInventory(player, Items.GILDED_CROSS_4674)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(0)
|
||||
.playerl("No, not yet...")
|
||||
.npcl("Well what seems to be the problem?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Where can I find Laheeb?")
|
||||
.playerl("Where can I find this Laheeb?")
|
||||
.npcl("Well, as a travelling merchant I have roamed these lands for many years...")
|
||||
.npcl("To the far east of here there is an area that is dry and barren like the desert... it is called...")
|
||||
.playerl("Al Kharid?")
|
||||
.npcl("...Yes, Al Kharid. Now to the south of Al Kharid there is a passageway, it is called the...")
|
||||
.playerl("Shantay Pass.")
|
||||
.npcl("...Yes. I didn't realise you had travelled there yourself.")
|
||||
.npcl("Anyway, when you have gone through the Shantay Pass, you will find yourself in a hostile desert... You will need to bring water with you to keep your life. Now, to the south-west of this pass, you will find a small")
|
||||
.npcl("village...")
|
||||
.playerl("The Bedabin camp.")
|
||||
.npcl("If you know where Laheeb lives, why did you ask me?")
|
||||
.playerl("I don't. Sorry, please continue.")
|
||||
.npcl("Well, okay then. Anyway, south of this encampment there is an area where few have ever been... It is a village of murderous bandits, and treacherous")
|
||||
.npcl("thieves... This is where Laheeb makes his home.")
|
||||
.end()
|
||||
optionBuilder.option("Can't I just buy your ring?")
|
||||
.playerl("Can't I just buy your ring?")
|
||||
.npcl("No, it is not for sale. Some things are more important than money, and the return of my gilded cross is one of them.")
|
||||
.end()
|
||||
optionBuilder.option("Is Damis near here, then?")
|
||||
.playerl("Is Damis near here, then?")
|
||||
.npcl("You would be surprised to know just how close he is...")
|
||||
.end()
|
||||
}
|
||||
branch.onValue(1)
|
||||
.playerl("Yes I have!")
|
||||
.npcl("Excellent, excellent. Here, take this ring. While you wear it, you will be able to see the things that live in shadows...")
|
||||
.npcl("And you will be able to find the entrance to Damis' lair.")
|
||||
.endWith { _, player ->
|
||||
if (removeItem(player, Items.GILDED_CROSS_4674)) {
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 2) {
|
||||
addItemOrDrop(player, Items.RING_OF_VISIBILITY_4657)
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeShadowStage, 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
b.onPredicate { player ->
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) == 3 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9
|
||||
}
|
||||
.npcl("So how goes your quest? Did you managed to find the Diamond you were looking for yet?")
|
||||
.branch { player ->
|
||||
if (inInventory(player, Items.RING_OF_VISIBILITY_4657)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.playerl("Not yet...")
|
||||
.npcl("Well, his lair is very close to here. I suggest you look around for it.")
|
||||
.end()
|
||||
|
||||
branch.onValue(0)
|
||||
.playerl("I lost that ring you gave me...")
|
||||
.npcl("Then by all means, take another. Only a foolish merchant would give away his only stock!")
|
||||
.endWith { _, player ->
|
||||
addItem(player, Items.RING_OF_VISIBILITY_4657)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
b.onPredicate { player ->
|
||||
DesertTreasure.getSubStage(player, DesertTreasure.attributeShadowStage) > 3 &&
|
||||
getQuestStage(player, DesertTreasure.questName) >= 9 || getQuestStage(player, DesertTreasure.questName) >= 10
|
||||
}
|
||||
.npcl("Many thanks for returning my heirloom to me, adventurer. Would you like to buy something?")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Yes")
|
||||
.endWith { _, player ->
|
||||
openNpcShop(player, npc!!.id)
|
||||
}
|
||||
optionBuilder.option("No")
|
||||
.playerl("No, not really.")
|
||||
.npcl("As you wish. I will travel wherever the business takes me.")
|
||||
.end()
|
||||
|
||||
optionBuilder.optionIf("I lost that ring you gave me...") { player ->
|
||||
return@optionIf !inInventory(player, Items.RING_OF_VISIBILITY_4657)
|
||||
}
|
||||
.playerl("I lost that ring you gave me...")
|
||||
.npcl("Then by all means, take another. Only a foolish merchant would give away his only stock!")
|
||||
.endWith { _, player ->
|
||||
addItem(player, Items.RING_OF_VISIBILITY_4657)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class RasoloTradeListeners : InteractionListener {
|
||||
override fun defineListeners() {
|
||||
on(NPCs.RASOLO_1972, NPC, "trade") { player, node ->
|
||||
openNpcShop(player, node.id)
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class RuantunDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, RuantunDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return RuantunDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
return intArrayOf(NPCs.RUANTUN_1916)
|
||||
}
|
||||
}
|
||||
|
||||
class RuantunDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 0,1,2,3,4,5,6,7,8)
|
||||
.playerl("Hello.")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "You ssshould not be down here...")
|
||||
.options()
|
||||
.let { optionBuilder ->
|
||||
optionBuilder.option("Who are you?")
|
||||
.playerl("Who are you?")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "My name isss unimportant... I live only to ssserve my massster.")
|
||||
.playerl("Um... Okay then.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("Why are you down here?")
|
||||
.playerl("Why are you down here?")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "Thisss isss where I belong... Beingsss sssuch as myssself cannot abide in the light... It is in the darknesss where we find our homesss...")
|
||||
.playerl("Uh... Okay then.")
|
||||
.end()
|
||||
|
||||
optionBuilder.option("Can I use your anvil?")
|
||||
.playerl("Can I use your anvil?")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "Of courssse you may... I have very little ussse for it nowadaysss...")
|
||||
.playerl("Uh... Thanks, I guess.")
|
||||
.end()
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 9, 10, 100)
|
||||
// Technically should happen after talking to Malak, but nah.
|
||||
.playerl("Hello.")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "You sshould not be down here...")
|
||||
.playerl("Are you an assistant to Count Draynor?")
|
||||
.npc(FacialExpression.OLD_NORMAL, "I usssed to have that honour...", "Why do you ssseek me?")
|
||||
.branch { player ->
|
||||
return@branch if (inInventory(player, Items.SILVER_BAR_2355)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.playerl("I have a silver bar with me, I was wondering if you could make it into a 'sacrificial offering pot' for me?")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
if (removeItem(player, Items.SILVER_BAR_2355)) {
|
||||
addItemOrDrop(player, Items.SILVER_POT_4658)
|
||||
}
|
||||
}
|
||||
.npc(FacialExpression.OLD_NORMAL, "Yesss, of courssse...", "There you are, put it to good usssse...")
|
||||
.end()
|
||||
|
||||
branch.onValue(0)
|
||||
.playerl("I understand that you can make me a 'sacrificial offering pot' if I bring you a bar of silver?")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "And where did you hear thisss?")
|
||||
.playerl("It was from Malak in Canifis.")
|
||||
.npc(FacialExpression.OLD_NORMAL, "Ah, I sssee...", "Yesss, I know how to make sssuch an item...", "It has been many yearsss sssince I have needed to however...")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "It is not my wisssh to quessstion your desssire for sssuch an item, I wasss merely sssurprisssed that one sssuch as you would make sssuch a requessst...")
|
||||
.npcl(FacialExpression.OLD_NORMAL, "I will happily make you thisss pot, but you mussst bring me a bar of sssilver... Alasss, I can no longer collect my own ingredientsss, and mussst remain here...")
|
||||
.end()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import content.global.handlers.iface.BookInterface
|
||||
import content.global.handlers.iface.BookLine
|
||||
import content.global.handlers.iface.Page
|
||||
import content.global.handlers.iface.PageSet
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.player.Player
|
||||
import org.rs09.consts.Items
|
||||
|
||||
class TranslationBook : InteractionListener {
|
||||
|
||||
companion object {
|
||||
private val TITLE = "Translation Primer"
|
||||
private val CONTENTS = arrayOf(
|
||||
PageSet(
|
||||
Page(
|
||||
BookLine("This is a rough", 55),
|
||||
BookLine("translation of the stone", 56),
|
||||
BookLine("tablet brought to me by", 57),
|
||||
BookLine("courier earlier today.", 58),
|
||||
BookLine("", 59),
|
||||
BookLine("", 60),
|
||||
BookLine("The cuneiforms of this", 61),
|
||||
BookLine("particular tablet are far", 62),
|
||||
BookLine("different to anything I", 63),
|
||||
BookLine("have previously seen in", 64),
|
||||
BookLine("my career as an", 65)
|
||||
),
|
||||
Page(
|
||||
BookLine("archaeological expert.", 66),
|
||||
BookLine("", 67),
|
||||
BookLine("Where possible I have", 68),
|
||||
BookLine("given as accurate a", 69),
|
||||
BookLine("translation as possible, but", 70),
|
||||
BookLine("some of the words I have", 71),
|
||||
BookLine("attempted to translate", 72),
|
||||
BookLine("hold different meanings", 73),
|
||||
BookLine("depending upon their", 74),
|
||||
BookLine("intonation and context;", 75),
|
||||
BookLine("Due to my unfamiliarity", 76)
|
||||
)
|
||||
),
|
||||
PageSet(
|
||||
Page(
|
||||
BookLine("with this language, I have", 55),
|
||||
BookLine("given possible translations", 56),
|
||||
BookLine("for these words wherever", 57),
|
||||
BookLine("I have encountered them.", 58),
|
||||
BookLine("Wherever I have a word", 59),
|
||||
BookLine("n brackets, it is a word", 60),
|
||||
BookLine("which has many meanings", 61),
|
||||
BookLine("depending on the context,", 62),
|
||||
BookLine("although the general", 63),
|
||||
BookLine("meaning should be clear", 64),
|
||||
BookLine("to even a casual study.", 65)
|
||||
),
|
||||
Page(
|
||||
BookLine("", 66),
|
||||
BookLine("", 67),
|
||||
BookLine("Hopefully this translation", 68),
|
||||
BookLine("will help you in your", 69),
|
||||
BookLine("excavations Asgarnia, and", 70),
|
||||
BookLine("as usual I look forward", 71),
|
||||
BookLine("to seeing what relics you", 72),
|
||||
BookLine("bring back to the", 73),
|
||||
BookLine("Museum of Varrock this", 74),
|
||||
BookLine("time!", 75),
|
||||
BookLine("Your friend, as always,", 76)
|
||||
),
|
||||
),
|
||||
PageSet(
|
||||
Page(
|
||||
BookLine("Terry Balando", 55),
|
||||
BookLine("", 56),
|
||||
BookLine("", 57),
|
||||
BookLine("", 58),
|
||||
BookLine("", 59),
|
||||
BookLine("", 60),
|
||||
BookLine("", 61),
|
||||
BookLine("", 62),
|
||||
BookLine("", 63),
|
||||
BookLine("", 64),
|
||||
BookLine("", 65)
|
||||
),
|
||||
Page(
|
||||
BookLine("Translation follows:", 66),
|
||||
BookLine("", 67),
|
||||
BookLine("", 68),
|
||||
BookLine("(There are some missing", 69),
|
||||
BookLine("sentence fragments here,", 70),
|
||||
BookLine("presumably from a stone", 71),
|
||||
BookLine("tablet preceding this one", 72),
|
||||
BookLine("which you have not yet", 73),
|
||||
BookLine("discovered)", 74),
|
||||
BookLine("", 75),
|
||||
BookLine("...the permanent", 76)
|
||||
)
|
||||
),
|
||||
PageSet(
|
||||
Page(
|
||||
BookLine("(exile/journey) of the", 55),
|
||||
BookLine("people ended.", 56),
|
||||
BookLine("And so it came to pass,", 57),
|
||||
BookLine("that deep in the", 58),
|
||||
BookLine("(fiery/uncomfortable)", 59),
|
||||
BookLine("desert, the gods", 60),
|
||||
BookLine("(argued/decided) amongst", 61),
|
||||
BookLine("themselves that the", 62),
|
||||
BookLine("(fortress/home) would be", 63),
|
||||
BookLine("the (selected/chosen) place", 64),
|
||||
BookLine("that would", 65)
|
||||
),
|
||||
Page(
|
||||
BookLine("(imprison/conceal) the", 66),
|
||||
BookLine("(wealth/power).", 67),
|
||||
BookLine("Thus (guarded/protected)", 68),
|
||||
BookLine("by the (unusually archaic", 69),
|
||||
BookLine("word here, I believe it", 70),
|
||||
BookLine("means either the sick or", 71),
|
||||
BookLine("the dead depending on", 72),
|
||||
BookLine("context) and", 73),
|
||||
BookLine("(defended/trapped) by the", 74),
|
||||
BookLine("(diamonds/crystals) of", 75),
|
||||
BookLine("(this word is", 76)
|
||||
)
|
||||
),
|
||||
PageSet(
|
||||
Page(
|
||||
BookLine("untranslatable). So it was", 55),
|
||||
BookLine("that the gods left the four", 56),
|
||||
BookLine("(diamonds/crystals) as the", 57),
|
||||
BookLine("(key/secret).", 58),
|
||||
BookLine("(Guarded/Protected) by", 59),
|
||||
BookLine("the (again, this word has", 60),
|
||||
BookLine("no modern equivalent)", 61),
|
||||
BookLine("and held by the", 62),
|
||||
BookLine("(worthy/strong) so that", 63),
|
||||
BookLine("the (wealth/power) might", 64),
|
||||
BookLine("forever be", 65)
|
||||
),
|
||||
Page(
|
||||
BookLine("(imprisoned/concealed).", 66),
|
||||
BookLine("", 67),
|
||||
BookLine("", 68),
|
||||
BookLine("", 69),
|
||||
BookLine("", 70),
|
||||
BookLine("", 71),
|
||||
BookLine("", 72),
|
||||
BookLine("", 73),
|
||||
BookLine("", 74),
|
||||
BookLine("", 75),
|
||||
BookLine("", 76)
|
||||
)
|
||||
),
|
||||
PageSet(
|
||||
Page(
|
||||
BookLine("There seems to be some", 55),
|
||||
BookLine("further missing", 56),
|
||||
BookLine("information continued", 57),
|
||||
BookLine("onto a further tablet, but", 58),
|
||||
BookLine("from this preliminary", 59),
|
||||
BookLine("translation I think you", 60),
|
||||
BookLine("may be onto something", 61),
|
||||
BookLine("very big indeed!", 62),
|
||||
BookLine("", 63),
|
||||
BookLine("", 64),
|
||||
BookLine("", 65)
|
||||
),
|
||||
),
|
||||
)
|
||||
fun display(player: Player, pageNum: Int, buttonID: Int) : Boolean {
|
||||
BookInterface.pageSetup(player, BookInterface.FANCY_BOOK_3_49, TITLE, CONTENTS)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
override fun defineListeners() {
|
||||
on(Items.TRANSLATION_4655, IntType.ITEM, "read") { player, _ ->
|
||||
BookInterface.openBook(player, BookInterface.FANCY_BOOK_3_49, ::display)
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package content.region.desert.quest.deserttreasure
|
||||
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class TrollChildDialogue(player: Player? = null) : DialoguePlugin(player){
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
openDialogue(player!!, TrollChildDialogueFile(), npc)
|
||||
return false
|
||||
}
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return TrollChildDialogue(player)
|
||||
}
|
||||
override fun getIds(): IntArray {
|
||||
// NPCs.BANDIT_1932 is wrong, should be NPCs.TROLL_CHILD_1932
|
||||
// NPCs.TROLL_CHILD_1933, NPCs.TROLL_CHILD_1934 are varbit controlled 1932 instances.
|
||||
return intArrayOf(NPCs.BANDIT_1932)
|
||||
}
|
||||
}
|
||||
class TrollChildDialogueFile : DialogueBuilderFile() {
|
||||
|
||||
companion object {
|
||||
fun dialogueBeforeQuestCrying(builder: DialogueBuilder): DialogueBuilder {
|
||||
// From https://youtu.be/AJaHuCuxfFg 15:19
|
||||
return builder
|
||||
.playerl("Hello there.")
|
||||
.line("The troll child is crying to itself.", "It is ignoring you completely.")
|
||||
}
|
||||
fun dialogueStillCrying(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.playerl("Hello there.")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"Waaaaaaa!")
|
||||
.line("This troll seems very upset about something.", "Maybe some sweet food would take his mind off things?")
|
||||
}
|
||||
fun dialogueStoppedCrying(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.playerl("Hello there.")
|
||||
.npc(FacialExpression.OLD_SAD,"-sniff-","H-hello there.")
|
||||
.playerl("Why so sad, little troll?")
|
||||
.npc(FacialExpression.OLD_NEARLY_CRYING,"It was the bad man!", "He hurt my mommy and daddy!", "He made them all freezey!")
|
||||
.playerl("Bad man...?")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"He said it was because they stole his diamond! But they never did! They found it, and didn't know who it belonged to!")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"My mommy always told me stealing is wrong, they would never steal from someone!")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"Then he did some wavey hand thing and my mommy and daddy got frozified!")
|
||||
.playerl("A diamond you say? Listen, I think I might be able to help your parents, but I need that Diamond in return.")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"-sniff- I don't think they really wanted it anyway, they would have given it back to the bad man if he'd asked before freezifying them...")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"I give you my promise mister that if you unfreeze my mommy and daddy, you can have the stupid diamond.")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"Do we have a deal?")
|
||||
}
|
||||
fun dialogueYesToHelp(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.playerl("Absolutely. Don't worry kid, I'll get your parents back to you safe and sound.")
|
||||
}
|
||||
fun dialogueNoToHelp(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.playerl("Sorry, I can't make any promises about that, and I don't think I have the time to waste trying to defrost some stupid ice trolls.")
|
||||
.npcl(FacialExpression.OLD_NEARLY_CRYING,"Waaaaaaa!")
|
||||
}
|
||||
fun dialogueHaveYouFreedThem(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.npcl(FacialExpression.OLD_SAD,"You didn't free my mommy and daddy yet?")
|
||||
.player("Not yet...")
|
||||
.npc(FacialExpression.OLD_SAD,"Please try harder!", "I love my mommy and daddy!")
|
||||
}
|
||||
fun dialogueThankYou(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.npc(FacialExpression.OLD_CALM_TALK1, "Thanks for all of your help!", "I'm surprised you managed to survive the blizzard,", "being a thin skinned fleshy and all!")
|
||||
.player("What can I say?", "I'm a lot tougher than I look.")
|
||||
}
|
||||
fun dialogueLostDiamond(builder: DialogueBuilder): DialogueBuilder {
|
||||
return builder
|
||||
.playerl("I lost that diamond of Ice you gave me...")
|
||||
.npcl(FacialExpression.OLD_CALM_TALK1, "That's okay, it blew back on an icy wind... It's almost like it wants to stay here! Here, take it back, you've earned it.")
|
||||
}
|
||||
}
|
||||
|
||||
override fun create(b: DialogueBuilder) {
|
||||
// Dialogue Logic
|
||||
b.onQuestStages(DesertTreasure.questName, 0,1,2,3,4,5,6,7,8)
|
||||
.let{dialogueBeforeQuestCrying(it)}
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 9)
|
||||
.branch { player ->
|
||||
return@branch DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage)
|
||||
}.let { branch ->
|
||||
// Branch on sub-stages.
|
||||
branch.onValue(0)
|
||||
.let{dialogueStillCrying(it)}
|
||||
.end()
|
||||
|
||||
branch.onValue(1)
|
||||
.let{dialogueStoppedCrying(it)}
|
||||
.options().let { optionBuilder ->
|
||||
optionBuilder.option("Yes")
|
||||
.let{dialogueYesToHelp(it)}
|
||||
.endWith { _, player ->
|
||||
if (DesertTreasure.getSubStage(player, DesertTreasure.attributeIceStage) == 1) {
|
||||
DesertTreasure.setSubStage(player, DesertTreasure.attributeIceStage, 2)
|
||||
}
|
||||
}
|
||||
optionBuilder.option("No")
|
||||
.let{dialogueNoToHelp(it)}
|
||||
.end()
|
||||
}
|
||||
|
||||
branch.onValue(2)
|
||||
.let{dialogueHaveYouFreedThem(it)}
|
||||
.end()
|
||||
|
||||
branch.onValue(3)
|
||||
.let{dialogueHaveYouFreedThem(it)}
|
||||
.end()
|
||||
|
||||
branch.onValue(4)
|
||||
.let{dialogueHaveYouFreedThem(it)}
|
||||
.end()
|
||||
|
||||
branch.onValue(100)
|
||||
.branch { player ->
|
||||
return@branch if (!inInventory(player, Items.ICE_DIAMOND_4671)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.let{dialogueLostDiamond(it)}
|
||||
.endWith { _, player ->
|
||||
addItemOrDrop(player, Items.ICE_DIAMOND_4671)
|
||||
}
|
||||
branch.onValue(0)
|
||||
.let{dialogueThankYou(it)}
|
||||
.end()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package content.region.desert.ullek.handlers
|
||||
|
||||
import core.api.*
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.interaction.QueueStrength
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import org.rs09.consts.Scenery
|
||||
|
||||
class UllekListeners : InteractionListener {
|
||||
@@ -23,5 +26,17 @@ class UllekListeners : InteractionListener {
|
||||
player.properties.teleportLocation = Location.create(3419, 2803, 1)
|
||||
return@on true
|
||||
}
|
||||
on(Scenery.REEDS_28474, IntType.SCENERY, "push through") { player, node ->
|
||||
animate(player, 7633)
|
||||
animateScenery(node as core.game.node.scenery.Scenery, 7634)
|
||||
queueScript(player, animationDuration(Animation(7633)), QueueStrength.SOFT) {
|
||||
val newLoc = node.location.transform(Location.getDelta(player.location, node.location))
|
||||
player.walkingQueue.reset()
|
||||
player.walkingQueue.addPath(newLoc.x, newLoc.y)
|
||||
|
||||
return@queueScript stopExecuting(player)
|
||||
}
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
package content.region.kandarin.handlers;
|
||||
|
||||
import core.cache.def.impl.NPCDefinition;
|
||||
import core.game.dialogue.DialoguePlugin;
|
||||
import core.game.interaction.OptionHandler;
|
||||
import core.game.node.Node;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.game.node.entity.player.Player;
|
||||
import core.plugin.Initializable;
|
||||
import core.plugin.Plugin;
|
||||
|
||||
@Initializable
|
||||
public class RasoloNPC extends OptionHandler {
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
new RosaloDialouge().init();
|
||||
NPCDefinition.forId(1972).getHandlers().put("option:talk-to",this);
|
||||
NPCDefinition.forId(1972).getHandlers().put("option:trade",this);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
if(option.equals("trade")){
|
||||
new NPC(1972).openShop(player);
|
||||
} else {
|
||||
player.getDialogueInterpreter().open(1972);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rasolo npc
|
||||
* @author ceik
|
||||
*/
|
||||
|
||||
public class RosaloDialouge extends DialoguePlugin{
|
||||
public RosaloDialouge(){
|
||||
/**
|
||||
*
|
||||
*/
|
||||
}
|
||||
public RosaloDialouge(Player player){super(player);}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new RosaloDialouge(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args){
|
||||
npc("Hello, would you like to see my wares?");
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch(stage){
|
||||
case 0:
|
||||
player.getDialogueInterpreter().sendOptions("Select one", "Yes, please", "No, thanks");
|
||||
stage++;
|
||||
break;
|
||||
case 1:
|
||||
switch(buttonId){
|
||||
case 1:
|
||||
end();
|
||||
new NPC(1972).openShop(player);
|
||||
break;
|
||||
case 2:
|
||||
player("No, thanks");
|
||||
stage++;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public int[] getIds() {return new int[] {1972};}
|
||||
}
|
||||
}
|
||||
+60
@@ -1,5 +1,6 @@
|
||||
package content.region.misthalin.digsite.quest.thedigsite
|
||||
|
||||
import content.region.desert.quest.deserttreasure.DesertTreasure
|
||||
import core.api.*
|
||||
import core.game.dialogue.DialogueBuilder
|
||||
import core.game.dialogue.DialogueBuilderFile
|
||||
@@ -8,6 +9,7 @@ import core.game.dialogue.DialoguePlugin
|
||||
import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
|
||||
|
||||
@Initializable
|
||||
@@ -26,6 +28,64 @@ class ArchaeologicalExpertDialogue (player: Player? = null) : DialoguePlugin(pla
|
||||
class ArchaeologicalExpertDialogueFile : DialogueBuilderFile() {
|
||||
override fun create(b: DialogueBuilder) {
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 4,5,6,7,8,9,10,11,12,13,14,15,100)
|
||||
.npc("Hello again.", "Was that translation any use to Asgarnia?")
|
||||
.playerl("I think it was, thanks!")
|
||||
.end()
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 3)
|
||||
.branch { player ->
|
||||
return@branch if (inInventory(player, Items.TRANSLATION_4655)) { 1 } else { 0 }
|
||||
}.let { branch ->
|
||||
branch.onValue(1)
|
||||
.npc("Hello again.", "Was that translation any use to Asgarnia?")
|
||||
.playerl(FacialExpression.SUSPICIOUS, "I, uh, kind of didn't take it to him yet...")
|
||||
.npc(FacialExpression.THINKING, "Whyever not?", "You're the strangest delivery @g[boy,girl] I've ever met!")
|
||||
.end()
|
||||
branch.onValue(0)
|
||||
.playerl("I lost that translation you gave me...")
|
||||
.npcl("Oh, no matter, I mostly remember what it said anyway! Here you go!")
|
||||
.endWith { _, player ->
|
||||
addItemOrDrop(player, Items.TRANSLATION_4655)
|
||||
}
|
||||
}
|
||||
b.onQuestStages(DesertTreasure.questName, 2)
|
||||
.betweenStage { df, player, _, _ ->
|
||||
addItemOrDrop(player, Items.TRANSLATION_4655)
|
||||
}
|
||||
.npcl("There you go, that book contains the sum of my translating ability. If you would be so kind as to take that back to Asgarnia, I think it will reassure him that he is on the")
|
||||
.npcl("right track for a find of great archaeological importance!")
|
||||
.playerl("Wow! You write really quickly don't you?")
|
||||
.npcl("What can I say? It's a skill I picked up through my many years of taking field notes!")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 2) {
|
||||
setQuestStage(player, DesertTreasure.questName, 3)
|
||||
}
|
||||
}
|
||||
|
||||
b.onQuestStages(DesertTreasure.questName, 1)
|
||||
.playerl("Hello, are you Terry Balando?")
|
||||
.npcl("That's right, who wants to know...?")
|
||||
.npcl("Ah yes, I recognise you! You're the fellow who found that strange artefact about Zaros for the museum, aren't you? What can I do for you now?")
|
||||
.playerl("That's right. I was in the desert down by the Bedabin Camp, and I found an archaeologist who asked me to deliver this to you.")
|
||||
.npcl("You spoke to the legendary Asgarnia Smith??? Quickly, let me see what he had to give you! He is always at the forefront of archaeological breakthroughs!")
|
||||
.betweenStage { df, player, _, _ ->
|
||||
removeItem(player, Items.ETCHINGS_4654) // remove if exists
|
||||
}
|
||||
.playerl("So what does the inscription say? Anything interesting?")
|
||||
.npcl("This... this is fascinating! These cuneiforms seem to predate even the settlement we are excavating here... Yes, yes, this is most interesting indeed!")
|
||||
.playerl("Can you translate it for me?")
|
||||
.npc("Well, I am not familiar with this particular language, but", "the similarities inherent in the pictographs seem to show", "a prevalent trend towards a syllabary consistent with", "the phonemes we have discovered in this excavation!")
|
||||
.playerl("Um... So, can you translate it for me or not?")
|
||||
.npcl("Well, unfortunately this is the only example of this particular language I have ever seen, but I might be able to make a rough translation, of sorts...")
|
||||
.npcl("It might be slightly obscure on the finer details, but it should be good enough to understand the rough meaning of what was originally written. Please, just wait a moment, I will write up what I can")
|
||||
.npcl("translate into a journal for you. Then you can take it back to Asgarnia, I think he will be extremely interested in the translation!")
|
||||
.endWith { _, player ->
|
||||
if(getQuestStage(player, DesertTreasure.questName) == 1) {
|
||||
setQuestStage(player, DesertTreasure.questName, 2)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback dialogue.
|
||||
b.onPredicate { player -> true }
|
||||
.playerl(FacialExpression.FRIENDLY, "Hello. Who are you?")
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
package content.region.morytania.canifis.dialogue;
|
||||
|
||||
import core.game.dialogue.DialoguePlugin;
|
||||
import core.game.dialogue.FacialExpression;
|
||||
import core.game.node.entity.npc.NPC;
|
||||
import core.plugin.Initializable;
|
||||
import core.game.node.entity.player.Player;
|
||||
|
||||
/**
|
||||
* Represents the dialogue used for malak.
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
@Initializable
|
||||
public class MalakDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code MalakDialogue} {@code Object}.
|
||||
*/
|
||||
public MalakDialogue() {
|
||||
/**
|
||||
* empty.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code MalakDialogue} {@code Object}.
|
||||
* @param player the player.
|
||||
*/
|
||||
public MalakDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new MalakDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Away from me, dog.", "I have business to discuss with the barkeeper.");
|
||||
stage = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
end();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { 1920 };
|
||||
}
|
||||
}
|
||||
@@ -57,6 +57,15 @@ abstract class Cutscene(val player: Player) {
|
||||
base = region.baseLocation
|
||||
}
|
||||
|
||||
/**
|
||||
* Immediately closes the player's overlay.
|
||||
*/
|
||||
fun closeOverlay()
|
||||
{
|
||||
logCutscene("Close ${player.username}'s overlay.")
|
||||
player.interfaceManager.closeOverlay()
|
||||
}
|
||||
|
||||
/**
|
||||
* Fade the player's view to black. This process can be safely assumed to take about 8 ticks to complete.
|
||||
*/
|
||||
|
||||
@@ -37,6 +37,9 @@ public enum SpecialLadders implements LadderAchievementCheck {
|
||||
ALKHARID_CRAFTING_DOWN(Location.create(3314,3187,1),Location.create(3310,3187,0)),
|
||||
ALKHARID_SOCRCERESS_UP(Location.create(3325,3142,0),Location.create(3325,3139,1)),
|
||||
ALKHARID_SOCRCERESS_DOWN(Location.create(3325,3139,1),Location.create(3325,3143,0)),
|
||||
KHARIDIAN_DESERT_SUMMONING_UP(Location.create(3299,9318,0),Location.create(3303,2897,0)),
|
||||
KHARIDIAN_DESERT_SUMMONING_DOWN(Location.create(3304,2897,0),Location.create(3299,9317,0)),
|
||||
SHADOW_DUNGEON_UP(new Location(2629, 5072,0), new Location(2548, 3421,0)),
|
||||
|
||||
CLOCKTOWER_HIDDEN_LADDER(Location.create(2572,9631,0),Location.create(2572,3230,0)),
|
||||
|
||||
|
||||
@@ -27,6 +27,25 @@ class AnimationCommandSet : CommandSet(Privilege.ADMIN) {
|
||||
player.animate(animation)
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the player to play animation <Animation ID>
|
||||
*/
|
||||
define("anims", Privilege.ADMIN, "::anim <lt>Animation ID<gt>", "Plays the animation with the given ID."){ player, args ->
|
||||
if (args.size < 3) {
|
||||
reject(player, "Syntax error: ::anim <Animation ID>")
|
||||
}
|
||||
val animation = args[1].toInt()
|
||||
val animationTo = args[2].toInt()
|
||||
GameWorld.Pulser.submit(object : Pulse(3, player) {
|
||||
var someId = animation
|
||||
override fun pulse(): Boolean {
|
||||
player.animate(Animation.create(someId))
|
||||
someId += 1
|
||||
return someId >= animationTo
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Force the player to loop animation <Animation ID>
|
||||
*/
|
||||
|
||||
@@ -411,6 +411,20 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){
|
||||
setVarbit(player, index!!, value!!)
|
||||
}
|
||||
|
||||
define("setvarbits", Privilege.ADMIN, "::setvarbits <lt>FROM VARBIT ID<gt> <lt>TO VARBIT ID<gt> <lt>VALUE<gt>", ""){
|
||||
player,args ->
|
||||
if(args.size != 4){
|
||||
reject(player,"Usage: ::setvarbits fromvarbit tovarbit value")
|
||||
}
|
||||
val fromIndex = args[1].toIntOrNull()!!
|
||||
val toIndex = args[2].toIntOrNull()!!
|
||||
val value = args[3].toIntOrNull()!!
|
||||
|
||||
for (index in fromIndex..toIndex) {
|
||||
setVarbit(player, index, value)
|
||||
}
|
||||
}
|
||||
|
||||
define("getvarbit", Privilege.ADMIN, "::getvarbit <lt>VARBIT ID<gt>", "") {
|
||||
player, args ->
|
||||
if (args.size != 2)
|
||||
|
||||
@@ -139,6 +139,30 @@ class TeleportCommandSet : CommandSet(Privilege.ADMIN){
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a list of objects/sceneries in a region
|
||||
*/
|
||||
define("findobjs", Privilege.ADMIN, "::findobjs <lt>REGION ID<gt> <lt>SCENERY ID<gt>", "Finds all locations of scenery objects of id."){player, args ->
|
||||
if(args.size < 4) reject(player, "Usage: region_id scenery_id")
|
||||
val regionId = args[1].toInt()
|
||||
val sceneryId = args[2].toInt()
|
||||
val sceneryIdEnd = args[3].toInt()
|
||||
|
||||
val region = RegionManager.forId(regionId)
|
||||
|
||||
GlobalScope.launch {
|
||||
for (plane in region.planes) {
|
||||
for (objects in plane.objects.filterNotNull()) {
|
||||
for (parent in objects.filterNotNull()) {
|
||||
if (parent.id in sceneryId..sceneryIdEnd) {
|
||||
println(parent.location)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Teleport to a specific player
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user