Commit graph

10 commits

Author SHA1 Message Date
JJ
64e2a000bf
Add split() function to lua 2023-12-27 18:07:31 -05:00
Trust
02b2ce0229 Missed a few magic numbers 2023-08-15 12:32:41 -04: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
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
hg
aaada65cbf Add eq.seconds utility extension 2020-12-28 18:45:28 -05:00
Akkadius
653f9e9a31 PEQ halloween visuals 2020-10-24 23:28:18 -05:00
Trust
67e101202e [LUA] Added some helpers: Local Emote, GM Message, PlayerCheck, EXP Helper.
Local Emote:

This is a function to produce a local emote, using similar syntax to zone_emote from lua_general. Expected data types - locs: table in { x, y, z } format, color: int, radius: int, message: string.
Example: eq.local_emote({e.self:GetX(), e.self:GetY(), e.self:GetZ()}, 7, 70,"This is a Test");

GM_Message:

Send a message only to GM toggled characters (useful for debugging/monitoring). Expected data types - color: int, text: string
Example: eq.GM_Message(18,"ENCOUNTER LOADED");

PlayerCheck:

Check for players within a specified unit range. Expected data types - x: int, y: int, z:int, dist:int - Returns: Bool
Example: eq.PlayerCheck(e.self:GetX(), e.self:GetY(), e.self:GetZ(),30) then	--check if player is within 30 units

ExpHelper:
helper function to come up with appropriate XP rewards for quests
level -> level range to use from table
percent -> percent of exp at the level to give (default = 3)
range -> range of randomness (default = 1)
example: eq.ExpHelper(51, 5, 1) will return a random exp value between 4% and 6% (5% average, range of 1%) of experience required to level from 51 to 52
2020-05-09 00:13:46 +00:00
cream24
ac408f6217 more ikkinz flav 2017-10-25 07:10:01 -04:00
JJ
e66c190cdb Finzalizing. Hope this works... 2015-03-14 16:18:39 -04:00