Skip to content

Commit 5b93114

Browse files
committed
Npc updates
1 parent ccaee2c commit 5b93114

File tree

4 files changed

+74
-51
lines changed

4 files changed

+74
-51
lines changed

src/main/kotlin/game/game/location/lumbridge/lumbridge.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ on(ServerLaunchEvent::class) {
204204
id = 520,
205205
x = 3212,
206206
y = 3245)
207-
.startWandering(8, WanderingFrequency.RAPID)
207+
.startWandering(8, WanderingFrequency.NORMAL)
208208
world.addNpc(
209209
id = 521,
210210
x = 3212,
211211
y = 3248)
212-
.startWandering(8, WanderingFrequency.RAPID)
212+
.startWandering(8, WanderingFrequency.NORMAL)
213213

214214
// Hans
215215
world.addNpc(
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package game.location.portSarim
2+
3+
import api.predef.*
4+
import api.predef.ext.*
5+
import api.shop.dsl.ShopHandler
6+
import io.luna.game.event.impl.ServerStateChangedEvent.ServerLaunchEvent
7+
import io.luna.game.model.item.shop.*
8+
import io.luna.game.model.mob.wandering.*
9+
10+
val shopkeeperId = 559
11+
12+
ShopHandler.create("Brian's Battleaxe Bazaar.") {
13+
buy = BuyPolicy.EXISTING
14+
restock = RestockPolicy.DEFAULT
15+
currency = Currency.COINS
16+
17+
sell {
18+
"Bronze battleaxe" x 4
19+
"Iron battleaxe" x 3
20+
"Steel battleaxe" x 2
21+
"Black battleaxe" x 1
22+
"Mithril battleaxe" x 1
23+
"Adamant battleaxe" x 1
24+
}
25+
26+
open {
27+
npc2 += shopkeeperId
28+
}
29+
}
30+
31+
npc1(shopkeeperId, {
32+
plr.newDialogue()
33+
.options(
34+
"So, are you selling something?", {
35+
plr.newDialogue()
36+
.player("So, are you selling something?")
37+
.npc(targetNpc.id, "Yep, take a lok at these great axes!")
38+
.then({it.overlays.open(ShopInterface(world, "Brian's Battleaxe Bazaar."))})
39+
.open()
40+
},
41+
"'Ello.", {
42+
plr.newDialogue()
43+
.player("'Ello.")
44+
.npc(targetNpc.id, "'Ello!")
45+
.open()
46+
})
47+
.open()
48+
})
49+
50+
on(ServerLaunchEvent::class) {
51+
world.addNpc(shopkeeperId, 3029, 3249)
52+
.startWandering(3, WanderingFrequency.NORMAL)
53+
}

src/main/kotlin/game/game/location/portSarim/portSarim.kts renamed to src/main/kotlin/game/game/location/portSarim/gerrantsFish.kts

Lines changed: 7 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,9 @@ import api.predef.ext.*
55
import api.shop.dsl.ShopHandler
66
import io.luna.game.event.impl.ServerStateChangedEvent.ServerLaunchEvent
77
import io.luna.game.model.item.shop.*
8+
import io.luna.game.model.mob.wandering.*
89

9-
ShopHandler.create("Brian's Battleaxe Bazaar.") {
10-
buy = BuyPolicy.EXISTING
11-
restock = RestockPolicy.DEFAULT
12-
currency = Currency.COINS
13-
14-
sell {
15-
"Bronze battleaxe" x 4
16-
"Iron battleaxe" x 3
17-
"Steel battleaxe" x 2
18-
"Black battleaxe" x 1
19-
"Mithril battleaxe" x 1
20-
"Adamant battleaxe" x 1
21-
}
22-
23-
open {
24-
npc2 += 559
25-
}
26-
}
10+
val shopkeeperId = 558
2711

2812
ShopHandler.create("Gerrant's Fishy Business.") {
2913
buy = BuyPolicy.EXISTING
@@ -51,38 +35,13 @@ ShopHandler.create("Gerrant's Fishy Business.") {
5135
}
5236

5337
open {
54-
npc2 += 558
38+
npc2 += shopkeeperId
5539
}
5640
}
5741

58-
/**
59-
* Brian dialogue
60-
*/
61-
npc1(559, {
62-
plr.newDialogue()
63-
.options(
64-
"So, are you selling something?", {
65-
plr.newDialogue()
66-
.player("So, are you selling something?")
67-
.npc(559, "Yep, take a lok at these great axes!")
68-
.then({it.overlays.open(ShopInterface(world, "Brian's Battleaxe Bazaar."))})
69-
.open()
70-
},
71-
"'Ello.", {
72-
plr.newDialogue()
73-
.player("'Ello.")
74-
.npc(559, "'Ello!")
75-
.open()
76-
})
77-
.open()
78-
})
79-
80-
/**
81-
* Gerrant dialogue
82-
*/
83-
npc1(558, {
42+
npc1(shopkeeperId, {
8443
plr.newDialogue()
85-
.npc(558, "Wecome! You can buy fishing equipment at my store.", "We'll also buy anything you catch off you.")
44+
.npc(targetNpc.id, "Wecome! You can buy fishing equipment at my store.", "We'll also buy anything you catch off you.")
8645
.options(
8746
"Let's see what you've got then.", {
8847
plr.newDialogue()
@@ -97,6 +56,6 @@ npc1(558, {
9756
})
9857

9958
on(ServerLaunchEvent::class) {
100-
world.addNpc(559, 3029, 3249) // Brian
101-
world.addNpc(558, 3015, 3225) // Gerrant
59+
world.addNpc(shopkeeperId, 3015, 3225)
60+
.startWandering(3, WanderingFrequency.NORMAL)
10261
}

src/main/kotlin/game/game/location/varrock/varrock.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,16 @@ import java.util.*
88

99
on(ServerLaunchEvent::class) {
1010
// Bankers of west bank
11-
//world.addNpc(494, 2945, 3366).defaultDirection = Optional.of(Direction.NORTH)
11+
world.addNpc(494, 3187, 3446).defaultDirection = Optional.of(Direction.WEST)
12+
world.addNpc(494, 3187, 3444).defaultDirection = Optional.of(Direction.WEST)
13+
world.addNpc(494, 3187, 3442).defaultDirection = Optional.of(Direction.WEST)
14+
world.addNpc(494, 3187, 3438).defaultDirection = Optional.of(Direction.WEST)
15+
world.addNpc(494, 3187, 3436).defaultDirection = Optional.of(Direction.WEST)
16+
17+
// Bankers of east bank
18+
world.addNpc(494, 3252, 3418).defaultDirection = Optional.of(Direction.NORTH)
19+
world.addNpc(494, 3253, 3418).defaultDirection = Optional.of(Direction.NORTH)
20+
world.addNpc(494, 3254, 3418).defaultDirection = Optional.of(Direction.NORTH)
21+
world.addNpc(494, 3256, 3418).defaultDirection = Optional.of(Direction.NORTH)
22+
1223
}

0 commit comments

Comments
 (0)