1+ (*
2+ # Emotes
3+ Methods to interact with the emotes gametab.
4+
5+ TODO:
6+ ```{figure} ../../images/emotes.png
7+ ```
8+ *)
19{$DEFINE WL_EMOTES_INCLUDED}
210{$INCLUDE_ONCE WaspLib/osrs.simba}
311
4- const
5- ERSEmoteUpText: TStringArray =[
6- 'Yes','No','Bow','Angry',
7- 'Think','Wave','Shrug','Cheer',
8- 'Beckon','Laugh','Jump for Joy','Yawn',
9- 'Dance','Jig','Spin','Headbang',
10- 'Cry','Blow Kiss','Panic','Raspberry',
11- 'Clap','Salute','Goblin Bow','Goblin Salute',
12- 'Glass Box','Climb Rope','Lean','Glass Wall',
13- 'Idea','Stamp','Flap','Slap Head',
14- 'Zombie Walk','Zombie Dance','Scared','Rabbit Hop',
15- 'Sit up','Push up','Star jump','Jog',
16- 'Flex','Zombie Hand','Hypermobile Drinker','Skill Cape',
17- 'Air Guitar','Uri transform','Smooth dance','Crazy dance',
18- 'Premier Shield','Explore','Relic unlock','Party',
19- 'Trick','Fortis Salute','Sit down','Crab dance'
20- ];
21-
2212type
13+ (*
14+ ## TRSEmotes
15+ Main record responsible with handling the emotes gametab.
16+ *)
2317 TRSEmotes = record
2418 Scroll: TRSScrollBar;
2519 Slots: TBoxArray;
2620 end;
2721
28- ERSEmote = (
22+ (*
23+ ## ERSEmote
24+ ```pascal
25+ ERSEmote = enum(YES, NO, BOW, ANGRY, ..., FORTIS_SALUTE, SIT_DOWN, CRAB_DANCE);
26+ ```
27+ Enum representing all the available emotes in the game.
28+ *)
29+ ERSEmote = enum(
2930 YES, NO, BOW, ANGRY,
3031 THINK, WAVE, SHRUG, CHEER,
3132 BECKON, LAUGH, JUMP_FOR_JOY, YAWN,
@@ -108,6 +109,23 @@ WriteLn Emotes.UseEmote(ERSEmote.DANCE);
108109```
109110*)
110111function TRSEmotes.UseEmote(emote: ERSEmote): Boolean;
112+ const
113+ EMOTE_NAMES: TStringArray =[
114+ 'Yes','No','Bow','Angry',
115+ 'Think','Wave','Shrug','Cheer',
116+ 'Beckon','Laugh','Jump for Joy','Yawn',
117+ 'Dance','Jig','Spin','Headbang',
118+ 'Cry','Blow Kiss','Panic','Raspberry',
119+ 'Clap','Salute','Goblin Bow','Goblin Salute',
120+ 'Glass Box','Climb Rope','Lean','Glass Wall',
121+ 'Idea','Stamp','Flap','Slap Head',
122+ 'Zombie Walk','Zombie Dance','Scared','Rabbit Hop',
123+ 'Sit up','Push up','Star jump','Jog',
124+ 'Flex','Zombie Hand','Hypermobile Drinker','Skill Cape',
125+ 'Air Guitar','Uri transform','Smooth dance','Crazy dance',
126+ 'Premier Shield','Explore','Relic unlock','Party',
127+ 'Trick','Fortis Salute','Sit down','Crab dance'
128+ ];
111129var
112130 scrollLevel: Integer;
113131 box: TBox;
@@ -117,7 +135,7 @@ begin
117135 Result := False;
118136 if not Self.Open() then Exit;
119137
120- upText := ERSEmoteUpText [emote];
138+ upText := EMOTE_NAMES [emote];
121139 if upText = '' then Exit;
122140
123141 scrollLevel := Round((Ord(emote) div 4) / 13.0 * 100);
@@ -153,4 +171,8 @@ begin
153171end;
154172
155173var
174+ (*
175+ ## Emotes variable
176+ Global {ref}`TRSEmotes` variable.
177+ *)
156178 Emotes: TRSEmotes;
0 commit comments