Travelling Merchant's Shop/Details

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to navigation Jump to search

The merchant has three changing slots, plus the one unchanging slot containing the green uncharted island map. The three slots are named slot A, B, and C in this page.

Cycle start time[edit | edit source]

The cycle start time for this page is defined as 11 March 2018, primarily due to non-understanding of the merchant in first week following release, giving unreliable data (the merchant was released on 5 March). This is 1407 days ago.

Slot A and B[edit | edit source]

Slot A and B both follow a simple, regular pattern of items that loop every 120 days. The same 18 items are available for these slots.

The order of items is as follows. Today (16 January 2022 UTC) we are on number 88 (wrong?).

Slot C[edit | edit source]

Slot C is more involved than A and B. Slot C has 13 items sold in it and rotates every 40 days. However, in each 40-day cycle only 12 of the items are available - one of the items simply won't appear at all for those 40 days. At the end of the cycle the 12 items rotate and the cycle begins again.

The 40-day cycle is always the same order of items. If the 12 items present are given an identifier from 1 to 12, the order is:

Item order (IDs)
DayItem order ID DayItem order ID

The initial cycle had the items assigned to the IDs in this order:

Item initial order
Item order IDItem map IDItem map name
11Dragonkin lamp
33Deathtouched dart
47Crystal triskelion
54Menaphite gift offering (large)
611Dungeoneering Wildcard
710Unfocused reward enhancer
813Distraction & Diversion reset token (monthly)
912Harmonic dust
102Distraction & Diversion reset token (weekly)
119Message in a bottle (Deep Sea Fishing)
125Starved ancient effigy
136Large goebie burial charm

At the end of the 40-day cycle, the 12 IDs move to the next item in the following list, cycling back to the start from the end if necessary.

Item map
Item map IDItem
1Dragonkin lamp
2Distraction & Diversion reset token (weekly)
3Deathtouched dart
4Menaphite gift offering (large)
5Starved ancient effigy
6Large goebie burial charm
7Crystal triskelion
9Message in a bottle (Deep Sea Fishing)
10Unfocused reward enhancer
11Dungeoneering Wildcard
12Harmonic dust
13Distraction & Diversion reset token (monthly)

The first cycle begins with item order IDs 1,1,2,1,3 which correspond to item map IDs 1,1,8,1,3 which are dragonkin lamp, D&D weekly, and deathtouch dart. 40 days later the items rotate to the next in the item map list, so now the order IDs at the beginning of the cycle (1,1,2,1,3) now correspond to map IDs 2,2,9,2,4 which are D&D weekly, message in a bottle, and large gift offering.


Today (16 January 2022 UTC) we are position 8 of cycle 35 (where 0 is the initial cycle on 11 March 2018) (wrong?).

This means that the items in the initial order (second table) are moved down by 9 positions in the item mapping (third table). For example, item order ID 4 is initially item map ID 7 (trisk); in the current cycle it has moved to item map id 3 (dart).

The current mapping of order IDs to items is:

Item current order
Item order IDItem map IDItem map name
110Unfocused reward enhancer
24Menaphite gift offering (large)
312Harmonic dust
43Deathtouched dart
513Distraction & Diversion reset token (monthly)
67Crystal triskelion
76Large goebie burial charm
89Message in a bottle (Deep Sea Fishing)
1011Dungeoneering Wildcard
115Starved ancient effigy
121Dragonkin lamp
132Distraction & Diversion reset token (weekly)

Programatically[edit | edit source]

In the following pseudocode, the variables used are:

  • rotation_order: the 40-day cycle (first table as a list of ids)
  • inital_ids: the initial state of the IDs (second table, as an id to id mapping)
  • items: the item order after each 40-day cycle (third table as an id to string mapping)
// number of 40-day periods elapsed since 11 March 2018
rotation_40 = floor(( - 11 March 2018 UTC)) / (60 * 60 * 24 * 40))

// number of days elapsed since start of this 40-day cycle
rotation_daily = floor(( - 11 March 2018 UTC)) / (60 * 60 * 24)) % 40

// the ID of the current item
current_item_id = rotation_order[rotation_daily]

// map the current item id to the item order id
mapped_id = inital_ids[current_item_id]

// move the mapped id according to current rotation
// 13 = total number of items in item_cycle
output_item_id = (mapped_id + rotation_40 % 13) + 1

// return the name of the item
return item_cycle[output_item_id]

Wiki implementation[edit | edit source]

For the wiki's implementation of this, see Module:Rotations/Merchant. For the original derivation see Talk:Travelling Merchant's Shop and Module talk:Rotations/Merchant.