mirror of
https://github.com/emagi/eq2emu
synced 2026-08-12 18:23:04 -04:00
1.2 KiB
1.2 KiB
Function: Say(spawn, message, player, dist, language)
Description: Sends a Say message from the Spawn to the general area based on distance, or otherwise to a specific Player if specified, otherwise optional/nil.
Parameters:
spawn(Spawn) - Spawn object representingspawn.message(string) - Stringmessage.player(Spawn) - Spawn object representingplayer.dist(int32) - Integer valuedist.language(int32) - Integer valuelanguage.
Returns: None.
Example:
-- From ItemScripts/DrawingRay.lua
function used(Item, Player)
quest = GetQuest(Player, CAVES_CONSUL_BREE_QUEST_3)
--Say(Player, "RAY HAS BEEN USED")
if HasQuest(Player, CAVES_CONSUL_BREE_QUEST_3) then
spawn = GetTarget(Player)
-- Say(Player, "PLAYER HAS QUEST")
if spawn ~= nil then
--Say(Player, "SPAWN IS NOT NIL")
-- river behemoth remains
if GetSpawnID(spawn) == RIVER_BEHEMOTH_REMAINS_ID then
CastSpell(Player, 5104, 1)
GiveQuestItem(quest, Player, "", RIVER_STONE_ID)
-- Say(Player, "ITEM OBTAINED")
else
SendMessage(Player, "The Drawing Ray has no effect. Emma said it must be used on the remains of a river behemoth.")
end