Cookies


Vsroplus only uses the cookies it needs to keep you signed in and remember your language. No ads, no tracking.

Got it

Need to learn more? Privacy policy

Our guides are in English for now.

Game Server Startup

By completing this guide, you should be able to trigger Game Server startup to function and build your own custom systems.

Stored Procedure: _OnGameserverStartup
Parameters:

@AssocServerID INT - Game Server ID

Let's spawn Tiger Girl unique to Jangan south gate using _Command_SpawnMonster to ensure that the trigger works fine for us.

USE [vPlus]
GO

/****** Object: StoredProcedure [dbo].[_OnGameserverStartup] Script Date: 1/18/2024 12:15:21 PM ******/

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:      <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================

ALTER PROCEDURE [dbo].[_OnGameserverStartup]
    @AssocServerID INT
AS
BEGIN
    SET NOCOUNT ON;

    /*
        This procedure is executed on Game Server startup.
    */

    --------- Your code starts here --------

    -- Checking the game server
    IF (
        @AssocServerID = (
            SELECT AssocServer
            FROM SRO_VT_SHARD.dbo._RefRegionBindAssocServer
            WHERE AreaName = 'China'
        )
    )
    BEGIN
        EXEC _Command_SpawnMonster 1954, 1, 24744, 1043, -12, 1246; -- Tiger Girl ref obj ID
    END
END

Last updated: 18 January, 2024

An error has occurred. This application may no longer respond until reloaded. Reload 🗙