Skip to content

Commit fdda300

Browse files
committed
Cid Adventures
1 parent 694321f commit fdda300

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed
16.4 KB
Binary file not shown.
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
using Darkages.Common;
2+
using Darkages.Network.Client;
3+
using Darkages.Network.Server;
4+
using Darkages.ScriptingBase;
5+
using Darkages.Sprites.Entity;
6+
using Darkages.Types;
7+
8+
namespace Darkages.GameScripts.Mundanes.Generic;
9+
10+
[Script("Cid")]
11+
public class Cid(WorldServer server, Mundane mundane) : MundaneScript(server, mundane)
12+
{
13+
public override void OnClick(WorldClient client, uint serial)
14+
{
15+
base.OnClick(client, serial);
16+
TopMenu(client);
17+
}
18+
19+
protected override void TopMenu(WorldClient client)
20+
{
21+
base.TopMenu(client);
22+
23+
var options = new List<Dialog.OptionsDataItem>
24+
{
25+
new(0x01, "Eastern Woodlands"),
26+
new(0x02, "Abel Beach"),
27+
new(0x03, "Mehadi Swamp"),
28+
new(0x04, "Loures Harbor"),
29+
new(0x05, "Karlopos Beach"),
30+
new(0x06, "Shinewood Forest"),
31+
new(0x07, "Arena")
32+
};
33+
34+
client.SendOptionsDialog(Mundane, "Hello there?! I'm a local merchant that travels often and have room in my carriage, need a lift?", options.ToArray());
35+
}
36+
37+
public override void OnResponse(WorldClient client, ushort responseId, string args)
38+
{
39+
if (!AuthenticateUser(client)) return;
40+
41+
switch (responseId)
42+
{
43+
case 0x01:
44+
{
45+
client.TransitionToMap(600, new Position(13, 20));
46+
break;
47+
}
48+
case 0x02:
49+
{
50+
client.TransitionToMap(502, new Position(55, 63));
51+
break;
52+
}
53+
case 0x03:
54+
{
55+
client.TransitionToMap(3071, new Position(4, 13));
56+
break;
57+
}
58+
case 0x04:
59+
{
60+
client.TransitionToMap(6925, new Position(24, 14));
61+
break;
62+
}
63+
case 0x05:
64+
{
65+
client.TransitionToMap(4720, new Position(14, 19));
66+
break;
67+
}
68+
case 0x06:
69+
{
70+
client.TransitionToMap(542, new Position(14, 15));
71+
break;
72+
}
73+
case 0x07:
74+
{
75+
client.TransitionToMap(5232, new Position(5, 9));
76+
break;
77+
}
78+
}
79+
80+
client.CloseDialog();
81+
client.Aisling.SendAnimationNearby(199, null, client.Aisling.Serial);
82+
}
83+
84+
public override void OnGossip(WorldClient client, string message) { }
85+
}

0 commit comments

Comments
 (0)