Register for your free account! | Forgot your password?

You last visited: Today at 08:43

  • 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 02/04/2015, 22:41   #16


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Quote:
Originally Posted by ILowe View Post
How it works?
It does not but, it has all the needed information you need to make it work.

Try reading it xD
​Exo is offline  
Old 02/05/2015, 03:58   #17

 
Bocc1337's Avatar
 
elite*gold: 737
Join Date: Oct 2007
Posts: 730
Received Thanks: 133
Please enplane how to use this im having trouble with it..thx
Bocc1337 is offline  
Old 02/06/2015, 19:05   #18
 
ILowe's Avatar
 
elite*gold: 0
Join Date: Mar 2012
Posts: 679
Received Thanks: 29
Code:
exec dbo._RoyalCreateInstance 
@Charname='TEST', 
@AreaName='NEW_QUEST', 
@MaxWorlds='200', 
@MaxPlayers='200',
@MinEntranceLevel='110',
@MaxEnterPerDay='10',
@HorseAllowed='OFF'
error?
ILowe is offline  
Old 02/06/2015, 20:57   #19


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Quote:
Originally Posted by ILowe View Post
Code:
exec dbo._RoyalCreateInstance 
@Charname='TEST', 
@AreaName='NEW_QUEST', 
@MaxWorlds='200', 
@MaxPlayers='200',
@MinEntranceLevel='110',
@MaxEnterPerDay='10',
@HorseAllowed='OFF'
error?
Did you even read the data types?
PHP Code:
@Charname VARCHAR(32), 
@
AreaName VARCHAR(32), 
@
MaxWorlds INT
@
MaxPlayers INT
@
MinEntranceLevel TINYINT
@
MaxEnterPerDay TINYINT
@
HorseAllowed BIT
@
JobAllowed BIT
@
PetAllowed BIT 
​Exo is offline  
Old 02/09/2015, 18:38   #20

 
elite*gold: 27
Join Date: Jan 2015
Posts: 1,343
Received Thanks: 892
A little fix :
Quote:
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 = 1
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', 16, 0)
RETURN
END

DELETE FROM SRO_VT_SHARD.._RefGame_World_Config WHERE GroupCodeName128 = 'GROUP_' + @AreaName
INSERT INTO SRO_VT_SHARD.._RefGame_World_Config (Service, GroupCodeName128, ValueCodeName128, Value, Type)
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', @HorseAllowedString, '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 (WorldCodeName128, Type, WorldMaxCount, WorldMaxUserCount, WorldEntryType, WorldEntranceType, WorldLeaveType, WorldDurationTime, WorldEmptyRemainTime, ConfigGroupCodeName128)
SELECT 'INS_' + @AreaName, 1, @MaxWorlds, @MaxPlayers, 0, 0, 0, 7200000, 300000, '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, ID, CodeName128, AssocRefObjCodeName128, AssocRefObjID, ZoneName128, GenRegionID, GenPos_X, GenPos_Y, GenPos_Z, GenAreaRadius, CanBeResurrectPos, CanGotoResurrectPos, GenWorldID
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 (WorldID, RegionID)
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 where RegionID = @RegionID
INSERT INTO SRO_VT_SHARD.._RefInstance_World_Start_Pos (WorldID, RegionID, PosX, PosY, PosZ, Param)
SELECT @WorldID, @RegionID, @PosX, @PosY, @PosZ, 0

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
But it will keep returning this error as well
Quote:
Msg 50000, Level 16, State 1, Procedure _RoyalCreateInstance, Line
127 Error occured at RefGameWorld Update/Insert | ERR MSG: Conversion
failed when converting the varchar value 'GAME_WORLD_NORMALIZE_TYPE_A'
to data type bit.
i'm trying hard to fix this error.
Aaron* is offline  
Old 02/09/2015, 19:01   #21


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
^You're probably doing something weird, like a wrong insert or something, 'GAME_WORLD_NORMALIZE_TYPE_A' is only used at 1 insertion which is the value of 'Value' column at the table I don't know why this is converted in your query
​Exo is offline  
Old 02/09/2015, 21:07   #22
 
​Bodo's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 644
Received Thanks: 222
Quote:
Originally Posted by blablaRoyal View Post
but all the arabs are gonna fail.
We'll see about that
​Bodo is offline  
Old 02/09/2015, 21:32   #23

 
elite*gold: 27
Join Date: Jan 2015
Posts: 1,343
Received Thanks: 892
after fixing the whole errors,
That part f**ked up my db lol
Quote:
DELETE FROM SRO_VT_SHARD.._RefInstance_World_Start_Pos
stop drinking alcohol dude xD
Aaron* is offline  
Old 02/09/2015, 21:38   #24


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Just read the **** query, add them manually... after you've done it once or twice re-write it.
​Exo is offline  
Old 02/13/2015, 05:04   #25

 
Bocc1337's Avatar
 
elite*gold: 737
Join Date: Oct 2007
Posts: 730
Received Thanks: 133
make a example .say like devils garden in the petra files or some thing
Bocc1337 is offline  
Old 02/14/2015, 12:29   #26
 
Riddick*'s Avatar
 
elite*gold: 0
Join Date: Feb 2015
Posts: 23
Received Thanks: 12
tried to make it works -.-
Riddick* is offline  
Old 02/14/2015, 13:25   #27
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,056
Received Thanks: 1,644
I just love it how rabs fail. Check the first post *******, this is INCOMPLETE.

It has the logic. Read it, insert it manually. Done.
I finished inserting **** manually faster than writing that ****, so it wasn't ever finished. There are probably **** tons of errors since it wasnt even checked.

Still has the needed stuff.
Royalblade* is offline  
Old 02/14/2015, 15:19   #28


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,653
Akasch, please do not answer this question.... at least not here

Aeron => Personal reasons could be understood in the wrong way so if he answers and it offenses a race or a group it would be a problem for every side of the discussion so avoid this kind of ****.
​Exo is offline  
Old 02/14/2015, 19:38   #29

 
Bocc1337's Avatar
 
elite*gold: 737
Join Date: Oct 2007
Posts: 730
Received Thanks: 133
please show a example.
Bocc1337 is offline  
Old 02/15/2015, 06:00   #30
 
Royalblade*'s Avatar
 
elite*gold: 85
Join Date: Feb 2014
Posts: 1,056
Received Thanks: 1,644
Quote:
Originally Posted by Aeron* View Post
I already inserted it manually but it didn't work either,btw why do you hate arabs?
i dont hste araba. I just dont like the ppl living in the middle east. All those stupid people, 99% of them. Including you.

Exorcist is okay though.
Royalblade* is offline  
Thanks
1 User
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 +1. The time now is 08:43.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.