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
});
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