|
You last visited: Today at 11:19
Advertisement
Help Add Item Restriction to a Teleport
Discussion on Help Add Item Restriction to a Teleport within the SRO Private Server forum part of the Silkroad Online category.
02/14/2019, 13:23
|
#1
|
elite*gold: 0
Join Date: Jun 2010
Posts: 77
Received Thanks: 9
|
Help Add Item Restriction to a Teleport
Hello gentlemen
*Presence of your help to add restriction of a specific item such as a Key to a portal
And the
*Second method is to create a time of duration within this portal after entering the zone
*Example you use the portal, it consumes your item "***",
and you will have around "***" ,
minutes within this area,
after this time you will be returned back to the city of origin!
*
Thanks for your attention !
I apologize for my bad english use google translator for this!
*
|
|
|
02/14/2019, 22:09
|
#2
|
elite*gold: 0
Join Date: Feb 2014
Posts: 1,866
Received Thanks: 517
|
there is a query released
if u don't know to make it manual !
just search for it !
USE SRO_VT_SHARD /* Add new Teleport By Arabianfox */
DECLARE @ VARCHAR (64)
DECLARE @CHARNAME1 VARCHAR (30)
DECLARE @CHARNAME2 VARCHAR (30)
DECLARE @ eleport INT
DECLARE @Fee INT
DECLARE @ LVL INT
/* Put your settings here */
SET @ = 'unique_area1' -- any name you want ex: PK_ZONE or PVP_ZONE
SET @CHARNAME1 = '[GM]WildOne' -- Teleport position
SET @CHARNAME2 = 'Road' -- Spawn position after teleport
SET @ eleport = 1 -- Target teleport ID ex: 1 for Jangan - 5 for Hotan - 20 for Constantinople
SET @Fee = 50000 -- Gold amount to Pass the teleport
SET @ LVL = 0 -- minimum level required to teleport 0 for no restriction - ex:90 lvl 90 and higher can teleport
/* settings area end here */
IF EXISTS (SELECT CodeName128 FROM _RefObjCommon WHERE CodeName128 = 'STORE_' @ )
BEGIN
raiserror('The stated teleportname of %s is already exist!',11,1 @ );
RETURN;
END
DECLARE @MAXOBJ INT = (SELECT MAX (ID) FROM _RefObjCommon)+1
DECLARE @ 1 INT SET @ 1 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME1)
DECLARE @ X1 INT SET @ X1 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME1)
DECLARE @ 1 INT SET @ 1 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME1)
DECLARE @ 1 INT SET @ 1 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME1)
DECLARE @LINK INT = (SELECT MAX (ID) FROM _RefObjStruct)+1
SET IDENTITY_INSERT _RefObjCommon ON
INSERT INTO _RefObjCommon (Service,ID,CodeName128,ObjName128,OrgObjCodeName1 28,NameStrID128,DescStrID128,CashItem,Bionic,TypeI D1,TypeID2,TypeID3,TypeID4,DecayTime,Country,Rarit y,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop,CanPic k,CanRepair,CanRevive,CanUse,CanThrow,Price,CostRe pair,CostRevive,CostBorrow,KeepingFee,SellPrice,Re qLevelType1,ReqLevel1,ReqLevelType2,ReqLevel2,ReqL evelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxCon tain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,S peed2,Scale,BCHeight,BCRadius,EventID,AssocFileObj 128,AssocFileDrop128,AssocFileIcon128,AssocFile1_1 28,AssocFile2_128,Link) VALUES
(1,@MAXOBJ,'STORE_' @ @ ,'xxx','SN_STORE_' @ ,'xxx',0,0,4,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,-1,0,-1,0,-1,0,-1,0,-1 @ 1,0 @ X1 @ 1 @ 1,0,0,50,50,30,0,'quest\ins_quest_teleport.bsr','x xx','xxx','xxx','xxx',@link)
SET IDENTITY_INSERT _RefObjCommon OFF
print ''
print 'Add the following line to teleportbuilding.txt @ _dep\silkroad\textdata folder'
print '1 '+CONVERT(varchar(max),@MAXOBJ)+' '+'STORE_' @ +' ' @ +' xxx '+'SN_STORE_' @ +' xxx 0 0 4 1 1 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 '+CONVERT(varchar(max) @ 1)+' 0 '+CONVERT(varchar(max) @ X1)+' '+CONVERT(varchar(max) @ 1)+' '+CONVERT(varchar(max) @ 1)+' 0 0 50 50 30 0 quest\teleport01.bsr xxx xxx xxx xxx '+CONVERT(varchar(max),@link)
print ''
print 'Add the following line to textdata_object.txt @ _dep\silkroad\textdata folder'
print ''
print '1 '+'SN_STORE_' @ +' ' @
print ''
print ''
SET IDENTITY_INSERT _RefObjStruct ON
INSERT INTO _RefObjStruct (ID,Dummy_Data) VALUES
(@LINK,0)
SET IDENTITY_INSERT _RefObjStruct OFF
DECLARE @ ID INT = (SELECT MAX (ID) FROM _RefTeleport)+1
DECLARE @ D INT = (SELECT (WorldID) FROM _Char where CharName16 = @CHARNAME2)
DECLARE @ 2 INT SET @ 2 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME2)
DECLARE @ X2 INT SET @ X2 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME2)
DECLARE @ 2 INT SET @ 2 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME2)
DECLARE @ 2 INT SET @ 2 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME2)
INSERT INTO _RefTeleport (Service,ID,CodeName128,AssocRefObjCodeName128,Ass ocRefObjID,ZoneName128,GenRegionID,GenPos_X,GenPos _Y,GenPos_Z,GenAreaRadius,CanBeResurrectPos,CanGot oResurrectPos,GenWorldID,BindInteractionMask,Fixed Service) VALUES
(1 @ ID,'GATE_' @ ,'STORE_' @ ,@MAXOBJ,'SN_STORE_' @ @ 2 @ X2 @ 2 @ 2,30,0,0 @ D,1,0)
print ''
print 'Add the following line to teleportdata.txt @ _dep\silkroad\textdata folder'
print '1 '+CONVERT(varchar(max) @ ID)+' '+'GATE_' @ +' '+CONVERT(varchar(max),@MAXOBJ)+' '+'SN_STORE_' @ +' '+CONVERT(varchar(max) @ 2)+' '+CONVERT(varchar(max) @ X2)+' '+CONVERT(varchar(max) @ 2)+' '+CONVERT(varchar(max) @ 2)+' 30 0 0 '+CONVERT(varchar(max) @ D)+' 1 0'
print ''
print ''
IF @ LVL = 0
BEGIN
INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1 @ eleport @ ID,@Fee,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1 @ ID @ eleport,@Fee,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
print ''
print 'Add the following lines to teleportlink.txt @ _dep\silkroad\textdata folder'
print '1 '+CONVERT(varchar(max) @ eleport)+' '+CONVERT(varchar(max) @ ID)+' '+CONVERT(varchar(max),@Fee)+' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
print '1 '+CONVERT(varchar(max) @ ID)+' '+CONVERT(varchar(max) @ eleport)+' '+CONVERT(varchar(max),@Fee)+' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
print ''
END
ELSE BEGIN
INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1 @ eleport @ ID,@Fee,0,0,0,1 @ LVL,999,0,0,0,0,0,0,0,0,0,0,0,0)
print ''
print ''
print 'Add the following line to teleportlink.txt @ _dep\silkroad\textdata folder'
print '1 '+CONVERT(varchar(max) @ eleport)+' '+CONVERT(varchar(max) @ ID)+' '+CONVERT(varchar(max),@Fee)+' 0 0 0 1 '+CONVERT(varchar(max) @ LVL)+' 999 0 0 0 0 0 0 0 0 0 0 0 0'
print ''
END
print ''
print 'Done!'
|
|
|
02/15/2019, 17:44
|
#3
|
elite*gold: 0
Join Date: Jan 2019
Posts: 17
Received Thanks: 7
|
It's basically on _RefTeleLink
You can check the existing lines to learn from them, let's say for example the Gate of Ruler (Roc) contains the restriction to prevent entrance unless you have the required item. (That's a suggestion not related to the subject though)
Subject: Edit Restrict1 to 4 instead of 0 or whatever the number is, Data1_1 is the item ID (You can get it from _RefObjCommon), Restrict2 to 5 and Data2_1 is the same ID of Data1_1
ID Selection Query
Quote:
|
SELECT ID from _RefObjCommon where Codename128 ='CODE'
|
If you're lazy, use this query.
Teleport Restriction (ITEM) Query
Quote:
|
UPDATE _RefTeleLink set Restrict1='4', Data1_1='Item ID', Restrict2='5', Data2_1='Item ID' where OwnerTeleport='RefTeleport Table ID'
|
|
|
|
02/16/2019, 22:57
|
#4
|
elite*gold: 0
Join Date: Jun 2010
Posts: 77
Received Thanks: 9
|
Quote:
Originally Posted by Dracula Untold
there is a query released
if u don't know to make it manual !
just search for it !
USE SRO_VT_SHARD /* Add new Teleport By Arabianfox */
DECLARE @ VARCHAR (64)
DECLARE @CHARNAME1 VARCHAR (30)
DECLARE @CHARNAME2 VARCHAR (30)
DECLARE @ eleport INT
DECLARE @Fee INT
DECLARE @ LVL INT
/* Put your settings here */
SET @ = 'unique_area1' -- any name you want ex: PK_ZONE or PVP_ZONE
SET @CHARNAME1 = '[GM]WildOne' -- Teleport position
SET @CHARNAME2 = 'Road' -- Spawn position after teleport
SET @ eleport = 1 -- Target teleport ID ex: 1 for Jangan - 5 for Hotan - 20 for Constantinople
SET @Fee = 50000 -- Gold amount to Pass the teleport
SET @ LVL = 0 -- minimum level required to teleport 0 for no restriction - ex:90 lvl 90 and higher can teleport
/* settings area end here */
IF EXISTS (SELECT CodeName128 FROM _RefObjCommon WHERE CodeName128 = 'STORE_' @ )
BEGIN
raiserror('The stated teleportname of %s is already exist!',11,1 @ );
RETURN;
END
DECLARE @MAXOBJ INT = (SELECT MAX (ID) FROM _RefObjCommon)+1
DECLARE @ 1 INT SET @ 1 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME1) DECLARE @ X1 INT SET @ X1 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME1) DECLARE @ 1 INT SET @ 1 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME1) DECLARE @ 1 INT SET @ 1 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME1)
DECLARE @LINK INT = (SELECT MAX (ID) FROM _RefObjStruct)+1
SET IDENTITY_INSERT _RefObjCommon ON
INSERT INTO _RefObjCommon (Service,ID,CodeName128,ObjName128,OrgObjCodeName1 28,NameStrID128,DescStrID128,CashItem,Bionic,TypeI D1,TypeID2,TypeID3,TypeID4,DecayTime,Country,Rarit y,CanTrade,CanSell,CanBuy,CanBorrow,CanDrop,CanPic k,CanRepair,CanRevive,CanUse,CanThrow,Price,CostRe pair,CostRevive,CostBorrow,KeepingFee,SellPrice,Re qLevelType1,ReqLevel1,ReqLevelType2,ReqLevel2,ReqL evelType3,ReqLevel3,ReqLevelType4,ReqLevel4,MaxCon tain,RegionID,Dir,OffsetX,OffsetY,OffsetZ,Speed1,S peed2,Scale,BCHeight,BCRadius,EventID,AssocFileObj 128,AssocFileDrop128,AssocFileIcon128,AssocFile1_1 28,AssocFile2_128,Link) VALUES
(1,@MAXOBJ,'STORE_' @ @ ,'xxx','SN_STORE_' @ ,'xxx',0,0,4,1,1,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,-1,0,-1,0,-1,0,-1,0,-1 @ 1,0 @ X1 @ 1 @ 1,0,0,50,50,30,0,'quest\ins_quest_teleport.bsr','x xx','xxx','xxx','xxx',@link)
SET IDENTITY_INSERT _RefObjCommon OFF
print ''
print 'Add the following line to teleportbuilding.txt @ _dep\silkroad\textdata folder' print '1 '+CONVERT(varchar(max),@MAXOBJ)+' '+'STORE_' @ +' ' @ +' xxx '+'SN_STORE_' @ +' xxx 0 0 4 1 1 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 '+CONVERT(varchar(max) @ 1)+' 0 '+CONVERT(varchar(max) @ X1)+' '+CONVERT(varchar(max) @ 1)+' '+CONVERT(varchar(max) @ 1)+' 0 0 50 50 30 0 quest\teleport01.bsr xxx xxx xxx xxx '+CONVERT(varchar(max),@link)
print ''
print 'Add the following line to textdata_object.txt @ _dep\silkroad\textdata folder'
print ''
print '1 '+'SN_STORE_' @ +' ' @
print ''
print ''
SET IDENTITY_INSERT _RefObjStruct ON
INSERT INTO _RefObjStruct (ID,Dummy_Data) VALUES
(@LINK,0)
SET IDENTITY_INSERT _RefObjStruct OFF
DECLARE @ ID INT = (SELECT MAX (ID) FROM _RefTeleport)+1 DECLARE @ D INT = (SELECT (WorldID) FROM _Char where CharName16 = @CHARNAME2)
DECLARE @ 2 INT SET @ 2 = (SELECT (LatestRegion) FROM _Char WHERE CharName16 = @CHARNAME2) DECLARE @ X2 INT SET @ X2 = (SELECT (POSX) FROM _Char WHERE CharName16 = @CHARNAME2) DECLARE @ 2 INT SET @ 2 = (SELECT (POSY) FROM _Char WHERE CharName16 = @CHARNAME2) DECLARE @ 2 INT SET @ 2 = (SELECT (POSZ) FROM _Char WHERE CharName16 = @CHARNAME2)
INSERT INTO _RefTeleport (Service,ID,CodeName128,AssocRefObjCodeName128,Ass ocRefObjID,ZoneName128,GenRegionID,GenPos_X,GenPos _Y,GenPos_Z,GenAreaRadius,CanBeResurrectPos,CanGot oResurrectPos,GenWorldID,BindInteractionMask,Fixed Service) VALUES
(1 @ ID,'GATE_' @ ,'STORE_' @ ,@MAXOBJ,'SN_STORE_' @ @ 2 @ X2 @ 2 @ 2,30,0,0 @ D,1,0)
print ''
print 'Add the following line to teleportdata.txt @ _dep\silkroad\textdata folder' print '1 '+CONVERT(varchar(max) @ ID)+' '+'GATE_' @ +' '+CONVERT(varchar(max),@MAXOBJ)+' '+'SN_STORE_' @ +' '+CONVERT(varchar(max) @ 2)+' '+CONVERT(varchar(max) @ X2)+' '+CONVERT(varchar(max) @ 2)+' '+CONVERT(varchar(max) @ 2)+' 30 0 0 '+CONVERT(varchar(max) @ D)+' 1 0'
print ''
print ''
IF @ LVL = 0
BEGIN
INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1 @ eleport @ ID,@Fee,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1 @ ID @ eleport,@Fee,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
print ''
print 'Add the following lines to teleportlink.txt @ _dep\silkroad\textdata folder' print '1 '+CONVERT(varchar(max) @ eleport)+' '+CONVERT(varchar(max) @ ID)+' '+CONVERT(varchar(max),@Fee)+' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0' print '1 '+CONVERT(varchar(max) @ ID)+' '+CONVERT(varchar(max) @ eleport)+' '+CONVERT(varchar(max),@Fee)+' 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
print ''
END
ELSE BEGIN
INSERT INTO _RefTeleLink (Service,OwnerTeleport,TargetTeleport,Fee,Restrict BindMethod,RunTimeTeleportMethod,CheckResult,Restr ict1,Data1_1,Data1_2,Restrict2,Data2_1,Data2_2,Res trict3,Data3_1,Data3_2,Restrict4,Data4_1,Data4_2,R estrict5,Data5_1,Data5_2) VALUES
(1 @ eleport @ ID,@Fee,0,0,0,1 @ LVL,999,0,0,0,0,0,0,0,0,0,0,0,0)
print ''
print ''
print 'Add the following line to teleportlink.txt @ _dep\silkroad\textdata folder' print '1 '+CONVERT(varchar(max) @ eleport)+' '+CONVERT(varchar(max) @ ID)+' '+CONVERT(varchar(max),@Fee)+' 0 0 0 1 '+CONVERT(varchar(max) @ LVL)+' 999 0 0 0 0 0 0 0 0 0 0 0 0'
print ''
END
print ''
print 'Done!'
|
Thank you for trying to help me more. This was not my problem.
Quote:
Originally Posted by Incendlary
It's basically on _RefTeleLink
You can check the existing lines to learn from them, let's say for example the Gate of Ruler (Roc) contains the restriction to prevent entrance unless you have the required item. (That's a suggestion not related to the subject though)
Subject: Edit Restrict1 to 4 instead of 0 or whatever the number is, Data1_1 is the item ID (You can get it from _RefObjCommon), Restrict2 to 5 and Data2_1 is the same ID of Data1_1
ID Selection Query
If you're lazy, use this query.
Teleport Restriction (ITEM) Query
|
thank you sir you helped me a lot,
besides this solution wanted to know also how to add a maximum time within the zone
for example after entering the zone
the system count a maximum time of 5 minutes
and then expel me from inside it to the starting point
Thank you again so far.
|
|
|
02/17/2019, 01:02
|
#5
|
elite*gold: 0
Join Date: Jan 2019
Posts: 17
Received Thanks: 7
|
Quote:
Originally Posted by rodrigorkg
Thank you for trying to help me more. This was not my problem.
thank you sir you helped me a lot,
besides this solution wanted to know also how to add a maximum time within the zone
for example after entering the zone
the system count a maximum time of 5 minutes
and then expel me from inside it to the starting point
Thank you again so far.
|
That, I can't help you on it.. It's based on filter packets which will require the region ID and packets necessary after teleportation, sadly, these features won't be free so you either search for a filter and ask its creator to implement the features you want.
|
|
|
 |
Similar Threads
|
[Selling] Drafting Service (Ranked Restriction, Chat Restriction)
02/01/2016 - League of Legends Trading - 14 Replies
Currently doing EVERY region.
Price per win: ??? up for discussion
We can discuss a price/time frame through:
Skype: BoostJobs4U
|
[Selling] Draft Wins/Chat Restriction/Ranked Restriction SERVICE LF VOUCHES TOO!
04/09/2015 - League of Legends Trading - 3 Replies
Hello i want play for u service Chat Restricted (ranked/draft wins ) i looking for vouches from only trusted members can play some games cant quarante all wins ! I can play in any elos ! servers : EUNE/EUW/RU/TR/NA
LF VOUCHES ! skype : ralmorx
|
[Selling] Elo Boosting/Coaching/Ranked Restriction/Chat Restriction
03/07/2015 - League of Legends Trading - 2 Replies
Hello guys,we are 5 elo booster from NA server, all master/challenger.
You can find us on facebook : https://www.facebook.com/pages/ELO-Boosting/152592 2984354641?fref=ts. This is very cheap and fast boost. We are boosting on NA/Euw/Eune!
Prices: Bronze to Silver - 30e
Silver to Gold - 40e
Gold to Platinum - 70e
Platinum to Diamond -100e
Diamond to Master - 200e
Coaching-15e per hour
Chat/Ranked restriction: 30 wins 20e, 60 wins, 40e.
Payments: Paypal or add us on skype:...
|
All times are GMT +1. The time now is 11:20.
|
|