Register for your free account! | Forgot your password?

You last visited: Today at 09:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[QUERY] Create Instance / Dungeons

Discussion on [QUERY] Create Instance / Dungeons within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,055
Received Thanks: 1,643
[QUERY] Create Instance / Dungeons

I rarely ever release shit. But hey, let's see how you guys make this work

It's pretty simple actually and doesn't require much knowledge or work, however, it's still something that almost nobody can do properly.

Wrote this query when I was being lazy and didnt wanna do shit. I never tested it and never completed it.. BUT its gives you the basic idea of how dungeons and instances work.

Just so you know, the query probably doesnt work since I was under heavy alcohol abuse when i wrote it. Just read it and undnerstand what you gotta do.. then inser the needed lines and your done. It's pretty easy to do, but all the arabs are gonna fail. When you do, please post. I love having a good laugh at people when they fail while having all the needed information at hand.

Special thanks to Snow*' by the way.

PHP Code:
CREATE PROCEDURE _RoyalCreateInstance
@Charname VARCHAR(32),
@
AreaName VARCHAR(32),
@
MaxWorlds INT,
@
MaxPlayers INT,
@
MinEntranceLevel TINYINT,
@
MaxEnterPerDay TINYINT,
@
HorseAllowed BIT,
@
JobAllowed BIT,
@
PetAllowed BIT
AS

BEGIN TRAN
BEGIN 
TRY

    DECLARE @
JobAllowedString VARCHAR(3) = CASE 
                                            
WHEN @JobAllowed 
                                                THEN 
'OFF'
                                            
ELSE 'ON'
                                           
END,
            @
PetAllowedString VARCHAR(3) = CASE
                                            
WHEN @PetAllowed 1
                                                THEN 
'OFF'
                                            
ELSE 'ON'
                                           
END,
            @
HorseAllowedString VARCHAR(3) = CASE
                                                
WHEN @HorseAllowed 1
                                                    THEN 
'OFF'
                                                
ELSE 'ON'
                                             
END,
            @
WorldID INT,
            @
RegionID INT,
            @
PosX REAL,
            @
PosY REAL,
            @
PosZ REAL;
            
    
SELECT    @RegionID LatestRegion,
            @
PosX PosX,
            @
PosY PosY,
            @
PosZ PosZ
    FROM    SRO_VT_SHARD
.._Char 
    WHERE    CharName16 
= @Charname
    
    
IF    @RegionID IS NULL
        BEGIN
            ROLLBACK TRAN
            RAISERROR 
('Charname not found'160)
            RETURN
        
END

    DELETE FROM     SRO_VT_SHARD
.._RefGame_World_Config WHERE GroupCodeName128 'GROUP_' + @AreaName
    INSERT INTO     SRO_VT_SHARD
.._RefGame_World_Config (ServiceGroupCodeName128ValueCodeName128ValueType)
    
VALUES        (1'GROUP' + @AreaName'GAME_WORLD_NORMALIZE_TYPE''GAME_WORLD_NORMALIZE_TYPE_A''STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_ENTRY''NUM_LIMIT''STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_PARTY''ON''STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_LEVEL_MINIMUM_NUM'CAST(@MinEntranceLevel AS VARCHAR(5)), 'INT32'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_ENTRY_MAXIMUM_NUM'CAST(@MaxEnterPerDay AS VARCHAR(5)), 'INT32'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_REENTRY''ON''STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_JOB_CLOTHES_TAKE_OFF', @JobAllowedString'STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_RIDE_COS_NOT_RIDING', @HorseAllowed'STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_TRADE_COS_NOT_RIDING', @PetAllowedString'STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_GAME_WORLD_ASSIGNED''ON''STRING'),
                (
1'GROUP' + @AreaName'PARTYMONSTER_SPAWN''OFF''STRING'),
                (
1'GROUP' + @AreaName'ENTER_LIMIT_CONDITION_FRPVP_VOUCHER_TAKE_OFF''ON''STRING'),
                (
1'GROUP' + @AreaName'REF_GAME_WORLD_NPC''INS_' + @AreaName'STRING')

    IF 
EXISTS(SELECT FROM SRO_VT_SHARD.._RefGame_World WHERE WorldCodeName128 'INS_' + @AreaName)
        
BEGIN
            UPDATE    SRO_VT_SHARD
.._RefGame_World 
            SET        Type 
1
                    
WorldMaxCount = @MaxWorlds
                    
WorldMaxUserCount = @MaxPlayers
                    
WorldDurationTime 7200000
                    
WorldEmptyRemainTime 300000 
            WHERE    WorldCodeName128 
'INS_' + @AreaName
        END
    
ELSE IF NOT EXISTS(SELECT FROM SRO_VT_SHARD.._RefGame_World WHERE WorldCodeName128 'INS_' + @AreaName)
        
BEGIN
            INSERT INTO SRO_VT_SHARD
.._RefGame_World (WorldCodeName128TypeWorldMaxCountWorldMaxUserCountWorldEntryTypeWorldEntranceTypeWorldLeaveTypeWorldDurationTimeWorldEmptyRemainTimeConfigGroupCodeName128)
            
SELECT        'INS_' + @AreaName1, @MaxWorlds, @MaxPlayers0007200000300000'GROUP_' + @AreaName    
        END
        
    
IF EXISTS(SELECT FROM SRO_VT_SHARD.._RefTeleport WHERE CodeName128 LIKE 'GATE_' + @AreaName)
        
BEGIN
            UPDATE    SRO_VT_SHARD
.._RefTeleport
            SET        GenWorldID 
= @WorldID
            WHERE    CodeName128 LIKE 
'GATE_' + @AreaName
            
            SELECT    Service
IDCodeName128AssocRefObjCodeName128AssocRefObjIDZoneName128GenRegionIDGenPos_XGenPos_YGenPos_ZGenAreaRadiusCanBeResurrectPosCanGotoResurrectPosGenWorldID
            FROM    SRO_VT_SHARD
.._RefTeleport
            WHERE    CodeName128 LIKE 
'GATE_' + @AreaName
        END
    
ELSE
        
BEGIN
            SELECT 
'Could''t find _RefTeleport line, after you''ve create a teleporter run the following query: '
            
SELECT 'UPDATE _RefTeleport SET GenWorldID = @WorldID WHERE CodeName128 LIKE ''PORTERNAMEHERE'' '
        
END
    
    SELECT        
*, '''OLD LINES!!! @_RefInstance_World_Region'
    
FROM        SRO_VT_SHARD.._RefInstance_World_Region
    WHERE        RegionID 
= @RegionID
    
    DELETE FROM    SRO_VT_SHARD
.._RefInstance_World_Region WHERE RegionID = @RegionID
    INSERT INTO SRO_VT_SHARD
.._RefInstance_World_Region (WorldIDRegionID)
    
VALUES        (1, @RegionID),
                (@
WorldID, @RegionID)
                
    
SELECT        'Old lines at _RefInstance_World_Region have been deleted'
    
    
SELECT        *, '''OLD LINES!!! @_RefInstance_World_Start_Pos & new ones added'
    
FROM        SRO_VT_SHARD.._RefInstance_World_Start_Pos
    WHERE        RegionID 
= @RegionID
    
    DELETE FROM    SRO_VT_SHARD
.._RefInstance_World_Start_Pos
    INSERT INTO SRO_VT_SHARD
.._RefInstance_World_Start_Pos (WorldIDRegionIDPosXPosYPosZParam)
    
SELECT        @WorldID, @RegionID, @PosX, @PosY, @PosZ0
    
    SELECT        
'Old lines at _RefInstance_World_Start_Pos have been deleted & new ones added'
    
    
END TRY

BEGIN CATCH
    DECLARE        @
ErMessage NVARCHAR(2048) = 'Error occured at RefGameWorld Update/Insert | ERR MSG: ' ERROR_MESSAGE(),
                @
ErSeverity INT ERROR_SEVERITY(),
                @
ErState INT ERROR_STATE();
    
RAISERROR    (@ErMessage, @ErSeverity, @ErState)
    
ROLLBACK TRAN
    
RETURN
    
END CATCH

COMMIT TRAN 
Royalblade* is offline  
Thanks
14 Users
Old 10/22/2014, 07:06   #2
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,310
Received Thanks: 6,470
#Approved
PortalDark is offline  
Old 10/22/2014, 07:39   #3
 
Mr.gotsha's Avatar
 
elite*gold: 0
Join Date: Feb 2013
Posts: 84
Received Thanks: 15
if you tell me more explain it will be better because i don't know this PROCEDURE what he do ?
Mr.gotsha is offline  
Old 10/22/2014, 10:47   #4
 
D1nt3's Avatar
 
elite*gold: 10
Join Date: Jun 2014
Posts: 624
Received Thanks: 66
Quote:
Originally Posted by Mr.gotsha View Post
if you tell me more explain it will be better because i don't know this PROCEDURE what he do ?
he do? read the query to know pretty easy
D1nt3 is offline  
Old 10/22/2014, 15:52   #5
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,429
It's completely fine now since I can make triggers ^_^ thanks for the credits tho
Snow* is offline  
Thanks
1 User
Old 10/23/2014, 03:32   #6
 
where_love2003's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 190
Received Thanks: 27
Nice one +1
where_love2003 is offline  
Old 10/24/2014, 20:21   #7
 
karemsa's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 268
Received Thanks: 41
Good job.
karemsa is offline  
Old 02/02/2015, 23:56   #8
 
elite*gold: 0
Join Date: Feb 2015
Posts: 4
Received Thanks: 0
I'm arabian and i didn't fail when i tried to do it thanks anyway xD worked well ^^
DrugAddict is offline  
Old 02/03/2015, 00:01   #9


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by DrugAddict View Post
I'm arabian and i didn't fail when i tried to do it thanks anyway xD worked well ^^
Heard of sarcasm? DUHH
​Exo is offline  
Old 02/03/2015, 18:45   #10
 
Storxy_'s Avatar
 
elite*gold: 0
Join Date: Oct 2014
Posts: 204
Received Thanks: 404
Quote:
Originally Posted by Mr.gotsha View Post
if you tell me more explain it will be better because i don't know this PROCEDURE what he do ?
i think you should help yourself better than ask about ready things.
Storxy_ is offline  
Thanks
2 Users
Old 02/04/2015, 01:33   #11

 
TheRunner's Avatar
 
elite*gold: 50
Join Date: Jan 2015
Posts: 813
Received Thanks: 237
Thanks Very Much it's really useful to me thank u
TheRunner is offline  
Old 02/04/2015, 01:44   #12


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
People lying about getting this to work..
I love it ^^
​Exo is offline  
Old 02/04/2015, 02:36   #13
 
Snow*'s Avatar
 
elite*gold: 1
Join Date: Nov 2011
Posts: 2,532
Received Thanks: 1,429
Just reading this give you enough information to create both instances/triggers.
Snow* is offline  
Old 02/04/2015, 15:20   #14
 
elite*gold: 0
Join Date: Dec 2014
Posts: 134
Received Thanks: 68
thanks, useful
Memoirs is offline  
Old 02/04/2015, 19:10   #15
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 677
Received Thanks: 29
How it works?
ILowe is offline  
Reply


Similar Threads Similar Threads
[SQL] Query to create HwanLevels in 3 seconds
04/29/2013 - SRO PServer Guides & Releases - 3 Replies
so i made this quickly cuz i had to make some zerk levels. its done pretty badly actually xD however it works (it has a shitload of unnessesary code but who gives a shit) Declare @1 varchar(max) declare @2 varchar(max) declare @3 varchar(max) declare @4 varchar(max) declare @5 int
[Question]How to create memver for array of class instance
10/19/2012 - C/C++ - 9 Replies
Hey, i dont know how do search in google for this question so i decided to ask it here. I am trying to do something like that. class A { private: int variable; };
Hidden Dungeons + Instance problem
07/22/2012 - Rappelz Private Server - 13 Replies
Hello everyone I have a problem with the hidden dungeons and the instance(cubric+volc) when i enter the hidden dungeon everything is fine all the mobs are good the boss are there , but i can use all the feathers + when i dc i stay there! and the instance i cant use fethears but when i dc i stay ther I've checked my 7.4 Newmaps and they're working 100% with the 7.3 gameserver but not with 7.4 :mad:
Sql query for create character got lv 170
02/04/2012 - Dekaron Private Server - 21 Replies
stop saying nonsense words to me , i need help with sql query of create new character and login game got lv 170 .



All times are GMT +2. The time now is 09:05.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.