Include using:
`local json = require("json");`
- function json.encode(obj) encodes Lua value to JSON, returns JSON as string.
- function json.decode(s, pos) decodes JSON, returns the decoded result as Lua value
The return_data table is being used by table.concat to join a string of
returned items. Since accepted trade items were not being set in this
table, it left gaps so the array part was only valid to the first
accepted item slot.
This caused two issues:
- Depending on the gaps in the return item table, concat could error
which would halt any event_trade that used it. For example if an
item was accepted in slot 1 (t[1] nil) with a returned item in t[2],
concat errored: `invalid value (nil) at index 1 in table for 'concat'`.
Since this error only occurs with some gaps, it may be an edge case
with lua 5.1 that was fixed in later versions.
- Any returned items that were traded in slots after the first accepted
trade slot were not added to the returned item string for player events
Mission npcs will no longer offer nest missions until the server content
flag is enabled by the server's first Yar`Lir's death. This doesn't
include nest missions that already require t5 flags since those shouldn't
be possible to obtain without Yar`Lir having been killed.
This was built based on the perl version of the plugin. Where Perl rand(int) will return a 0 to int if positive or return -int to 0 if int is negative.
Lua math.random requires two arguments for a range.
Add 'Spider's Eye'
Add 'Web of Lies'
Add 'Lost Comrades'
Add 'Rivals'
Add 'Clues'
Add 'Circle of Drakes' raid
Fix 'Rampaging Monolith' script name and add size change for hp events
Add 'Rival Party' mission item drop workaround
Database had wrong drop rates for the mission item
Add 'Dragon's Egg' mission item drop workaround
Database had wrong drop rates for the mission item
Add 'Scrap Metal' mission drop workaround
Database had wrong drop rates for the mission item
This will make the Lua items module and Perl check_handin plugin not
return items consumed by source task delivery updates when source is
patched to restore sending delivered task items in EVENT_TRADE.
Note the trade plugins do not handle item stacks so if a trade slot is
consumed by a plugin check, any extra items in the stack will not be
returned even if not all were used by a task update.
This takes a min and max in copper and returns
Example (context, in event_trade):
-- random amount of cash between 5 copper and 1 plat, 5 gold
local cp, sp, gp, pp = eq.RandomCash(5, 1500);
e.other:QuestReward(e.self, {
copper = cp,
silver = sp,
gold = gp,
platinum = pp
});
Add missing dialogue from live and use correct range/message type
Remove proximity enter messages, these don't occur on live
Replace qglobal lockouts with expedition system lockouts
Keeps existing mpg_helper stuff because it affects AA and CoA flags
Add compass, safereturn, and zone-in from live
Fix a nil check in adaptation script
GetGroupMemberCount gets client's group count even inside raids
DoesAnyPartyMemberHaveLockout returns whether any member in client's
group or raid (or self if solo) has the specified lockout
These methods are required for GoD expedition requests