Implemented more Keldagrim

Gave Ordan a full dialogue revamp for dialogue and un-noting
Gave Blast Furnace Foreman a full dialogue including a tutorial for the blast furnace
Fixed the boating routes
Added the train tunnel (but not the train)
Relocated and implemented NPCs in Keldagrim
This commit is contained in:
Oven Bread 2023-09-11 07:44:09 +00:00 committed by Ryan
parent 4520a05636
commit 0028be9cda
No known key found for this signature in database
28 changed files with 1809 additions and 357 deletions

View file

@ -19544,6 +19544,22 @@
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{
"examine": "He seems to be in charge of the ship on the river.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Dwarven Boatman",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "1846",
"range_level": "1",
"attack_level": "1"
},
{ {
"examine": "It is the avatar of the Arzinian Being of Bordanzan", "examine": "It is the avatar of the Arzinian Being of Bordanzan",
"melee_animation": "1840", "melee_animation": "1840",
@ -22391,15 +22407,23 @@
"attack_level": "34" "attack_level": "34"
}, },
{ {
"examine": "A member of the Black Guard",
"slayer_task": "29",
"melee_animation": "99",
"range_animation": "0",
"defence_animation": "0",
"weakness": "6",
"slayer_exp": "16", "slayer_exp": "16",
"magic_animation": "0",
"death_animation": "102",
"name": "Black Guard", "name": "Black Guard",
"defence_level": "1", "defence_level": "34",
"safespot": null, "safespot": null,
"lifepoints": "10", "lifepoints": "48",
"strength_level": "1", "strength_level": "34",
"id": "2133", "id": "2133",
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "34"
}, },
{ {
"examine": "An elite member of the Black Guard.", "examine": "An elite member of the Black Guard.",
@ -22462,7 +22486,7 @@
"examine": "A gnome traveller, visiting Keldagrim.", "examine": "A gnome traveller, visiting Keldagrim.",
"name": "Gnome traveller", "name": "Gnome traveller",
"defence_level": "1", "defence_level": "1",
"force_talk": "Buying low-level skilling items!", "force_talk": "",
"safespot": null, "safespot": null,
"lifepoints": "10", "lifepoints": "10",
"strength_level": "1", "strength_level": "1",
@ -22470,6 +22494,18 @@
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{
"examine": "A gnome traveller, visiting Keldagrim.",
"name": "Gnome traveller",
"defence_level": "1",
"force_talk": "",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2139",
"range_level": "1",
"attack_level": "1"
},
{ {
"examine": "Very protective of his master... and his property.", "examine": "Very protective of his master... and his property.",
"melee_animation": "0", "melee_animation": "0",
@ -22502,6 +22538,38 @@
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{
"examine": "Proprietor of Gunslik's Assorted Items.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Gunslik",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2154",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "An old mining dwarf, now he sells pickaxes and generally acts grumpy.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Tati",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2160",
"range_level": "1",
"attack_level": "1"
},
{ {
"examine": "A rather personable banker lady.", "examine": "A rather personable banker lady.",
"melee_animation": "0", "melee_animation": "0",
@ -22807,7 +22875,7 @@
"attack_level": "1" "attack_level": "1"
}, },
{ {
"examine": "A loud", "examine": "A loud, drunk and generally obnoxious dwarf.",
"melee_animation": "0", "melee_animation": "0",
"range_animation": "0", "range_animation": "0",
"defence_animation": "0", "defence_animation": "0",
@ -22819,12 +22887,155 @@
"lifepoints": "10", "lifepoints": "10",
"strength_level": "1", "strength_level": "1",
"id": "2187", "id": "2187",
"aggressive": "true",
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{ {
"examine": "You cannot see his ship", "examine": "A sad old dwarf living in a sad old home.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Runvastr",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2190",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He seems to always be busy.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Sune",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2191",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "This dwarf doesn't seem to be very well off.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Bentamir",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2192",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "A dwarf minding his own business.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Ulifed",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2193",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "A short, merry guy.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Karl",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2195",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "His kebabs certainly smell delicious.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Kjut",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2198",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He seems to be very well off.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Audmann",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2201",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He's had a fair bit to drink...",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Drunken Dwarf",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2202",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "He's had a fair bit to drink...",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Drunken Dwarf",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2203",
"range_level": "1",
"attack_level": "1"
},
{
"examine": "You cannot see his ship, but presumably he has one.",
"melee_animation": "0", "melee_animation": "0",
"range_animation": "0", "range_animation": "0",
"defence_animation": "0", "defence_animation": "0",
@ -22839,6 +23050,22 @@
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{
"examine": "You cannot see his ship, but presumably he has one.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Dwarven Boatman",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2206",
"range_level": "1",
"attack_level": "1"
},
{ {
"examine": "He carries a heavy load.", "examine": "He carries a heavy load.",
"melee_animation": "0", "melee_animation": "0",
@ -22855,6 +23082,22 @@
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{
"examine": "An elite member of the Black Guard.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Black Guard Berserker",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2232",
"range_level": "1",
"attack_level": "1"
},
{ {
"examine": "A master at farming.", "examine": "A master at farming.",
"melee_animation": "0", "melee_animation": "0",
@ -23693,6 +23936,22 @@
"range_level": "1", "range_level": "1",
"attack_level": "1" "attack_level": "1"
}, },
{
"examine": "An expert on the brewing of ales and cider.",
"melee_animation": "0",
"range_animation": "0",
"defence_animation": "0",
"magic_animation": "0",
"death_animation": "0",
"name": "Blandebir",
"defence_level": "1",
"safespot": null,
"lifepoints": "10",
"strength_level": "1",
"id": "2321",
"range_level": "1",
"attack_level": "1"
},
{ {
"examine": "Only the Grim Reaper would have a pet like this.", "examine": "Only the Grim Reaper would have a pet like this.",
"melee_animation": "0", "melee_animation": "0",
@ -50139,6 +50398,7 @@
}, },
{ {
"slayer_exp": "16", "slayer_exp": "16",
"examine": "A dwarf from Keldagrim.",
"name": "Dwarf", "name": "Dwarf",
"defence_level": "1", "defence_level": "1",
"safespot": null, "safespot": null,
@ -50150,6 +50410,7 @@
}, },
{ {
"slayer_exp": "16", "slayer_exp": "16",
"examine": "A dwarf from Keldagrim.",
"name": "Dwarf", "name": "Dwarf",
"defence_level": "1", "defence_level": "1",
"safespot": null, "safespot": null,
@ -50161,6 +50422,7 @@
}, },
{ {
"slayer_exp": "16", "slayer_exp": "16",
"examine": "A dwarf from Keldagrim.",
"name": "Dwarf", "name": "Dwarf",
"defence_level": "1", "defence_level": "1",
"safespot": null, "safespot": null,

View file

@ -4071,6 +4071,18 @@
"npc_id": "1841", "npc_id": "1841",
"loc_data": "{3020,3452,0,0,0}" "loc_data": "{3020,3452,0,0,0}"
}, },
{
"npc_id": "1843",
"loc_data": "{2839,10128,0,1,0}"
},
{
"npc_id": "1844",
"loc_data": "{2855,10144,0,1,0}"
},
{
"npc_id": "1846",
"loc_data": "{2873,10166,0,1,3}"
},
{ {
"npc_id": "1860", "npc_id": "1860",
"loc_data": "{2957,3203,0,1,3}" "loc_data": "{2957,3203,0,1,3}"
@ -4371,10 +4383,134 @@
"npc_id": "2082", "npc_id": "2082",
"loc_data": "{3210,3220,1,1,6}" "loc_data": "{3210,3220,1,1,6}"
}, },
{
"npc_id": "2130",
"loc_data": "{2889,10207,0,1,0}"
},
{
"npc_id": "2131",
"loc_data": "{2822,10212,0,1,0}-{2891,10192,0,1,0}"
},
{
"npc_id": "2132",
"loc_data": "{2828,10210,0,1,0}-{2891,10199,0,1,0}"
},
{
"npc_id": "2133",
"loc_data": "{2847,10190,0,1,0}"
},
{
"npc_id": "2134",
"loc_data": "{2823,10220,0,1,0}"
},
{
"npc_id": "2135",
"loc_data": "{2825,10209,0,1,0}"
},
{
"npc_id": "2136",
"loc_data": "{2827,10212,1,1,0}"
},
{
"npc_id": "2138",
"loc_data": "{2836,10192,1,1,0}"
},
{
"npc_id": "2139",
"loc_data": "{2835,10193,1,0,1}"
},
{
"npc_id": "2154",
"loc_data": "{2869,10190,0,1,0}"
},
{
"npc_id": "2156",
"loc_data": "{2892,10212,0,1,0}"
},
{
"npc_id": "2157",
"loc_data": "{2887,10212,0,1,0}"
},
{
"npc_id": "2158",
"loc_data": "{2885,10207,0,1,0}"
},
{
"npc_id": "2159",
"loc_data": "{2885,10196,0,1,0}"
},
{
"npc_id": "2160",
"loc_data": "{2925,10210,0,1,0}"
},
{
"npc_id": "2171",
"loc_data": "{2931,10184,0,1,0}"
},
{
"npc_id": "2172",
"loc_data": "{2929,10191,0,1,0}"
},
{
"npc_id": "2173",
"loc_data": "{2931,10191,0,1,0}"
},
{
"npc_id": "2174",
"loc_data": "{2930,10188,0,1,0}"
},
{
"npc_id": "2175",
"loc_data": "{2931,10187,0,1,0}"
},
{
"npc_id": "2178",
"loc_data": "{2916,10195,0,1,0}"
},
{ {
"npc_id": "2180", "npc_id": "2180",
"loc_data": "{2997,9837,0,1,3}" "loc_data": "{2997,9837,0,1,3}"
}, },
{
"npc_id": "2187",
"loc_data": "{2906,10198,0,1,0}"
},
{
"npc_id": "2190",
"loc_data": "{2923,10203,0,1,0}"
},
{
"npc_id": "2191",
"loc_data": "{2924,10213,0,1,0}"
},
{
"npc_id": "2192",
"loc_data": "{2933,10219,0,0,3}"
},
{
"npc_id": "2193",
"loc_data": "{2899,10218,0,1,0}"
},
{
"npc_id": "2195",
"loc_data": "{2900,10227,0,1,0}"
},
{
"npc_id": "2198",
"loc_data": "{2906,10216,0,1,0}"
},
{
"npc_id": "2203",
"loc_data": "{2912,10222,0,1,0}"
},
{
"npc_id": "2205",
"loc_data": "{2842,10129,0,0,3}"
},
{
"npc_id": "2206",
"loc_data": "{2888,10227,0,0,6}"
},
{ {
"npc_id": "2234", "npc_id": "2234",
"loc_data": "{3081,3251,0,1,6}-{2636,3365,0,1,6}" "loc_data": "{3081,3251,0,1,6}-{2636,3365,0,1,6}"
@ -4603,6 +4739,10 @@
"npc_id": "2319", "npc_id": "2319",
"loc_data": "{3017,3309,0,0,0}" "loc_data": "{3017,3309,0,0,0}"
}, },
{
"npc_id": "2321",
"loc_data": "{2915,10194,1,1,0}"
},
{ {
"npc_id": "2323", "npc_id": "2323",
"loc_data": "{3056,3306,0,1,1}" "loc_data": "{3056,3306,0,1,1}"
@ -4783,26 +4923,6 @@
"npc_id": "2457", "npc_id": "2457",
"loc_data": "{2500,10148,0,1,3}-{2505,10150,0,1,2}-{2510,10148,0,1,1}-{2511,10147,0,1,6}-{2517,10151,0,1,3}-{2519,10143,0,1,7}-{2529,10148,0,1,3}-{2528,10144,0,1,0}-{2532,10145,0,1,1}-{2532,10140,0,1,7}-{2520,10144,0,1,2}-{1804,4369,2,1,2}-{1812,4363,2,1,5}-{1817,4368,2,1,6}-{1801,4404,3,1,6}-{1805,4405,3,1,1}-{1803,4404,3,1,7}-{1811,4394,1,1,7}-{1804,4391,1,1,2}-{1798,4391,1,1,4}-{1802,4389,1,1,4}-{1799,4386,2,1,1}-{1799,4381,2,1,6}-{1798,4375,1,1,4}-{1803,4376,1,1,6}-{1797,4380,1,1,6}-{1902,4367,0,1,6}-{1894,4367,0,1,1}-{1893,4361,0,1,3}-{1886,4369,0,1,1}-{1848,4394,1,1,3}-{1850,4389,1,1,1}-{1850,4391,1,1,2}" "loc_data": "{2500,10148,0,1,3}-{2505,10150,0,1,2}-{2510,10148,0,1,1}-{2511,10147,0,1,6}-{2517,10151,0,1,3}-{2519,10143,0,1,7}-{2529,10148,0,1,3}-{2528,10144,0,1,0}-{2532,10145,0,1,1}-{2532,10140,0,1,7}-{2520,10144,0,1,2}-{1804,4369,2,1,2}-{1812,4363,2,1,5}-{1817,4368,2,1,6}-{1801,4404,3,1,6}-{1805,4405,3,1,1}-{1803,4404,3,1,7}-{1811,4394,1,1,7}-{1804,4391,1,1,2}-{1798,4391,1,1,4}-{1802,4389,1,1,4}-{1799,4386,2,1,1}-{1799,4381,2,1,6}-{1798,4375,1,1,4}-{1803,4376,1,1,6}-{1797,4380,1,1,6}-{1902,4367,0,1,6}-{1894,4367,0,1,1}-{1893,4361,0,1,3}-{1886,4369,0,1,1}-{1848,4394,1,1,3}-{1850,4389,1,1,1}-{1850,4391,1,1,2}"
}, },
{
"npc_id": "2424",
"loc_data": "{2871,10187,0,1,0}"
},
{
"npc_id": "1843",
"loc_data": "{2841,10129,0,1,0}"
},
{
"npc_id": "1844",
"loc_data": "{2840,10127,0,1,0}"
},
{
"npc_id": "2205",
"loc_data": "{2839,10128,0,1,0}"
},
{
"npc_id": "2154",
"loc_data": "{2839,10128,0,1,0}"
},
{ {
"npc_id": "2458", "npc_id": "2458",
"loc_data": "{2599,4774,0,0,3}" "loc_data": "{2599,4774,0,0,3}"
@ -4919,6 +5039,10 @@
"npc_id": "2549", "npc_id": "2549",
"loc_data": "{3364,3001,0,0,6}" "loc_data": "{3364,3001,0,0,6}"
}, },
{
"npc_id": "2553",
"loc_data": "{1944,4958,0,1,0}"
},
{ {
"npc_id": "2564", "npc_id": "2564",
"loc_data": "{1936,4966,0,0,4}" "loc_data": "{1936,4966,0,0,4}"
@ -8599,6 +8723,30 @@
"npc_id": "5869", "npc_id": "5869",
"loc_data": "{2744,5344,0,0,0}" "loc_data": "{2744,5344,0,0,0}"
}, },
{
"npc_id": "5880",
"loc_data": "{2439,5544,0,1,0}-{2485,5535,0,1,0}"
},
{
"npc_id": "5881",
"loc_data": "{2436,5540,0,1,0}"
},
{
"npc_id": "5882",
"loc_data": "{2437,5549,0,1,0}-{2484,5531,0,1,0}"
},
{
"npc_id": "5883",
"loc_data": "{2436,5526,0,1,0}-{2486,5525,0,1,0}"
},
{
"npc_id": "5884",
"loc_data": "{2439,5520,0,1,0}"
},
{
"npc_id": "5885",
"loc_data": "{2487,5538,0,1,0}"
},
{ {
"npc_id": "5887", "npc_id": "5887",
"loc_data": "{2737,5351,1,0,0}" "loc_data": "{2737,5351,1,0,0}"
@ -10523,14 +10671,6 @@
"npc_id": "1184", "npc_id": "1184",
"loc_data": "{2192,3249,0,1,3}-{2200,3249,0,1,3}-{2195,3247,0,1,3}-{2212,3258,0,1,3}" "loc_data": "{2192,3249,0,1,3}-{2200,3249,0,1,3}-{2195,3247,0,1,3}-{2212,3258,0,1,3}"
}, },
{
"npc_id": "2160",
"loc_data": "{2925,10211,0,1,0}"
},
{
"npc_id": "2191",
"loc_data": "{2925,10213,0,1,0}"
},
{ {
"npc_id": "4248", "npc_id": "4248",
"loc_data": "{2849,10183,0,1,0}" "loc_data": "{2849,10183,0,1,0}"
@ -10559,30 +10699,6 @@
"npc_id": "4558", "npc_id": "4558",
"loc_data": "{2885,10202,0,1,0}" "loc_data": "{2885,10202,0,1,0}"
}, },
{
"npc_id": "2158",
"loc_data": "{2885,10207,0,1,0}"
},
{
"npc_id": "2157",
"loc_data": "{2887,10212,0,1,0}"
},
{
"npc_id": "2156",
"loc_data": "{2892,10212,0,1,0}"
},
{
"npc_id": "2159",
"loc_data": "{2885,10196,0,1,0}"
},
{
"npc_id": "2321",
"loc_data": "{2918,10194,0,0,3}"
},
{
"npc_id": "2198",
"loc_data": "{2905,10213,0,1,0}"
},
{ {
"npc_id": "2164", "npc_id": "2164",
"loc_data": "{2838,10205,0,0,1}" "loc_data": "{2838,10205,0,0,1}"
@ -10591,42 +10707,6 @@
"npc_id": "2163", "npc_id": "2163",
"loc_data": "{2836,10205,0,1,0}" "loc_data": "{2836,10205,0,1,0}"
}, },
{
"npc_id": "2130",
"loc_data": "{2892,10191,0,1,0}-{2919,10206,0,1,0}-{2923,10230,0,1,0}-{2865,10193,0,1,0}"
},
{
"npc_id": "2131",
"loc_data": "{2893,10205,0,1,0}-{2895,10223,0,1,0}-{2871,10199,0,1,0}-{2890,10199,0,1,0}"
},
{
"npc_id": "2132",
"loc_data": "{2913,10211,0,1,0}-{2901,10232,0,1,0}-{2823,10193,0,1,0}"
},
{
"npc_id": "5880",
"loc_data": "{2888,10226,0,1,0}-{2920,10196,0,1,0}-{2844,10214,0,1,0}"
},
{
"npc_id": "5881",
"loc_data": "{2847,10200,0,1,0}-{2863,10233,0,1,0}-{2920,10216,0,1,0}"
},
{
"npc_id": "5882",
"loc_data": "{2916,10191,0,1,0}-{2841,10195,0,1,0}-{2831,10219,0,1,0}"
},
{
"npc_id": "2138",
"loc_data": "{2890,10232,0,1,0}"
},
{
"npc_id": "2178",
"loc_data": "{2916,10192,0,1,0}-{2839,10196,0,1,0}"
},
{
"npc_id": "2187",
"loc_data": "{2913,10200,0,1,0}"
},
{ {
"npc_id": "1546", "npc_id": "1546",
"loc_data": "{2911,10175,0,0,4}-{2912,10175,0,0,4}-{2913,10175,0,0,4}-{2914,10175,0,0,4}-{2909,10173,0,0,4}-{2910,10173,0,0,4}-{2911,10173,0,0,4}-{2912,10173,0,0,4}-{2913,10173,0,0,4}-{2909,10171,0,0,4}-{2910,10171,0,0,4}-{2911,10169,0,0,4}-{2912,10169,0,0,4}-{2913,10169,0,0,4}" "loc_data": "{2911,10175,0,0,4}-{2912,10175,0,0,4}-{2913,10175,0,0,4}-{2914,10175,0,0,4}-{2909,10173,0,0,4}-{2910,10173,0,0,4}-{2911,10173,0,0,4}-{2912,10173,0,0,4}-{2913,10173,0,0,4}-{2909,10171,0,0,4}-{2910,10171,0,0,4}-{2911,10169,0,0,4}-{2912,10169,0,0,4}-{2913,10169,0,0,4}"
@ -10723,10 +10803,6 @@
"npc_id": "2121", "npc_id": "2121",
"loc_data": "{2880,10195,1,1,0}-{2879,10193,1,1,0}" "loc_data": "{2880,10195,1,1,0}-{2879,10193,1,1,0}"
}, },
{
"npc_id": "2193",
"loc_data": "{2887,10223,0,1,0}"
},
{ {
"npc_id": "2197", "npc_id": "2197",
"loc_data": "{2848,10198,0,1,0}" "loc_data": "{2848,10198,0,1,0}"
@ -10739,10 +10815,6 @@
"npc_id": "2189", "npc_id": "2189",
"loc_data": "{2851,10223,0,1,0}" "loc_data": "{2851,10223,0,1,0}"
}, },
{
"npc_id": "2171",
"loc_data": "{2930,10184,0,1,0}"
},
{ {
"npc_id": "1848", "npc_id": "1848",
"loc_data": "{2868,10168,0,1,0}" "loc_data": "{2868,10168,0,1,0}"
@ -10795,22 +10867,10 @@
"npc_id": "2199", "npc_id": "2199",
"loc_data": "{2855,10199,0,1,0}" "loc_data": "{2855,10199,0,1,0}"
}, },
{
"npc_id": "2192",
"loc_data": "{2933,10219,0,1,0}"
},
{ {
"npc_id": "2141", "npc_id": "2141",
"loc_data": "{2906,10204,0,1,0}" "loc_data": "{2906,10204,0,1,0}"
}, },
{
"npc_id": "2202",
"loc_data": "{2912,10222,0,1,0}"
},
{
"npc_id": "2195",
"loc_data": "{2901,10227,0,1,0}"
},
{ {
"npc_id": "2194", "npc_id": "2194",
"loc_data": "{2926,10225,0,1,0}" "loc_data": "{2926,10225,0,1,0}"
@ -10819,10 +10879,6 @@
"npc_id": "2142", "npc_id": "2142",
"loc_data": "{2904,10206,0,1,0}" "loc_data": "{2904,10206,0,1,0}"
}, },
{
"npc_id": "2190",
"loc_data": "{2922,10201,0,1,0}"
},
{ {
"npc_id": "2155", "npc_id": "2155",
"loc_data": "{2871,10199,0,1,0}" "loc_data": "{2871,10199,0,1,0}"

View file

@ -1112,7 +1112,7 @@
"currency": "995", "currency": "995",
"general_store": "false", "general_store": "false",
"id": "126", "id": "126",
"title": "Pickaxe-is-mine", "title": "Pickaxe-Is-Mine",
"stock": "{1265,10,100}-{1269,10,100}-{1273,10,100}-{1271,10,100}-{1275,10,100}" "stock": "{1265,10,100}-{1269,10,100}-{1273,10,100}-{1271,10,100}-{1275,10,100}"
}, },
{ {

View file

@ -1,58 +1,38 @@
package content.region.misc.keldagrim.dialogue package content.region.misc.keldagrim.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC import core.game.dialogue.Topic
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE
/** import org.rs09.consts.NPCs
* @author qmqz
*/
@Initializable @Initializable
class AgmundiDialogue(player: Player? = null) : DialoguePlugin(player){ class AgmundiDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
npc(FacialExpression.CHILD_NORMAL,"Oh no, not another human... what do you want then?")
stage = 0
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){ when(stage){
0 -> player(FacialExpression.ASKING, "Oh, do you get humans here often?").also { stage++ } 0 -> npc(FacialExpression.OLD_NOT_INTERESTED,"Oh no, not another human... what do you want then?").also { stage++ }
1 -> npc(FacialExpression.OLD_NORMAL, "Not that often, no, but sometimes.").also { stage++ } 1 -> player(FacialExpression.ASKING, "Oh, do you get humans here often?").also { stage++ }
2 -> npc(FacialExpression.OLD_NORMAL, "Of course, since you people are too big for dwarven", 2 -> npc(FacialExpression.OLD_NORMAL, "Not that often, no, but sometimes.").also { stage++ }
"clothes, they typically don't stay very long.").also { stage++ } 3 -> npc(FacialExpression.OLD_NORMAL, "Of course, since you people are too big for dwarven", "clothes, they typically don't stay very long.").also { stage++ }
3 -> player(FacialExpression.SUSPICIOUS, "Why don't you make bigger clothes then?").also { stage++ } 4 -> player(FacialExpression.SUSPICIOUS, "Why don't you make bigger clothes then?").also { stage++ }
4 -> npc(FacialExpression.OLD_NOT_INTERESTED, "What'd be the point? Besides, I don't make", "these clothes myself.").also { stage++ } 5 -> npc(FacialExpression.OLD_NOT_INTERESTED, "What'd be the point? Besides, I don't make", "these clothes myself.").also { stage++ }
6 -> showTopics(
5 -> options ("Who makes these clothes then?", "I still want to buy your clothes.", "So do you have any quests for me?").also { stage++ } Topic(FacialExpression.FRIENDLY, "Who makes these clothes then?", 10),
6 -> when(buttonId){ Topic(FacialExpression.FRIENDLY, "I still want to buy your clothes.", 8, true),
1 -> player(FacialExpression.GUILTY, "Who makes the clothes then?").also { stage = 10 } Topic(FacialExpression.FRIENDLY, "So do you have any quests for me?", 20),
2 -> npc.openShop(player) )
3 -> npc(FacialExpression.OLD_NOT_INTERESTED,"Quests? Why would I have any quests?").also { stage = 20 } 8 -> openNpcShop(player, NPCs.AGMUNDI_2161).also { stage = END_DIALOGUE }
10 -> npc(FacialExpression.OLD_DEFAULT,"Oh, my sister, she lives in Keldagrim-East.", "Has a little stall on the other side of", "the Kelda.").also { stage++ }
} 11 -> npc(FacialExpression.OLD_DEFAULT,"If she only worked a little harder, like me,", "she wouldn't have to live in the sewers of the city.", "Shame really.").also { stage++ }
12 -> player(FacialExpression.FRIENDLY, "The sewers? Your sister lives in the sewers?").also { stage++ }
10 -> npc(FacialExpression.OLD_DEFAULT,"Oh, my sister, she lives in Keldagrim-East.", 13 -> npc(FacialExpression.OLD_SAD,"Keldagrim-East, such a ghastly place.", "Not civil, polite and clean like we are in the West.").also { stage++ }
"Has a little stall on the other side of", 14 -> player(FacialExpression.SUSPICIOUS, "Uh-huh.").also { stage = END_DIALOGUE }
"the Kelda.").also { stage++ } 20 -> npc(FacialExpression.OLD_NOT_INTERESTED,"Quests? Why would I have any quests?").also { stage++ }
11 -> npc(FacialExpression.OLD_DEFAULT,"If she only worked a little harder, like me,", 21 -> player(FacialExpression.FRIENDLY, "Oh, just anything to do would be fine.").also { stage++ }
"she wouldn't have to live in the sewers of the city.", 22 -> npc(FacialExpression.OLD_NOT_INTERESTED,"No, not right now... maybe I'll have something", "for you to do later, but nothing at the moment.").also { stage = END_DIALOGUE }
"Shame really.").also { stage++ }
12 -> player("The sewers? Your sister lives in the sewers?").also { stage++ }
13 -> npc(FacialExpression.OLD_SAD,"Keldagrim-East, such a ghastly place.",
"Not civil, polite and clean like we are in the West.").also { stage++ }
14 -> player(FacialExpression.SUSPICIOUS, "Uh-huh.").also { stage=99 }
20 -> player("Oh, just anything to do would be fine.").also { stage++ }
21 -> npc(FacialExpression.OLD_NOT_INTERESTED,"No, not right now... maybe I'll have something",
"for you to do later, but nothing at the moment.").also { stage = 99 }
99 -> end()
} }
return true return true
} }
@ -62,6 +42,6 @@ class AgmundiDialogue(player: Player? = null) : DialoguePlugin(player){
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
return intArrayOf(2161) return intArrayOf(NPCs.AGMUNDI_2161)
} }
} }

View file

@ -0,0 +1,81 @@
package content.region.misc.keldagrim.dialogue
import core.api.*
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs
@Initializable
class BarmaidDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// TODO: Forgettable Tale Dialogue
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DEFAULT, "Welcome to the Laughing Miner pub, human traveller.").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Who is that man walking around outside?", 2),
Topic(FacialExpression.FRIENDLY, "I'd like a beer please.", 12),
Topic(FacialExpression.FRIENDLY, "I'd like some food please.", 16),
)
2 -> npcl(FacialExpression.OLD_DEFAULT, "What man?").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "I mean the dwarf, the one with the sign.").also { stage++ }
4 -> npcl(FacialExpression.OLD_DEFAULT, "Oh, him. Yes, we employ him to advertise our pub, he's the cheapest labour we could find. We don't have a lot of money to spare you know, we pay him in beer.").also { stage++ }
5 -> playerl(FacialExpression.FRIENDLY, "But what's wrong with him?").also { stage++ }
6 -> npcl(FacialExpression.OLD_DEFAULT, "Well, he's drunk isn't he?").also { stage++ }
7 -> npcl(FacialExpression.OLD_DEFAULT, "I told you, he's cheap. He couldn't get any other work since the Red Axe fired him. Been drinking ever since.").also { stage++ }
8 -> playerl(FacialExpression.FRIENDLY, "How did that happen?").also { stage++ }
9 -> npcl(FacialExpression.OLD_DEFAULT, "I'm not quite sure, I think he kept wearing the wrong coloured cap all the time. They don't much like it if you don't wear your red uniform into work.").also { stage++ }
10 -> playerl(FacialExpression.FRIENDLY, "They fired him for that??").also { stage++ }
11 -> npcl(FacialExpression.OLD_DEFAULT, "The Red Axe will fire you for just about anything if they want to.").also {
stage = END_DIALOGUE
}
12 -> npcl(FacialExpression.OLD_DEFAULT, "That'll be 2 gold coins.").also { stage++ }
13 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Pay.", 14, true),
Topic(FacialExpression.FRIENDLY, "Don't pay.", 15,true),
)
14 -> {
if (!inInventory(player, Items.COINS_995, 2)) {
playerl(FacialExpression.FRIENDLY, "Sorry, I don't have 2 coins on me.").also { stage = END_DIALOGUE }
} else {
if (removeItem(player, Item(Items.COINS_995, 2))) {
addItemOrDrop(player, Items.BEER_1917)
npcl(FacialExpression.OLD_DEFAULT, "Thanks for your custom.").also { stage = END_DIALOGUE }
}
}
}
15 -> playerl(FacialExpression.FRIENDLY, "Sorry, I changed my mind.").also { stage = END_DIALOGUE }
16 -> npcl(FacialExpression.OLD_DEFAULT, "I can make you a stew for 20 gold coins.").also { stage++ }
17 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Pay.", 18, true),
Topic(FacialExpression.FRIENDLY, "Don't pay.", 19,true),
)
18 -> {
if (!inInventory(player, Items.COINS_995, 20)) {
playerl(FacialExpression.FRIENDLY, "Sorry, I don't have 20 coins on me.").also { stage = END_DIALOGUE }
} else {
if (removeItem(player, Item(Items.COINS_995, 20))) {
addItemOrDrop(player, Items.STEW_2003)
npcl(FacialExpression.OLD_DEFAULT, "Thanks for your custom.").also { stage = END_DIALOGUE }
}
}
}
19 -> playerl(FacialExpression.FRIENDLY, "Sorry, I changed my mind.").also { stage = END_DIALOGUE }
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return BarmaidDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BARMAID_2178)
}
}

View file

@ -0,0 +1,36 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class BentamirDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_ANGRY1, "Do you mind? You're in my home.").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "I'm sorry, should I have knocked?").also { stage++ }
2 -> npcl(FacialExpression.OLD_ANGRY1, "Very funny, human.").also { stage++ }
3 -> npcl(FacialExpression.OLD_ANGRY1, "We can't all live in plush houses, you know. But that doesn't mean us mining dwarves don't work hard.").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Where do you do your mining?").also { stage++ }
5 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "Normally the coal mine to the north. We need a lot of coal to keep our steam engines going, you know.").also { stage++ }
6 -> playerl(FacialExpression.FRIENDLY, "Can I do a bit of mining there as well?").also { stage++ }
7 -> npcl(FacialExpression.OLD_NOT_INTERESTED, "I'm not sure, but as long as no one notices I don't think anyone is going to care.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return BentamirDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BENTAMIR_2192)
}
}

View file

@ -1,27 +1,28 @@
package content.region.misc.keldagrim.dialogue package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.node.entity.npc.NPC import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
/**
* @author qmqz
*/
@Initializable @Initializable
class BlackGuardDialogue(player: Player? = null) : DialoguePlugin(player){ class BlackGuardDialogue(player: Player? = null) : DialoguePlugin(player){
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
sendDialogue("The guard ignores you.").also { stage = 99 }
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){ when(stage){
99 -> end() START_DIALOGUE -> {
var random = arrayOf(1, 2, 3, 4, 5).random()
when (random) {
1 -> npcl(FacialExpression.OLD_ANGRY3, "Obey the law!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.OLD_ANGRY3, "Stay out of trouble!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.OLD_ANGRY3, "Out of the way, human!").also { stage = END_DIALOGUE }
4 -> npcl(FacialExpression.OLD_ANGRY3, "I'm keeping an eye on you!").also { stage = END_DIALOGUE }
5 -> end().also{ sendDialogue("The guard ignores you.").also { stage = END_DIALOGUE } }
}
}
} }
return true return true
} }
@ -31,6 +32,6 @@ class BlackGuardDialogue(player: Player? = null) : DialoguePlugin(player){
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
return intArrayOf(NPCs.BLACK_GUARD_2130, NPCs.BLACK_GUARD_2131, NPCs.BLACK_GUARD_2132, NPCs.BLACK_GUARD_2133) return intArrayOf(NPCs.BLACK_GUARD_2130, NPCs.BLACK_GUARD_2131, NPCs.BLACK_GUARD_2132, NPCs.BLACK_GUARD_2133, NPCs.BLACK_GUARD_BERSERKER_2134, NPCs.BLACK_GUARD_BERSERKER_2135, NPCs.BLACK_GUARD_BERSERKER_2136)
} }
} }

View file

@ -0,0 +1,51 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class BlandebirDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello, I wonder if you could help me on this whole brewing thing...").also { stage++ }
1 -> npcl(FacialExpression.OLD_DEFAULT, "I might be able to - what do you need to know?").also { stage++ }
2 -> showTopics(
Topic(FacialExpression.FRIENDLY, "How do I brew ales?", 3),
Topic(FacialExpression.FRIENDLY, "How do I brew cider?", 6),
Topic(FacialExpression.FRIENDLY, "What do I do once my ale has matured?", 8),
Topic(FacialExpression.FRIENDLY, "Do you have any spare ale yeast?", 9),
Topic(FacialExpression.FRIENDLY, "That's all I need to know, thanks.", END_DIALOGUE),
)
3 -> npcl(FacialExpression.OLD_DEFAULT, "Well first off you need to fill the vat with water - two bucketfuls should do the trick. Then you'll need to put in two handfuls of barley malt - that's roasted barley by the way.").also { stage++ }
4 -> npcl(FacialExpression.OLD_DEFAULT, "After that you'll be putting your main ingredient in - this will decide which ale it is you're brewing. There should be some good guides around with recipes in.").also { stage++ }
5 -> npcl(FacialExpression.OLD_DEFAULT, "Lastly you pour a pot full of ale yeast in, which'll start it off fermenting. Then all you have to do is wait for the good stuff.").also {
stage = 2
}
6 -> npcl(FacialExpression.OLD_DEFAULT, "First you'll need some apples. You'll need to crush them using this cider-press - four apples should make a full bucket of apple-mush. Take four buckets of mush and fill up the vat.").also { stage++ }
7 -> npcl(FacialExpression.OLD_DEFAULT, "After that you pour a pot full of ale yeast in, which'll start it off fermenting. Then all you have to do is wait for the good stuff.").also {
stage = 2
}
8 -> npcl(FacialExpression.OLD_DEFAULT, "Well, once you've got a full vat of the good stuff, just turn the valve and your barrel will fill up with eight pints of whatever your chosen tipple is. Mind it's an empty barrel, though.").also {
stage = 2
}
9 -> npcl(FacialExpression.OLD_DEFAULT, "Well, as a matter of fact I do, although I wouldn't describe it as spare. This ale yeast I've got is the best money can buy, but if you've got a pot I'll fill it for you for 25GP - very cheap as it happens.").also {
stage = 2
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return BlandebirDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BLANDEBIR_2321)
}
}

View file

@ -0,0 +1,180 @@
package content.region.misc.keldagrim.dialogue
import core.api.*
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.game.system.task.Pulse
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.Components
import org.rs09.consts.NPCs
@Initializable
class BlastFurnaceForemanDialogue (player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_ANGRY1, "You! Get to work!").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "What?", 2),
Topic(FacialExpression.FRIENDLY, "Okay.", END_DIALOGUE),
)
2 -> npcl(FacialExpression.OLD_DEFAULT, "You are here to help work the blast furnace, aren't you?").also { stage++ }
3 -> showTopics(
Topic(FacialExpression.FRIENDLY, "What's the blast furnace?", 5),
Topic(FacialExpression.FRIENDLY, "How can I help work the blast furnace?", 10),
Topic(FacialExpression.FRIENDLY, "Can I use the furnace to smelt ore?", 40),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
)
5 -> npcl(FacialExpression.OLD_DEFAULT, "The blast furnace is the pinnacle of dwarven metal- processing! Ore goes in the top and comes out as metal bars almost at once! And it's so efficient it only takes half as much coal to purify it as a regular furnace.").also { stage++ }
6 -> npcl(FacialExpression.OLD_DEFAULT, "But we've got a bit of a labour shortage at the moment, which is why I have to rely on immigrant workers to keep the furnace going. So, are you here to start work?").also { stage++ }
7 -> showTopics(
Topic(FacialExpression.FRIENDLY, "How can I help work the blast furnace?", 10),
Topic(FacialExpression.FRIENDLY, "Can I use the furnace to smelt ore?", 40),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
)
10 -> npcl(FacialExpression.OLD_DEFAULT, "The blast furnace will only work if there is a group of people keeping it going. Let me explain...").also { stage++ }
11 -> {
openInterface(player, Components.BLAST_FURNACE_PLAN_SCROLL_29)
submitIndividualPulse(player, object : Pulse() {
var flash = true
override fun pulse(): Boolean {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 2, flash)
flash = !flash
return false
}
})
npcl(FacialExpression.OLD_DEFAULT, "Firstly, the stove needs to be kept filled with coal. If this runs out the furnace will not work.")
stage++
}
12 -> {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 2, false)
submitIndividualPulse(player, object : Pulse() {
var flash = true
override fun pulse(): Boolean {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 14, flash)
flash = !flash
return false
}
})
npcl(FacialExpression.OLD_DEFAULT, "Secondly, someone needs to operate the pump that keeps the hot air blast circulating through the furnace.")
stage++
}
13 -> {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 14, false)
submitIndividualPulse(player, object : Pulse() {
var flash = true
override fun pulse(): Boolean {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 15, flash)
flash = !flash
return false
}
})
npcl(FacialExpression.OLD_DEFAULT, "Thirdly, someone needs to keep an eye on the temperature gauge. They should tell the pumper to start or stop so that the temperature stays in the right range.")
stage++
}
14 -> {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 15, false)
submitIndividualPulse(player, object : Pulse() {
var flash = true
override fun pulse(): Boolean {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 13, flash)
flash = !flash
return false
}
})
npcl(FacialExpression.OLD_DEFAULT, "Lastly, someone needs to be on the pedals to power the conveyor belt that puts ore into the furnace.")
stage++
}
15 -> npcl(FacialExpression.OLD_DEFAULT, "Someone will also need to be on standby with a hammer in case the machine breaks!").also { stage++ }
16 -> npcl(FacialExpression.OLD_DEFAULT, "While that's going, anyone else can put their ore on the conveyor belt to have it smelted.").also { stage++ }
17 -> {
setComponentVisibility(player, Components.BLAST_FURNACE_PLAN_SCROLL_29, 13, false)
closeInterface(player)
showTopics(
Topic(FacialExpression.FRIENDLY, "So what do I get out of it?", 20),
Topic(FacialExpression.FRIENDLY, "Okay I'll get to work.", 101),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
)
}
20 -> npcl(FacialExpression.OLD_DEFAULT, "Keeping the furnace going is valuable experience in itself!").also { stage++ }
21 -> npcl(FacialExpression.OLD_DEFAULT, "Keeping the stove alight will train your Firemaking, working the pump will train your Strength, pedalling the conveyor belt will train your Agility and repairing the furnace will train Crafting.").also { stage++ }
22 -> npcl(FacialExpression.OLD_DEFAULT, "Plus, everyone working the furnace will get a bit of experience in Smithing whenever anyone smelts ore in it.").also { stage++ }
23 -> showTopics(
Topic(FacialExpression.FRIENDLY, "So I don't actually get paid then?", 25),
Topic(FacialExpression.FRIENDLY, "Okay I'll get to work.", 101),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
)
25 -> npcl(FacialExpression.OLD_ANGRY1, "I offer you the privilege of working on the greatest example of dwarven engineering and you want to be PAID?").also { stage++ }
26 -> npcl(FacialExpression.OLD_ANGRY2, "If you co-operate with a group of people you can all get your smelting done pretty quickly. Or perhaps some humans who need to do some smelting will pay you, since you humans are all so obsessed with money.").also { stage++ }
27 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Okay I'll get to work.", 101),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
Topic(FacialExpression.FRIENDLY, "No wonder you have a labour shortage if you don't pay your workers!", 30, true),
)
30 -> playerl(FacialExpression.FRIENDLY, "No wonder you have a labour shortage if you don't pay your workers!").also { stage++ }
31 -> npcl(FacialExpression.OLD_DEFAULT, "What would be the point of making money if I gave it all away to menial workers?").also { stage++ }
32 -> npcl(FacialExpression.OLD_DEFAULT, "I mean... Money isn't important! What about the greater glory of dwarven engineering? What about the satisfaction of helping others? What about the XP?").also { stage++ }
33 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Okay I'll get to work.", 101),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
)
40 -> npcl(FacialExpression.OLD_DEFAULT, "You can, although you'll need to find some people to work it for you as well. But the furnace is very delicate so I charge a fee for anyone who doesn't have level 60 smithing.").also { stage++ }
41 -> showTopics(
Topic(FacialExpression.FRIENDLY, "I have level 60!", 45),
Topic(FacialExpression.FRIENDLY, "I don't have level 60.", 51),
)
45 -> npcl(FacialExpression.OLD_DEFAULT, "A human has level 60 smithing? How extraordinary!").also { stage++ }
46 -> npcl(FacialExpression.OLD_DEFAULT, "Feel free to use the furnace. Remember, you only need half as much coal as with a regular furnace.").also {
stage = END_DIALOGUE
}
// This is inauthentic. Authentic dialogue below.
51 -> npcl(FacialExpression.OLD_DEFAULT, "Hmm, well, I can't let you use the furnace. You need to have level 60 smithing.").also {
stage = END_DIALOGUE
}
// These are unreachable until Blast Furnace implements <60 Smithing timeshare.
52 -> npcl(FacialExpression.OLD_DEFAULT, "Hmm, well, I'll let you use the furnace if you want, but you must pay a fee of 2,500 coins.").also { stage++ }
53 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Okay.", 55, true),
Topic(FacialExpression.FRIENDLY, "Maybe some other time.", 102),
Topic(FacialExpression.FRIENDLY, "[Charm] How about I give you 1250 coins and I work extra hard?", 70, true), // Ring of Charos(a)
)
55 -> playerl(FacialExpression.FRIENDLY, "Okay, here you are.").also { stage++ }
56 -> npcl(FacialExpression.OLD_DEFAULT, "Okay, you can use the furnace for ten minutes. Remember, you only need half as much coal as with a regular furnace.").also {
stage = END_DIALOGUE
}
70 -> playerl(FacialExpression.FRIENDLY, "How about I give you 1250 coins and I work extra hard?").also { stage++ }
71 -> npcl(FacialExpression.OLD_DEFAULT, "You'll have to work hard enough for two humans if I agree...").also { stage++ }
72 -> playerl(FacialExpression.FRIENDLY, "Oh, three humans, easily!").also { stage++ }
73 -> npcl(FacialExpression.OLD_DEFAULT, "Well, okay then - 1250GP it is.").also { stage++ }
101 -> npcl(FacialExpression.OLD_DEFAULT, "Splendid!").also {
stage = END_DIALOGUE
}
102 -> npcl(FacialExpression.OLD_ANGRY1, "Well if you're not here to work, go hang around somewhere else!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return BlastFurnaceForemanDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BLAST_FURNACE_FOREMAN_2553)
}
}

View file

@ -0,0 +1,42 @@
package content.region.misc.keldagrim.dialogue
import core.game.node.entity.npc.AbstractNPC
import core.game.world.map.Location
import core.plugin.Initializable
import core.tools.RandomFunction
import org.rs09.consts.NPCs
@Initializable
class BlastFurnaceForemanNPC(id: Int = 0, location: Location? = null) : AbstractNPC(id,location) {
companion object {
val MESSAGES = arrayOf(
// Mostly https://youtu.be/hZ_q441esf0
"Somebody fix the conveyor belt!", // When the drive belt or cogs are broken -> conveyor belt.
"Somebody work the conveyor belt!",
"Somebody fix that pipe!",
"Somebody operate the pump!",
"Somebody refuel the stove!",
"Keep the temperature controlled.", // https://youtu.be/McMNWADwdF8&t=38
"Work faster!",
"That's, it keep it going."
)
}
override fun construct(id: Int, location: Location?, vararg objects: Any?): AbstractNPC {
return BlastFurnaceForemanNPC(id, location)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BLAST_FURNACE_FOREMAN_2553)
}
override fun handleTickActions() {
super.handleTickActions()
// TODO: Have chat messages pop up according to the state of the Blast Furnace and not on a dice roll.
if (RandomFunction.random(20) < 1) {
core.api.sendChat(this, MESSAGES.random())
}
}
}

View file

@ -0,0 +1,43 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class DrunkenDwarfDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hello there! Are you alright?").also { stage++ }
1 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "Of courshe! Why why why *hic* why shouldn't I be?").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "Hey, you look vaguely familiar... haven't I seen you somewhere before?").also { stage++ }
3 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "That'sh not likely... I've been here for eh...").also { stage++ }
4 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "I've been here for...").also { stage++ }
5 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "Yearsh!").also { stage++ }
6 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "I've been looking after thish houshe for my... my coushin? Or wash it my brother? A family member anyway.").also { stage++ }
7 -> playerl(FacialExpression.FRIENDLY, "And where is this... family member of yours?").also { stage++ }
8 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "All over, all over... he shaish he went off to wander all over Gielinor. Don't remember why.").also { stage++ }
9 -> playerl(FacialExpression.FRIENDLY, "Hmm... I wonder, I may have met him...").also { stage++ }
10 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "He comesh back sometimesh... saysh he needsh more kebabsh.").also { stage++ }
11 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "Or ish that jusht a dream? Sometimesh I dream kebabsh invade Keldi... Keldu... Keldashomething.").also { stage++ }
12 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "When you eatsh them, they take over your mind, they do! An army of mindlesh kebab eating dwarvesh!").also { stage++ }
13 -> playerl(FacialExpression.FRIENDLY, "Er, yes, well, I think I should be off now.").also { stage++ }
14 -> npcl(FacialExpression.OLD_DRUNK_RIGHT, "THE KEBABSH WILL COME FOR YOU!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return DrunkenDwarfDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.DRUNKEN_DWARF_2203)
}
}

View file

@ -0,0 +1,36 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class DwarfsDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> {
var random = arrayOf(1, 2, 3, 4, 5).random()
when (random) {
1 -> npcl(FacialExpression.OLD_DEFAULT, "I hope the goblins are properly maintaining their stretch of track! I'd hate to see them spoil good Dwarven workmanship.").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.OLD_DEFAULT, "You're ${player.name}, aren't you? It's a good job you did helping to get this train link open.").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.OLD_DEFAULT, "Y'know, at first I didn't like the idea of visiting a goblin city, but these cave goblins are alright.").also { stage = END_DIALOGUE }
4 -> npcl(FacialExpression.OLD_DEFAULT, "These goblins have so much more advanced technology than us. Take a look at their magical lights! We could never create something like them.").also { stage = END_DIALOGUE }
5 -> npcl(FacialExpression.OLD_DEFAULT, "Dorgesh-Kaan's very nice to visit, but I don't think I'd want to live there.").also { stage = END_DIALOGUE }
}
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return DwarfsDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.DWARF_5880, NPCs.DWARF_5881, NPCs.DWARF_5882, NPCs.DWARF_5883, NPCs.DWARF_5884, NPCs.DWARF_5885)
}
}

View file

@ -1,66 +1,151 @@
package content.region.misc.keldagrim.dialogue package content.region.misc.keldagrim.dialogue
import core.game.component.Component import core.api.*
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.game.system.task.Pulse import core.game.system.task.Pulse
import core.game.world.map.Location import core.game.world.map.Location
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.Components import org.rs09.consts.Components
import core.game.world.GameWorld import org.rs09.consts.NPCs
@Initializable @Initializable
class DwarvenBoatmanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { class DwarvenBoatmanForthDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage++){ // TODO: This should be replaced with the Giant Dwarf quest
0 -> player("I'd like to go to Keldagrim please.") if (!getAttribute(player, "/save:keldagrim-visited", false)) {
1 -> npc("How do you know about that?") when (stage) {
2 -> player("Look, I just do, okay?") START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Ho there, human!").also { stage++ }
3 -> npc("uhhhh") 1 -> playerl(FacialExpression.FRIENDLY, "${player.name}.").also { stage++ }
4 -> player("I'm, errr, from the future!") 2 -> npcl(FacialExpression.OLD_HAPPY, "Ho there, ${player.name}! Want to take a ride with me?").also { stage++ }
5 -> npc("hmmm") 3 -> playerl(FacialExpression.FRIENDLY, "Where are you going? Across the river?").also { stage++ }
6 -> player("Can I please just go?") 4 -> npcl(FacialExpression.OLD_HAPPY, "No no, that's what the ferryman is for! I'm going to Keldagrim, my home!").also { stage++ }
7 -> npc("Hmmmmmmmmmmm") 5 -> playerl(FacialExpression.FRIENDLY, "How much will that cost me then?").also { stage++ }
8 -> player("Ok, fine! I'll prove it! errrr....") 6 -> npcl(FacialExpression.OLD_HAPPY, "For a human like you, I can do it for free!").also { stage++ }
9 -> npc("Hm?") 7 -> showTopics(
10 -> player("In the future your big statue gets knocked over!") Topic(FacialExpression.FRIENDLY, "That's a deal!", 8),
11 -> npc("How do you even know about-") Topic(FacialExpression.FRIENDLY, "I prefer the mines to the city.", 15),
12 -> npc("Gah, nevermind! Just climb","on board!") )
13 -> player("Thank you!") 8 -> npcl(FacialExpression.OLD_HAPPY, "Excellent! I'm just waiting for my ship to arrive and then we can go.").also { stage++ }
14 -> end().also { GameWorld.Pulser.submit(travelPulse(player)) } 9 -> npcl(FacialExpression.OLD_HAPPY, "Mind, this trip could take a few minutes! Are you sure you're ready to go as well?").also { stage++ }
10 -> {
setComponentVisibility(player, 228, 6, true)
setComponentVisibility(player, 228, 9, false)
sendDialogueOptions(player, "(Not Done) Start The Giant Dwarf quest?", "Yes", "No").also { stage++ }
}
11 -> when (buttonId) {
1 -> playerl(FacialExpression.FRIENDLY, "Yes, I'm ready and don't mind it taking a few minutes.").also { stage = 12 }
2 -> playerl(FacialExpression.FRIENDLY, "No, I don't have time right now, I'll be back later.").also { stage = 14 }
}
12 -> npcl(FacialExpression.OLD_HAPPY, "Well, let's not waste any more time then!").also { stage++ }
13 -> end().also {
submitWorldPulse(TravelForthPulse(player))
}
14 -> npcl(FacialExpression.OLD_HAPPY, "Sure, sure! Come back when you need to!").also {
stage = END_DIALOGUE
}
15 -> npcl(FacialExpression.OLD_HAPPY, "Well, suit yourself then!").also {
stage = END_DIALOGUE
}
}
} else {
when (stage) {
START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Hello again, ${player.name}! Want to go back to Keldagrim?").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Yes, please take me.", 2),
Topic(FacialExpression.FRIENDLY, "What, on your ship? No way.", 3),
)
2 -> end().also {
submitWorldPulse(TravelForthPulse(player))
}
3 -> npcl(FacialExpression.OLD_NORMAL, "Hey, it was only a little accident! Calm down!").also {
stage = END_DIALOGUE
}
}
} }
return true return true
} }
override fun open(vararg args: Any?): Boolean { override fun newInstance(player: Player?): DialoguePlugin {
npc("Aye, what do you want?") return DwarvenBoatmanForthDialogue(player)
stage = 0
return true
}
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return DwarvenBoatmanDialogue(player)
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
return intArrayOf(2205,1844,1843) return intArrayOf(NPCs.DWARVEN_BOATMAN_2205) //1844,1843
}
override fun npc(vararg messages: String?): Component {
return super.npc(core.game.dialogue.FacialExpression.OLD_NORMAL, *messages)
} }
} }
class travelPulse(val player: Player): Pulse(1){ class TravelForthPulse(val player: Player): Pulse(1){
var counter = 0 var counter = 0
override fun pulse(): Boolean { override fun pulse(): Boolean {
when(counter++){ when(counter++){
0 -> player.lock().also { player.interfaceManager.open(Component(Components.FADE_TO_BLACK_120)) } 0 -> lock(player, 10).also {
3 -> player.properties.teleportLocation = Location.create(2888, 10225, 0) openInterface(player, Components.FADE_TO_BLACK_120)
4 -> { }
player.interfaceManager.close(Component(Components.FADE_TO_BLACK_120)) 3 -> teleport(player, Location.create(2892, 10225, 0))
player.interfaceManager.open(Component(Components.FADE_FROM_BLACK_170)) 4 -> {
closeInterface(player)
openInterface(player, Components.FADE_FROM_BLACK_170)
}
6 -> unlock(player).also {
closeInterface(player)
setAttribute(player, "/save:keldagrim-visited", true)
return true
}
}
return false
}
}
@Initializable
class DwarvenBoatmanBackDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Want me to take you back to the mines?").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Yes, please take me.", 2),
Topic(FacialExpression.FRIENDLY, "What, on your ship! No thanks!", 3),
)
2 -> end().also { submitWorldPulse(TravelBackPulse(player)) }
3 -> npcl(FacialExpression.OLD_NORMAL, "Hey now, it was only a slight accident!").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "A slight accident?? Have you any idea how much time I spent rebuilding that statue?").also { stage++ }
5 -> npcl(FacialExpression.OLD_NORMAL, "Calm down, calm down! You got what you paid for the trip, didn't you?").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return DwarvenBoatmanBackDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.DWARVEN_BOATMAN_2206)
}
}
class TravelBackPulse(val player: Player): Pulse(1){
var counter = 0
override fun pulse(): Boolean {
when(counter++){
0 -> lock(player, 10).also {
openInterface(player, Components.FADE_TO_BLACK_120)
}
3 -> teleport(player, Location.create(2838, 10127, 0))
4 -> {
closeInterface(player)
openInterface(player, Components.FADE_FROM_BLACK_170)
}
6 -> unlock(player).also {
closeInterface(player)
return true
} }
6 -> player.unlock().also { player.interfaceManager.close(Component(Components.FADE_FROM_BLACK_170)); player.setAttribute("/save:keldagrim-visited",true); return true }
} }
return false return false
} }

View file

@ -0,0 +1,113 @@
package content.region.misc.keldagrim.dialogue
import core.api.*
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.game.world.map.Location
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs
@Initializable
class DwarvenFerrymanForthDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> {
if (!getAttribute(player, "/save:keldagrim-river-forth-crossed", false)) {
npcl(FacialExpression.OLD_DEFAULT, "Hello there, want a ride?").also { stage++ }
} else {
npcl(FacialExpression.OLD_DEFAULT, "Want to cross the river? It's just 2 gold pieces!").also { stage = 6 }
}
}
1 -> playerl(FacialExpression.FRIENDLY, "A ride, where to?").also { stage++ }
2 -> npcl(FacialExpression.OLD_DEFAULT, "Across the river, across the river! It's just a short ride!").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "How much will that cost me?").also { stage++ }
4 -> npcl(FacialExpression.OLD_DEFAULT, "Haha, you understand us dwarves well, human!").also { stage++ }
5 -> npcl(FacialExpression.OLD_DEFAULT, "It's just 2 gold pieces! Want to go?").also { stage++ }
6 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Yes please.", 7),
Topic(FacialExpression.FRIENDLY, "No thanks.", END_DIALOGUE),
)
7 -> {
if (!inInventory(player, Items.COINS_995, 2)) {
npcl(FacialExpression.OLD_DEFAULT, "You don't even have 2 gold coins, humans!").also { stage++ }
} else {
if (removeItem(player, Item(Items.COINS_995, 2))) {
setAttribute(player, "/save:keldagrim-river-forth-crossed", true)
end()
teleport(player, Location.create(2836, 10143, 0))
}
}
}
8 -> npcl(FacialExpression.OLD_DEFAULT, "Come back later.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return DwarvenFerrymanForthDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.DWARVEN_FERRYMAN_1843)
}
}
// https://youtu.be/KI_f24g0Xl0
@Initializable
class DwarvenFerrymanBackDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> {
if (!getAttribute(player, "/save:keldagrim-river-back-crossed", false)) {
npcl(FacialExpression.OLD_DEFAULT, "Hello, want to cross the river?").also { stage++ }
} else {
npcl(FacialExpression.OLD_DEFAULT, "Want me to take you across? It's just 2 gold pieces!").also { stage = 4 }
}
}
1 -> playerl(FacialExpression.FRIENDLY, "Are you going to charge me too?").also { stage++ }
2 -> npcl(FacialExpression.OLD_DEFAULT, "Are you kidding?").also { stage++ }
3 -> npc(FacialExpression.OLD_DEFAULT, "Of course I am! But it's just 2 gold coins, do you", "want to go?").also { stage++ }
4 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Yes please.", 5),
Topic(FacialExpression.FRIENDLY, "No thanks.", END_DIALOGUE),
)
5 -> {
if (!inInventory(player, Items.COINS_995, 2)) {
npcl(FacialExpression.OLD_DEFAULT, "You don't even have 2 gold coins, humans!").also { stage++ }
} else {
if (removeItem(player, Item(Items.COINS_995, 2))) {
end()
setAttribute(player, "/save:keldagrim-river-back-crossed", true)
teleport(player, Location.create(2864, 10133, 0))
}
}
}
6 -> npcl(FacialExpression.OLD_DEFAULT, "Come back later.").also { stage++ }
7 -> playerl(FacialExpression.FRIENDLY, "But... that means I'm stuck here.").also { stage++ }
8 -> npcl(FacialExpression.OLD_DEFAULT, "Hmm. I suppose I could make an exception for you this time.").also { stage++ }
9 -> playerl(FacialExpression.FRIENDLY, "Thanks a lot!").also { stage++ }
10 -> {
end()
setAttribute(player, "/save:keldagrim-river-back-crossed", true)
teleport(player, Location.create(2864, 10133, 0))
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return DwarvenFerrymanBackDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.DWARVEN_FERRYMAN_1844)
}
}

View file

@ -0,0 +1,35 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class FactoryManagerDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_ANGRY1, "Don't bother me, can't you see I'm busy?").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "No, I can't... can I go into the factory?").also { stage++ }
2 -> npcl(FacialExpression.OLD_NORMAL, "You can go in. The Consortium, in their infinite wisdom, has decided to open up the factory to all and sundry.").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "How come?").also { stage++ }
4 -> npcl(FacialExpression.OLD_NORMAL, "We've built a new blast furnace and always have a shortage of people to work on it.").also { stage++ }
5 -> playerl(FacialExpression.FRIENDLY, "I'll have a look, thanks.").also { stage++ }
6 -> npcl(FacialExpression.OLD_NORMAL, "Just don't go causing any trouble, I still run this factory!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return FactoryManagerDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.FACTORY_MANAGER_2171)
}
}

View file

@ -0,0 +1,109 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class FactoryWorkerDialogue1(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "I'm sorry, I'm looking for the blast furnace?").also { stage++ }
1 -> npcl(FacialExpression.OLD_ANGRY1, "Do I look like a guide to you?").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "No, you look like a hard-working dwarf, but can you please tell me where the blast furnace is?").also { stage++ }
3 -> npcl(FacialExpression.OLD_DEFAULT, "Alright, just head down the stairs, it's easy to find.").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Thanks.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return FactoryWorkerDialogue1(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.FACTORY_WORKER_2172)
}
}
@Initializable
class FactoryWorkerDialogue2(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Are you okay?").also { stage++ }
1 -> npcl(FacialExpression.OLD_ANGRY1, "Don't I look okay?").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "If you were any shorter you wouldn't exist.").also { stage++ }
3 -> npcl(FacialExpression.OLD_ANGRY1, "Very funny, human.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return FactoryWorkerDialogue2(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.FACTORY_WORKER_2173)
}
}
@Initializable
class FactoryWorkerDialogue3(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "What are you dwarves doing in this factory?").also { stage++ }
1 -> npcl(FacialExpression.OLD_ANGRY1, "Working of course, can't you see that?").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "But working on what?").also { stage++ }
3 -> npcl(FacialExpression.OLD_DEFAULT, "Refining the ore that is being brought into the factory, of course.").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "And what does that mean?").also { stage++ }
5 -> npcl(FacialExpression.OLD_ANGRY1, "It means you should stop asking so many questions and get back to work!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return FactoryWorkerDialogue3(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.FACTORY_WORKER_2174)
}
}
@Initializable
class FactoryWorkerDialogue4(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Who owns this factory?").also { stage++ }
1 -> npcl(FacialExpression.OLD_DEFAULT, "The Consortium does and that's all you need to know.").also { stage++ }
2 -> playerl(FacialExpression.FRIENDLY, "But what company? I thought there were all these different companies?").also { stage++ }
3 -> npcl(FacialExpression.OLD_DEFAULT, "Oh yes, all the major companies own this plant. It's too vital to be in the hands of one company alone.").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "And what exactly are you doing here?").also { stage++ }
5 -> npcl(FacialExpression.OLD_ANGRY1, "I tire of these questions. Let me get back to work!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
return FactoryWorkerDialogue4(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.FACTORY_WORKER_2175)
}
}

View file

@ -0,0 +1,34 @@
package content.region.misc.keldagrim.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class GunslikDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DEFAULT, "What can I interest you in? We have something of everything here!").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Oh good!", 2),
Topic(FacialExpression.FRIENDLY, "Nothing, thanks.", END_DIALOGUE),
)
2 -> end().also{ openNpcShop(player, NPCs.GUNSLIK_2154) }
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return GunslikDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.GUNSLIK_2154)
}
}

View file

@ -0,0 +1,40 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class KarlDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DEFAULT, "Hello there, human! Come in, come in!").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "Hi, nice to see you!").also { stage++ }
2 -> npcl(FacialExpression.OLD_DEFAULT, "Tell me, what brings you here?").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "Well, first I came to this city just for the adventure and excitement, but then I knocked over this statue, you see. Well, I didn't really knock it over myself, I was on this boat.").also { stage++ }
4 -> npcl(FacialExpression.OLD_DEFAULT, "A boat! Fascinating, go on!").also { stage++ }
5 -> playerl(FacialExpression.FRIENDLY, "Yes, well, this boatman was a bit rubbish, or there was something wrong with the ship, I don't know. And then I got arrested by the Black Guard.").also { stage++ }
6 -> npcl(FacialExpression.OLD_DEFAULT, "Not the Black Guard!").also { stage++ }
7 -> playerl(FacialExpression.FRIENDLY, "Yes, and they took me to this Veldaban person, who pretended to be really angry but actually he was really nice and he asked me for my help.").also { stage++ }
8 -> playerl(FacialExpression.FRIENDLY, "And after a whole lot of running around, I finally managed to get the statue to be rebuilt.").also { stage++ }
9 -> npcl(FacialExpression.OLD_DEFAULT, "Such an interesting tale!").also { stage++ }
10 -> npcl(FacialExpression.OLD_DEFAULT, "Now how did you come to be in Keldagrim again?").also { stage++ }
11 -> playerl(FacialExpression.FRIENDLY, "Never mind.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return KarlDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.KARL_2195)
}
}

View file

@ -0,0 +1,78 @@
package content.region.misc.keldagrim.dialogue
import core.api.addItemOrDrop
import core.api.inInventory
import core.api.isQuestComplete
import core.api.removeItem
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.game.node.item.Item
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.Items
import org.rs09.consts.NPCs
@Initializable
class KjutDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DEFAULT, "Kebabs! Get your kebabs here! One gold each!").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Sure, one kebab please.", 2, true),
Topic(FacialExpression.FRIENDLY, "I'm looking for a drunken dwarf.", 6),
Topic(FacialExpression.FRIENDLY, "Do you have any quests?", 17),
)
2 -> {
if (!inInventory(player, Items.COINS_995, 1)) {
playerl(FacialExpression.FRIENDLY, "Sure, one kebab please.").also { stage = 3 }
} else {
if (removeItem(player, Item(Items.COINS_995, 1))) {
addItemOrDrop(player, Items.KEBAB_1971)
playerl(FacialExpression.FRIENDLY, "Sure, one kebab please.").also { stage = END_DIALOGUE }
}
}
}
3 -> npcl(FacialExpression.OLD_ANGRY1, "Yes? Are you going to give me that one gold coin then?").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Sorry, I don't seem to have any money on me.").also { stage++ }
5 -> npcl(FacialExpression.OLD_DEFAULT, "The bank is Keldagrim-West. Hurry back!").also {
stage = END_DIALOGUE
}
6 -> {
if (isQuestComplete(player, "Forgettable Tale of a Drunken Dwarf")) {
npcl(FacialExpression.OLD_DEFAULT, "I thought you would know plenty!").also { stage = 14 }
} else {
npcl(FacialExpression.OLD_DEFAULT, "Just go out in the streets, they can't be hard to find!").also { stage = 7 }
}
}
7 -> playerl(FacialExpression.FRIENDLY, "No, a specific drunken dwarf, he keeps harassing me.").also { stage++ }
8 -> npcl(FacialExpression.OLD_DEFAULT, "That's still not very helpful. But let me see. There is one particularly drunken dwarf just to the northeast of here.").also { stage++ }
9 -> npcl(FacialExpression.OLD_DEFAULT, "He's scaring away my customers, he says there's something wrong with my kebabs. Quite annoying fellow.").also { stage++ }
10 -> playerl(FacialExpression.FRIENDLY, "I don't think that's who I mean.").also { stage++ }
11 -> npcl(FacialExpression.OLD_DEFAULT, "Well, he does have a relative who wanders all over Gielinor. Comes back from time to time to buy more kebabs. Don't see him very often though.").also { stage++ }
12 -> playerl(FacialExpression.FRIENDLY, "Do you think I'll have any chance of catching him here?").also { stage++ }
13 -> npcl(FacialExpression.OLD_DEFAULT, "I think he was back here quite recently, so I doubt he'll be back any time soon.").also {
stage = END_DIALOGUE
}
14 -> playerl(FacialExpression.FRIENDLY, "How do you mean?").also { stage++ }
15 -> npcl(FacialExpression.OLD_DEFAULT, "Oh come on! You in the Laughing Miner? The whole city knows about you and your dwarven drinking buddies!").also { stage++ }
16 -> playerl(FacialExpression.FRIENDLY, "Right, right.").also {
stage = END_DIALOGUE
}
17 -> npcl(FacialExpression.OLD_DEFAULT, "Not really! I have a steady supply of meat coming in through the carts and I don't really need anything else!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return KjutDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.KJUT_2198)
}
}

View file

@ -1,46 +1,26 @@
package content.region.misc.keldagrim.dialogue package content.region.misc.keldagrim.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.entity.npc.NPC import core.game.dialogue.Topic
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs import org.rs09.consts.NPCs
/**
* @author qmqz
*/
@Initializable @Initializable
class NolarDialogue(player: Player? = null) : DialoguePlugin(player){ class NolarDialogue(player: Player? = null) : DialoguePlugin(player){
override fun open(vararg args: Any?): Boolean {
npc = args[0] as NPC
npc(FacialExpression.CHILD_NORMAL,"I have a wide variety of crafting tools on offer,",
"care to take a look?").also { stage = 0 }
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){ when(stage){
0 -> { START_DIALOGUE -> npc(FacialExpression.OLD_DEFAULT, "I have a wide variety of crafting tools on offer,", "care to take a look?").also { stage++ }
options("Yes please!", "No thanks").also { stage++ } 1 -> showTopics(
} Topic(FacialExpression.FRIENDLY, "Yes please!", 2),
Topic(FacialExpression.FRIENDLY, "No thanks.", END_DIALOGUE),
1 -> when(buttonId){ )
1 -> { 2 -> end().also{ openNpcShop(player, NPCs.NOLAR_2158) }
player(FacialExpression.FRIENDLY, "Yes please!").also { stage = 10 }
}
2 -> {
player(FacialExpression.FRIENDLY, "No thanks.").also { stage = 99 }
}
}
10 -> {
end().also { npc.openShop(player) }
}
99 -> end()
} }
return true return true
} }

View file

@ -3,27 +3,42 @@ package content.region.misc.keldagrim.dialogue
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import core.api.* import core.api.*
import core.game.dialogue.DialogueFile
import core.game.dialogue.FacialExpression import core.game.dialogue.FacialExpression
import core.game.node.item.Item import core.game.dialogue.Topic
import org.rs09.consts.Items
import org.rs09.consts.NPCs
import core.game.interaction.InteractionListener
import core.game.interaction.IntType import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.item.Item
import org.rs09.consts.NPCs
import core.tools.END_DIALOGUE import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE import core.tools.START_DIALOGUE
import org.rs09.consts.Items
/**
* Ordan dialogue and unnoting.
* @author phil lips
*/
@Initializable @Initializable
class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) { class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player), InteractionListener {
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// Dialogue follows https://www.youtube.com/watch?v=mwoA01EYQks a 29 May 2010 capture
when(stage){ when(stage){
START_DIALOGUE-> playerl(FacialExpression.FRIENDLY, "Can you un-note any of my items?").also { stage++ } START_DIALOGUE -> npcl(FacialExpression.OLD_HAPPY, "Are you here to smith? Do you want to buy some ore?").also { stage++ }
1 -> npcl(FacialExpression.OLD_DEFAULT,"I can un-note Tin, Copper, Iron, Coal, and Mithril.").also { stage++ } 1 -> showTopics(
2 -> npcl(FacialExpression.OLD_DEFAULT,"I can even un-note Adamantite and Runite, but you're gonna need deep pocktes for that.").also { stage = END_DIALOGUE } Topic(FacialExpression.FRIENDLY, "Yes please.", 2),
Topic(FacialExpression.FRIENDLY, "Can you un-note any of my items?", 3),
Topic(FacialExpression.FRIENDLY, "No thanks.", 5),
)
2 -> openNpcShop(player, NPCs.ORDAN_2564).also {
end()
}
3 -> npc(FacialExpression.OLD_HAPPY,"I suppose I can un-note any ores that I sell in my", "shop - for a price of course. Just give me the noted ore", "you wish to exchange.").also {
stage++
}
// This following dialogue is not authentic, but was originally here.
4 -> npcl(FacialExpression.OLD_HAPPY,"I can even un-note Adamantite and Runite, but you're gonna need deep pockets for that.").also {
stage = END_DIALOGUE
}
5 -> npcl(FacialExpression.OLD_ANGRY1, "Well don't waste my time then!").also {
stage = END_DIALOGUE
}
} }
return true return true
} }
@ -36,89 +51,89 @@ class OrdanDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(
return intArrayOf(NPCs.ORDAN_2564) return intArrayOf(NPCs.ORDAN_2564)
} }
/**This is for unnoting ores from Ordan, yeah I know being able to unnote Addy and Rune isn't authentic override fun defineListeners() {
* but QOL wins out in this one, however unnoting Addy and Runite is expensive as fuck and is essentially onUseWith(IntType.NPC, OrdanDialogueFile.ORES_TO_UNNOTE_PRICES.keys.toIntArray(), NPCs.ORDAN_2564) { player, noteType, npc ->
* a big fat smelly gold sink, perhaps it will add some value to GP uh ha ha openDialogue(player, OrdanDialogueFile(noteType.id, noteType.name), npc.asNpc())
* just comment those options out if you don't want em return@onUseWith true
* aka "WOW I CAN'T BELIEVE IT'S ALL CONDITIONALS*/ }
}
}
class OrdanUnnoteListener : InteractionListener { class OrdanDialogueFile(private val noteOreId: Int, private val noteOreName: String) : DialogueFile() {
val notedOre = intArrayOf(
Items.IRON_ORE_441, companion object {
Items.COPPER_ORE_437, val ORES_TO_UNNOTE_PRICES = hashMapOf(
Items.TIN_ORE_439, Items.COPPER_ORE_437 to 10,
Items.COAL_454, Items.TIN_ORE_439 to 10,
Items.MITHRIL_ORE_448, Items.IRON_ORE_441 to 8,
Items.ADAMANTITE_ORE_450, Items.SILVER_ORE_443 to 37,
Items.SILVER_ORE_443, Items.GOLD_ORE_445 to 75,
Items.GOLD_ORE_445, Items.MITHRIL_ORE_448 to 81,
Items.RUNITE_ORE_452 Items.ADAMANTITE_ORE_450 to 330,
Items.RUNITE_ORE_452 to 1000,
Items.COAL_454 to 22,
) )
val UNNOTE_PRICES = hashMapOf( }
Items.IRON_ORE_441 to 8,
Items.COPPER_ORE_437 to 10, // These are instance variables for un-noting dialogue.
Items.TIN_ORE_439 to 10, var unnoteAmount = 0
Items.COAL_454 to 22, var unnotePrice = 0
Items.MITHRIL_ORE_448 to 81,
Items.ADAMANTITE_ORE_450 to 330, // Dialogue follows https://www.youtube.com/watch?v=nqwzco2Es7o a 6 Dec 2009 capture
Items.SILVER_ORE_443 to 37, override fun handle(componentID: Int, buttonID: Int) {
Items.GOLD_ORE_445 to 75, when (stage) {
Items.RUNITE_ORE_452 to 1000 START_DIALOGUE -> {
) // Swords position iface/child changes according to number of dialogue options.
override fun defineListeners() { setComponentVisibility(player!!, 232, 9, false)
onUseWith(IntType.NPC, notedOre, NPCs.ORDAN_2564){ player, noteType, _ -> setComponentVisibility(player!!, 232, 8, true)
val noteAmount = amountInInventory(player, noteType.id) sendDialogueOptions(player!!, "How much $noteOreName would you like to un-note?", "1", "5", "10", "X")
val noteName = noteType.name stage++
var unNoteAmount = 0 }
var inventorySlots = freeSlots(player) 1 -> when (buttonID) {
var actualAmount = 0 1 -> {
var proceed = false unnoteAmount = 1
var wait = false unnotePrice = 1 * ORES_TO_UNNOTE_PRICES[noteOreId]!!
player.dialogueInterpreter.sendOptions("$noteName un-note?","1","5","10","X") npcl(FacialExpression.OLD_HAPPY, "I can un-note those for $unnotePrice gold pieces, is that okay?").also { stage++ }
player.dialogueInterpreter.addAction { player, button -> }
when(button) { 2 -> {
2 -> unNoteAmount = 1 unnoteAmount = 5
3 -> unNoteAmount = 5 unnotePrice = 5 * ORES_TO_UNNOTE_PRICES[noteOreId]!!
4 -> unNoteAmount = 10 npcl(FacialExpression.OLD_HAPPY, "I can un-note those for $unnotePrice gold pieces, is that okay?").also { stage++ }
5 ->{sendInputDialogue(player, true, "Enter amount:") { value -> }
unNoteAmount = value as Int 3 -> {
actualAmount = if(unNoteAmount > inventorySlots){ unnoteAmount = 10
inventorySlots unnotePrice = 10 * ORES_TO_UNNOTE_PRICES[noteOreId]!!
}else{ npcl(FacialExpression.OLD_HAPPY, "I can un-note those for $unnotePrice gold pieces, is that okay?").also { stage++ }
unNoteAmount }
} 4 -> sendInputDialogue(player!!, true, "Enter amount:") { value ->
if(actualAmount > noteAmount){ unnoteAmount = value as Int
actualAmount = noteAmount // For QOL, reduce the amount to the number of free slots in player's inventory.
} if (unnoteAmount > freeSlots(player!!)) {
/**Yes this is a second when statement that does the exact same thing unnoteAmount = freeSlots(player!!)
* as the other one, and no im not removing this because if I do then }
* custom input amounts don't work and im not spending more than unnotePrice = unnoteAmount * ORES_TO_UNNOTE_PRICES[noteOreId]!!
* a day making it work with just one when statement.*/ // Dialogue is to cater to QOL
val totalPrice = UNNOTE_PRICES[noteType.id]!! * (actualAmount) npcl(FacialExpression.OLD_HAPPY, "I can un-note $unnoteAmount $noteOreName for $unnotePrice gold pieces, is that okay?").also { stage++ }
if(amountInInventory(player,Items.COINS_995) >= totalPrice && actualAmount > 0 ){ return@sendInputDialogue
removeItem(player, Item(995,totalPrice),Container.INVENTORY) }
removeItem(player, Item(noteType.id,actualAmount),Container.INVENTORY) }
addItem(player,noteType.id - 1,actualAmount) 2 -> showTopics(
} Topic(FacialExpression.FRIENDLY, "It's a deal.", 3),
} Topic(FacialExpression.FRIENDLY, "No, that's too expensive.", END_DIALOGUE),
} )
} 3 -> {
actualAmount = if(unNoteAmount > inventorySlots){ if (freeSlots(player!!) < unnoteAmount) {
inventorySlots npc(FacialExpression.OLD_NORMAL, "You don't have enough room in your inventory for that", "number of un-noted items. Clear some space and try", "again.").also { stage = END_DIALOGUE }
}else{ } else if(amountInInventory(player!!, noteOreId) < unnoteAmount) {
unNoteAmount sendDialogueLines(player!!, "You do not have enough notes to un-note", "$unnoteAmount $noteOreName.").also { stage = END_DIALOGUE }
} } else if(amountInInventory(player!!, Items.COINS_995) < unnotePrice){
if(actualAmount > noteAmount){ sendDialogueLines(player!!, "You do not have enough coins to afford un-noting", "$unnoteAmount $noteOreName.").also{ stage = END_DIALOGUE }
actualAmount = noteAmount } else {
} if(removeItem(player!!, Item(Items.COINS_995, unnotePrice), Container.INVENTORY) && removeItem(player!!, Item(noteOreId, unnoteAmount), Container.INVENTORY)) {
val totalPrice = UNNOTE_PRICES[noteType.id]!! * (actualAmount) addItem(player!!, noteOreId - 1, unnoteAmount)
if(amountInInventory(player,Items.COINS_995) >= totalPrice && actualAmount > 0 ){ }
removeItem(player, Item(995,totalPrice),Container.INVENTORY) end()
removeItem(player, Item(noteType.id,actualAmount),Container.INVENTORY)
addItem(player,noteType.id - 1,actualAmount)
}
} }
return@onUseWith true
} }
} }
} }

View file

@ -1,15 +1,14 @@
package content.region.misc.keldagrim.dialogue package content.region.misc.keldagrim.dialogue
import core.api.openInterface
import core.cache.def.impl.NPCDefinition import core.cache.def.impl.NPCDefinition
import core.game.component.Component
import core.game.dialogue.DialoguePlugin import core.game.dialogue.DialoguePlugin
import core.game.interaction.OptionHandler import core.game.interaction.OptionHandler
import core.game.node.Node import core.game.node.Node
import core.game.node.entity.player.Player import core.game.node.entity.player.Player
import core.plugin.Initializable import core.plugin.Initializable
import core.plugin.Plugin import core.plugin.Plugin
import org.rs09.consts.NPCs
const val REINALD = 2194
/** /**
* File for handling Reinald's dialogue and right-click option * File for handling Reinald's dialogue and right-click option
@ -18,28 +17,23 @@ const val REINALD = 2194
@Initializable @Initializable
class ReinaldDialogue(player: Player? = null) : DialoguePlugin(player){ class ReinaldDialogue(player: Player? = null) : DialoguePlugin(player){
override fun handle(interfaceId: Int, buttonId: Int): Boolean { override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage++){ when(stage){
0 -> options("Yes, please!", "No, thanks.") 0 -> npc("Hello, human! Would you like to browse","my little shop of bracelets?").also { stage++ }
1 -> when(buttonId){ 1 -> options("Yes, please!", "No, thanks.").also { stage++ }
1 -> end().also { player.interfaceManager.open(Component(593)) } 2 -> when(buttonId){
1 -> end().also { openInterface(player,593) }
2 -> end() 2 -> end()
} }
} }
return true return true
} }
override fun open(vararg args: Any?): Boolean {
npc("Hello, human! Would you like to browse","my little shop of bracelets?")
stage = 0
return true
}
override fun newInstance(player: Player?): DialoguePlugin { override fun newInstance(player: Player?): DialoguePlugin {
return ReinaldDialogue(player) return ReinaldDialogue(player)
} }
override fun getIds(): IntArray { override fun getIds(): IntArray {
return intArrayOf(REINALD) return intArrayOf(NPCs.REINALD_2194)
} }
} }
@ -47,12 +41,12 @@ class ReinaldDialogue(player: Player? = null) : DialoguePlugin(player){
@Initializable @Initializable
class ReinaldOptionHandler : OptionHandler(){ class ReinaldOptionHandler : OptionHandler(){
override fun handle(player: Player?, node: Node?, option: String?): Boolean { override fun handle(player: Player?, node: Node?, option: String?): Boolean {
player?.interfaceManager?.open(Component(593)) openInterface(player!!,593)
return true return true
} }
override fun newInstance(arg: Any?): Plugin<Any> { override fun newInstance(arg: Any?): Plugin<Any> {
NPCDefinition.forId(REINALD).handlers["option:change-armguards"] = this NPCDefinition.forId(NPCs.REINALD_2194).handlers["option:change-armguards"] = this
return this return this
} }

View file

@ -0,0 +1,30 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class RowdyDwarfDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DRUNK_LEFT, "Get OUT of my WAY!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return RowdyDwarfDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.ROWDY_DWARF_2187)
}
}

View file

@ -0,0 +1,34 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class RunvastrDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DEFAULT, "Oh, leave an old dwarf in peace will you?").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "Why, what's wrong?").also { stage++ }
2 -> npcl(FacialExpression.OLD_DEFAULT, "Ninenty years down in the mines, and this is all I got out of it. All my life wasted away.").also { stage++ }
3 -> playerl(FacialExpression.FRIENDLY, "You've still got a nice house, don't you?").also { stage++ }
4 -> npcl(FacialExpression.OLD_DEFAULT, "A crummy old house in East, that's all my life amounts to.").also { stage++ }
5 -> playerl(FacialExpression.FRIENDLY, "I'll leave you alone then.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return RunvastrDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.RUNVASTR_2190)
}
}

View file

@ -0,0 +1,33 @@
package content.region.misc.keldagrim.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class SuneDialogue(player: Player? = null) : DialoguePlugin(player){
// This npc travels between Tati's house and the city's marketplace.
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_ANGRY1, "Can you leave me alone please? I'm trying to get a bit of rest.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return SuneDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.SUNE_2191)
}
}

View file

@ -0,0 +1,54 @@
package content.region.misc.keldagrim.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class TatiDialogue(player: Player? = null) : DialoguePlugin(player){
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_ANGRY1, "What'you want?").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Do you have any pickaxes?", 2, true),
Topic(FacialExpression.FRIENDLY, "Do you have any quests?", 7, true),
Topic(FacialExpression.FRIENDLY, "Nothing really.", 14),
)
2 -> playerl(FacialExpression.FRIENDLY, "Do you-").also { stage++ }
3 -> npcl(FacialExpression.OLD_ANGRY1, "What? Speak up, I can't hear you!").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Uhm... I'm just looking for some pickaxes! Do you have any?").also { stage++ }
5 -> npcl(FacialExpression.OLD_ANGRY1, "Do I have any pickaxes? Do I? Of course I do, this is a pickaxe shop, isn't it!").also{ stage++ }
6 -> openNpcShop(player, NPCs.TATI_2160).also {
stage = END_DIALOGUE
}
7 -> playerl(FacialExpression.FRIENDLY, "Do you-").also { stage++ }
8 -> npcl(FacialExpression.OLD_ANGRY1, "What? Stop mumbling!").also { stage++ }
9 -> playerl(FacialExpression.FRIENDLY, "I want a quest!").also { stage++ }
10 -> npcl(FacialExpression.OLD_ANGRY1, "I don't have any lousy quests... I've got someone who's helping me already!").also { stage++ }
11 -> npcl(FacialExpression.OLD_ANGRY1, "Well, I say helping... he takes his merry time to do his chores, my son does.").also { stage++ }
12 -> playerl(FacialExpression.FRIENDLY, "Then perhaps I can help in some way?").also { stage++ }
13 -> npcl(FacialExpression.OLD_ANGRY1, "Pfft, I doubt it... maybe when my son fouls up again, but not now.").also {
stage = END_DIALOGUE
}
14 -> npcl(FacialExpression.OLD_ANGRY1, "Then clear off!").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return TatiDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.TATI_2160)
}
}

View file

@ -0,0 +1,31 @@
package content.region.misc.keldagrim.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class UlifedDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when(stage){
START_DIALOGUE -> npcl(FacialExpression.OLD_DEFAULT, "Say, aren't you the human who got arrested here the other day, by the boat?").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "Yes, but we cleared up the whole situation.").also { stage++ }
2 -> npcl(FacialExpression.OLD_DEFAULT, "Right, right.").also {
stage = END_DIALOGUE
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return UlifedDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.ULIFED_2193)
}
}

View file

@ -0,0 +1,19 @@
package content.region.misc.keldagrim.handlers
import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.world.map.Location
import org.rs09.consts.Scenery
class KeldagrimListeners : InteractionListener {
override fun defineListeners() {
on(Scenery.DOORWAY_23286, IntType.SCENERY, "enter") { player, _ ->
player.properties.teleportLocation = Location.create(2941, 10179, 0)
return@on true
}
on(Scenery.DOORWAY_23287, IntType.SCENERY, "enter") { player, _ ->
player.properties.teleportLocation = Location.create(2435, 5535, 0)
return@on true
}
}
}