local bless = {1, 2, 3, 4, 5}
local AMULET_ID = 2173
function onPrepareDeath(cid)
if getPlayerSlotItem(cid, 2).itemid == AMULET_ID then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerSendTextMessage(cid,24, "Your amulet of loss gave you blessings.")
doSendMagicEffect(getPlayerPosition(cid), 28)
end
return TRUE
end
Lua:local bless = {1, 2, 3, 4, 5} local amulet_id = 2173 function onpreparedeath(cid) if getplayerslotitem(cid, 2).itemid == amulet_id then for i = 1, table.maxn(bless) do doplayeraddblessing(cid, bless[i]) end doplayersendtextmessage(cid,24, "your amulet of loss gave you blessings.") dosendmagiceffect(getplayerposition(cid), 28) end return true end
<event type="preparedeath" name="Bless" event="script" value="blessaol.lua"/>
registerCreatureEvent(cid, "Bless")
Lua:local bless = {1, 2, 3, 4, 5} local AMULET_ID = 2173 function onPrepareDeath(cid) if getPlayerSlotItem(cid, 2).itemid == AMULET_ID then for i = 1, table.maxn(bless) do doPlayerAddBlessing(cid, bless[i]) end doPlayerSendTextMessage(cid,24, "Your amulet of loss gave you blessings.") doSendMagicEffect(getPlayerPosition(cid), 28) end return TRUE end
Last Packet Types: 180 134 109 109 180 131 106 108 140 160
Last Packet: 109 093 000 117 000 007 002 094 000 117 000 007 134 175 006 000
Player Position: [95,117,7]
Player Name: Test Sorc (xxxxxxxxx)
Player Action: 049 050 055 046 048 046 048 046 049 058 055 049 055 050
Player.cpp 343: exception occurred, reason:
Network.cpp 979: exception occurred (ErrorCode = 0), reason:
Control.cpp 1496: exception occurred (Type = 180) (MainWindow = 58683720), reason:
Communication.cpp 3641: exception occurred (ChatMessageMode = 24), reason:
Network.cpp 515: exception occurred (MaxLength = 4096), reason:
Utils.cpp 548: assertion failed (Position = 40) (Size-Length = -25689), reason:
Position<=Size-Length
MESSAGE_STATUS_CONSOLE_BLUE = 4
MESSAGE_STATUS_CONSOLE_RED = 12
MESSAGE_STATUS_DEFAULT = 16
MESSAGE_STATUS_WARNING = 17
MESSAGE_EVENT_ADVANCE = 18
MESSAGE_STATUS_SMALL = 19
MESSAGE_INFO_DESCR = 20
MESSAGE_EVENT_DEFAULT = 28
MESSAGE_EVENT_ORANGE = 34
MESSAGE_STATUS_CONSOLE_ORANGE = 35