Skip to content
Snippets Groups Projects
Commit a0599a35 authored by DarkGod's avatar DarkGod
Browse files

mwawawawawa

parent 288f1a47
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ function _M:sendObjectLink(o)
local name = o:getName{do_color=true}:removeUIDCodes()
local desc = tostring(o:getDesc(nil, nil, true)):removeUIDCodes()
local ser = zlib.compress(table.serialize{kind="object-link", name=name, desc=desc})
core.profile.pushOrder(string.format("o='ChatSerialData' channel=%q msg=%q", self.chat.cur_channel, ser))
core.profile.pushOrder(string.format("o='ChatSerialData' kind='object-link' channel=%q msg=%q", self.chat.cur_channel, ser))
end
function _M:sendActorLink(m)
......@@ -45,14 +45,14 @@ function _M:sendActorLink(m)
local desc = tostring(m:tooltip(m.x, m.y, game.player) or "???"):removeUIDCodes()
if not desc then return end
local ser = zlib.compress(table.serialize{kind="actor-link", name=name, desc=desc})
core.profile.pushOrder(string.format("o='ChatSerialData' channel=%q msg=%q", self.chat.cur_channel, ser))
core.profile.pushOrder(string.format("o='ChatSerialData' kind='actor-link' channel=%q msg=%q", self.chat.cur_channel, ser))
end
function _M:sendKillerLink(msg, src)
function _M:sendKillerLink(msg, short_msg, src)
local desc = nil
if src.tooltip then desc = tostring(src:tooltip(src.x, src.y, game.player) or "???"):removeUIDCodes() end
local ser = zlib.compress(table.serialize{kind="killer-link", msg=msg, desc=desc})
core.profile.pushOrder(string.format("o='ChatSerialData' channel=%q msg=%q", self.chat.cur_channel, ser))
local ser = zlib.compress(table.serialize{kind="killer-link", msg=msg, short_msg=short_msg, desc=desc})
core.profile.pushOrder(string.format("o='ChatSerialData' kind='killer-link' channel=%q msg=%q", self.chat.cur_channel, ser))
end
-- Receive a custom event
......
......@@ -79,9 +79,10 @@ function _M:onPartyDeath(src, death_note)
end
end
local msg
local msg, short_msg
if not death_note.special_death_msg then
msg = "%s the level %d %s %s was %s to death by %s%s%s on level %s of %s."
short_msg = "%s(%d %s %s) was %s to death by %s%s on %s %s."
local srcname = src.unique and src.name or src.name:a_an()
local killermsg = (src.killer_message and " "..src.killer_message or ""):gsub("#sex#", game.player.female and "her" or "him")
if src.name == game.player.name then
......@@ -104,19 +105,32 @@ function _M:onPartyDeath(src, death_note)
killermsg,
game.level.level, game.zone.name
)
short_msg = short_msg:format(
game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(),
death_mean or "battered",
srcname,
killermsg,
game.zone.name, game.level.level
)
else
msg = "%s the level %d %s %s %s on level %s of %s."
short_msg = "%s(%d %s %s) %s on %s %s."
msg = msg:format(
game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(),
death_note.special_death_msg,
game.level.level, game.zone.name
)
short_msg = short_msg:format(
game.player.name, game.player.level, game.player.descriptor.subrace:lower(), game.player.descriptor.subclass:lower(),
death_note.special_death_msg,
game.zone.name, game.level.level
)
end
game:playSound("actions/death")
game.delayed_death_message = "#{bold}#"..msg.."#{normal}#"
if (not game.player.easy_mode_lifes or game.player.easy_mode_lifes <= 0) and not game.player.infinite_lifes then
profile.chat.uc_ext:sendKillerLink(msg, src)
profile.chat.uc_ext:sendKillerLink(msg, short_msg, src)
end
end
end
......@@ -510,7 +510,7 @@ function _M:orderChatAchievement(o)
end
function _M:orderChatSerialData(o)
self:command("SERZ", o.channel, o.msg:len())
self:command("SERZ", o.channel, o.msg:len(), o.kind or "generic")
if not self:read("200") then return end
self.sock:send(o.msg)
end
......
......@@ -12,17 +12,17 @@
* kryl'feijan update: can join up with the demon/acolytes => fight a group of adventurer
* boss spell: lightning that follow slowly
* "male melinda", he lives in derth, picked up a strange rune in the old forest and it embeded on him. he stumbled upon some extremist
ziguranth that mobbed him and will burn him when the player arrives. she can join them or rescue him. later he is back in derth and a potential
love interrest. There must be a way of getting his rune off to use it
* boss spell: CORRUPETD GROUND => move to destack
* porting to gl es and mobiles. suslik canhelp .
* better shadows?
* boss spell: lightning that follow slowly
* boss spell: CORRUPETD GROUND => move to destack
* mob/boss taht changes form during fight like in D3/a5
* steal some features of dungeonmans academy: "unknown loot" that can only be revealed by the next character
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment