Trigger Reference of GS2-Guild Script

Reference for event triggers that call extended scripts, as defined in GS2-Guild

createGuild

Event trigger to call GS2-Script before Create guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild

Result

TypeRequireDefaultLimitationDescription
permitboolAllow creating guild

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild

result = {
  permit=permit
}

createGuildDone

GS2-Script called after Create guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild

result = {
}

updateGuild

Event trigger to call GS2-Script before Update guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
oldGuildGuildGuild before update
newGuildGuildGuild after update

Result

TypeRequireDefaultLimitationDescription
permitboolAllow update guild

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
oldGuild = args.oldGuild
newGuild = args.newGuild

result = {
  permit=permit
}

updateGuildDone

GS2-Script called after Update guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
oldGuildGuildGuild before update
newGuildGuildGuild after update

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
oldGuild = args.oldGuild
newGuild = args.newGuild

result = {
}

joinGuild

Event trigger to call GS2-Script before Join guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription
permitboolAllow join guild

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId

result = {
  permit=permit
}

joinGuildDone

GS2-Script called after Join guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId

result = {
}

leaveGuild

Event trigger to call GS2-Script before Leave guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription
permitboolAllow leave guild

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId

result = {
  permit=permit
}

leaveGuildDone

GS2-Script called after Leave guild.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild
userIdstringUser ID

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
userId = args.userId

result = {
}

changeRole

Event trigger to call GS2-Script before Change role.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild
oldMembersMember[]Old Member Information
newMembersMember[]New Member Information

Result

TypeRequireDefaultLimitationDescription
permitboolAllow change role

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
oldMembers = args.oldMembers
newMembers = args.newMembers

result = {
  permit=permit
}

changeRoleDone

GS2-Script called after Change role.

Request

TypeDescription
namespaceNamespaceNamespace
guildModelGuildModelGuild Model
guildGuildGuild
oldMembersMember[]Old Member Information
newMembersMember[]New Member Information

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
guildModel = args.guildModel
guild = args.guild
oldMembers = args.oldMembers
newMembers = args.newMembers

result = {
}