Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SendGuildAppointmentData

From RoR Wiki
Revision as of 19:48, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Guild functions
Version: WAR 1.4.8

Sends a guild calendar command to the server: create, edit or delete an appointment, sign up or leave, or manage sign-ups.

SendGuildAppointmentData(action, appointmentID, guildID, memberID,
    startMonth, startDay, startYear, startHour, startMinute, startAMPM,
    endMonth, endDay, endYear, endHour, endMinute, endAMPM,
    title, description, shared, locked)

Arguments

action
number – What to do. The stock UI uses the constants in GuildWindowTabCalendar: 1 APPOINTMENT_ADD, 2 APPOINTMENT_EDIT, 3 APPOINTMENT_DELETE, 4 APPOINTMENT_SIGNUP, 5 APPOINTMENT_LEAVE, 6 APPOINTMENT_KICK, 7 APPOINTMENT_FLAG_ATTENDANCE.
appointmentID
number – Appointment id (8-bit). 0 when adding.
guildID
number – Guild id of the appointment. 0 when adding.
memberID
number – Character id of the member, for actions 6 and 7. 0 otherwise.
startMonth, startDay, startYear, startHour, startMinute
number – Start date and time in local time; startHour is 0–23.
startAMPM
number – Not used by the client.
endMonth, endDay, endYear, endHour, endMinute
number – End date and time in local time.
endAMPM
number – Not used by the client.
title
wstring – Event name.
description
wstring – Event description.
shared
boolean – true to share the event with the alliance.
locked
boolean – true to lock sign-ups.

Returns

Nothing.

Details

  • All 20 arguments must always be passed with the right types, even for actions that do not use them. The stock UI passes 0, L"" and false as fillers.
  • Actions 1 and 2 send the appointment with its start and end times, title, description and the two flags. The dates are converted to raw times using the computer's local time zone.
  • Action 3 deletes the appointment. Actions 4 and 5 sign the player up or remove the player. Actions 6 and 7 act on the member given by memberID.
  • Any other action value, such as the stock UI's APPOINTMENT_VIEW (8), sends nothing.
  • The client copies the title into a 30-character buffer and the description into a 100-character buffer.
  • If there is no player object, or the Lua state is not available, nothing happens.
  • The function needs at least 20 arguments and only reads the last 20. shared and locked must be real booleans.

Errors

None besides the generic Invalid Parameters message when an argument has the wrong type.

Example

Signing up for the selected appointment, from default/ea_guildwindow/source/guildwindowtabcalendar.lua (the remaining arguments are fillers):

SendGuildAppointmentData(
    GuildWindowTabCalendar.APPOINTMENT_SIGNUP,                          -- Param 0
    GuildWindowTabCalendar.appointmentListData[index].appointmentID,    -- Param 1
    GuildWindowTabCalendar.appointmentListData[index].guildID,          -- Param 2
    0,      -- Param 3
    0,      -- Param 4
    ...

Creating or editing an appointment, from the same file:

SendGuildAppointmentData(
    GuildWindowTabCalendar.Appointment_Mode,                -- Param 0
    appointmentID,  -- Param 1  AppointmentID
    guildID,        -- Param 2  GuildID
    0,              -- Param 3  MemberID
    ComboBoxGetSelectedMenuItem("GWCalendarNewAppointmentStartTimeMonthComboBox"),     -- Param 4 Start Month
    ...
    GWCalendarNewAppointmentEventNameEditBox.Text,                                     -- Param 16 The name of the event
    GWCalendarNewAppointmentDescriptionEditBox.Text,                                   -- Param 17 Event Description
    ButtonGetPressedFlag("GWCalendarNewAppointmentShareCheckBox"),                     -- Param 18 True if event is shared with alliances
    ButtonGetPressedFlag("GWCalendarNewAppointmentLockSignupCheckBox")                 -- Param 19 True if signups are locked
)

See also