Commit b0ec8b12 authored by JoyJ's avatar JoyJ

update dice roll

parent 39b3602a
.vs/ProjectSettings.json
.vs/slnx.sqlite
.vs/VSWorkspaceState.json
.vs/DC_Server/v16/.suo
......@@ -30,6 +30,23 @@ ygopro.ctos_follow_before('CHAT', true, function(buffer, info, client, server, d
}
var message = client.name + "投掷" + dicenum + "d" + dicemax + "并掷出了" + result + "";
log.warn(message);
ygopro.stoc_send_chat_to_room(room, message, ygopro.constants.COLORS.YELLOW);
if (client.roll == undefined)
{
if (dicenum == 1 || dicemax == 100)
{
client.roll = result;
ygopro.stoc_send_chat_to_room(room, message, ygopro.constants.COLORS.YELLOW);
}
else
{
ygopro.stoc_send_chat_to_room(room, message, ygopro.constants.COLORS.LIGHTBLUE);
}
}
else
{
ygopro.stoc_send_chat_to_room(room, message, ygopro.constants.COLORS.LIGHTBLUE);
message = client.name + "在本房间内的首次1d100投掷为" + client.roll + "";
ygopro.stoc_send_chat_to_room(room, message, ygopro.constants.COLORS.LIGHTBLUE);
}
return true;
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment