Commit graph

106 commits

Author SHA1 Message Date
Chris Miles
359471eb8e
[Handin] Item handin overhaul (#1403)
* [Handin] Item handin overhaul

* Update items.lua

* No-op guild tome hand-in

* swap methods
2025-02-03 16:52:51 -06:00
Trust
ee73ee8ecf [Tooling] Add JSON encode/decode module to lua
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
2024-08-15 18:52:11 -04:00
Chris Miles
f5d4c2bfb5 [Performance] Use HasItemOnCorpse in hasitem plugins 2024-02-24 01:26:54 -06:00
Trust
54b6d79c87 [Cleanup] Butcher Updates 2024-01-01 20:19:05 -05:00
JJ
64e2a000bf
Add split() function to lua 2023-12-27 18:07:31 -05:00
hg
2600236b26 Fix returned item data in items module
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
2023-09-27 21:49:51 -04:00
hg
78fce046be Fix DoN flag check for t2 spell rewards 2023-08-23 18:26:52 -04:00
hg
71ad423666 Add support for unlocking accursed nest
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.
2023-08-20 22:20:32 -04:00
Trust
c6aad8b22c Merge branch 'master' into omens_trials_updates 2023-08-15 18:47:11 -04:00
Trust
b7eb6297d9 Merge branch 'master' into omens_trials_updates 2023-08-15 15:16:18 -04:00
Trust
02b2ce0229 Missed a few magic numbers 2023-08-15 12:32:41 -04:00
Trust
b143f729d6 Merge branch 'master' of github.com:ProjectEQ/projecteqquests into true_false_cleanup 2023-08-15 12:30:38 -04:00
Trust
9ee2a06772 Replace == bool and ~= bool 2023-08-15 11:39:43 -04:00
Trust
992aea65f9 GetClass() magic number cleanup 2023-08-15 08:14:30 -04:00
Trust
e605d8beb4 Magic Number cleanup - First pass 2023-08-13 17:16:42 -04:00
Trust
8320b3f33a Remove duplicate newz declaration 2023-08-11 20:52:03 -04:00
Trust
7e7d683d43 [Bug] Lua RandomRoam plugin corrections 2023-08-11 20:51:04 -04:00
Trust
0701cc52c2 [Bug] Resolve error with Lua RandomRoam
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.
2023-08-07 15:35:17 -04:00
Trust
09d2e5dad5 [Bug] Misc Bugfixes
Located via Streaming Error Logs
2023-08-06 22:39:24 -04:00
Trust
321cfd9b99 [Bugs] Misc Bug fixes
Located via streaming error logs
2023-08-06 22:37:01 -04:00
Chris Miles
9eb3e54fa7 Add #don teleport good|evil 2023-07-23 01:44:22 -05:00
hg
ff7b079d6d Change DoN faction id table keys
These are less verbose and keeps the api consistent
2023-07-22 20:19:44 -04:00
hg
6b107675eb Switch DoN flags to data buckets 2023-07-22 20:15:21 -04:00
hg
e8cce16727 Change DoN flag names
These are less complicated names and should be easier to remember
2023-07-22 20:12:10 -04:00
Trust
2561d4c5f6 [Revamp] MPG Trial Revamps
Updated trials to be closer to accurate timers, dz and mechanics.

Needs a few DB updated for subversion
2023-04-30 03:55:05 -04:00
Chris Miles
3b4776868c Fix lua items.lua is_attuned being nil 2023-02-17 03:38:31 -06:00
Chris Miles
99759d5f45
Merge pull request #1372 from ProjectEQ/akkadius-kingly/player-event-logging
[Handins] Player Event Logging
2023-02-12 21:35:00 -06:00
Xackery
629913d5da
Merge branch 'master' into xackery/getenv 2023-01-15 09:14:13 -08:00
Xackery Xtal
38e89c0ff0 Added os.getenv dummy 2023-01-15 09:12:47 -08:00
Chris Miles
0138baf57b Push up changes 2023-01-13 05:03:14 -06:00
Chris Miles
cfe0bd1320 Update items.lua 2023-01-12 19:32:57 -06:00
Chris Miles
1093a435c5 Push up changes 2023-01-12 19:31:11 -06:00
Alex King
aacabc8b01
[Lua] Add bot return and handin support.
Adds support for bot EVENT_TRADE item returns/handins, pending https://github.com/EQEmu/Server/pull/2560.
2022-11-25 14:16:41 -05:00
Chris Miles
ddee51e58a
Merge pull request #1354 from ProjectEQ/feat/don
Implement Dragons of Norrath
2022-11-20 17:08:52 -06:00
hg
0cb89cf7e5 Add thenest missions
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
2022-11-20 18:06:46 -05:00
hg
02f873a78b Add Norrath's Keepers progression missions
Refactor 'Sickness of the Spirit' tier 2 mission

Add 'History of the Isle' tier 3 mission

Add 'Origins of the Curse' tier 5 mission
2022-11-20 18:06:45 -05:00
hg
6c7ef153c0 Add #don command 2022-11-20 18:06:45 -05:00
hg
db6d23bd28 Implement DoN progression
Add dragons_of_norrath module to handle flagging and other common
functions used by both factions.

Add all dialogue and task ids to lavastorm DoN npcs
2022-11-20 18:06:45 -05:00
hg
919181db12 Check delivered task items in trade plugins
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.
2022-11-05 10:44:02 -04:00
Michael Cook (mackal)
9e0fc9e6c8 Add a helper for RandomCash for lua
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
    });
2022-10-04 15:17:50 -04:00
Michael Cook (mackal)
da87c41453 Add an ellipse module
Assuming the math here[1] is correct, it should work

This does need to be axis-aligned I'm pretty sure

[1] https://www.geeksforgeeks.org/check-if-a-point-is-inside-outside-or-on-the-ellipse/
2022-09-11 11:00:28 -04:00
Dencelle
4d433927e7
IsClass & IsRace added to client_ext in lua_modules
credits to ailia for the code, i'm just putting the PR in for them
2021-06-14 15:47:27 -05:00
Xackery Xtal
e7f16464b5 Added item comment lines 2021-02-07 20:50:01 -08:00
hg
c31477d2e6 Use zone version constants for ikkinz door flavor
Add door id lookup tables

Only group instances are verified for some of the messages
2020-12-28 18:48:54 -05:00
hg
b4c05d4877 Add instance versions for ikkinz group trials 2020-12-28 18:48:54 -05:00
hg
83253158f5 Add client ext method to get raid count in zone 2020-12-28 18:48:52 -05:00
hg
6bf3fcbdf4 Use dz for ingenuity/adaptation (realms-chamberse)
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
2020-12-28 18:48:49 -05:00
hg
1fe3de23fd Add utility client extension methods
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
2020-12-28 18:48:48 -05:00
hg
6fca07aa98 Add npc extension to return clients in proximity 2020-12-28 18:48:48 -05:00
hg
aaada65cbf Add eq.seconds utility extension 2020-12-28 18:45:28 -05:00