at refobjitem looks for this [USU1:SKILL_MALL_PKREMOVER] = [USU1:codename of your skill]
_TimedJob proc
if(@JobID = skill_id_here)
begin
your code here
return -3
end
I add scroll and add TimedJob and use scroll not remove pk !!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature currently requires accessing the site using the built-in Safari browser.
at refobjitem looks for this [USU1:SKILL_MALL_PKREMOVER] = [USU1:codename of your skill]
_TimedJob proc
if(@JobID = skill_id_here)
begin
your code here
return -3
end
delet return -3 and you dont take crash but you need to teleport
USE [SRO_VT_SHARD]
GO
/****** Object: StoredProcedure [dbo].[_AddTimedJob] Script Date: 12/07/2013 18:19:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddTimedJob]
@CharID int,
@Category tinyint,
@JobID int,
@TimeToKeep int,
@Data1 int,
@Data2 int,
--##begin due to develop composite item
@Data3 int,
@Data4 int,
@Data5 int,
@Data6 int,
@Data7 int,
@Data8 int,
@Serial64 bigint,
@JID int
--##end due to develop composite item
as
if(@JobID = '33816') -- Pk Remover
begin
Update _Char Set DailyPK = 0, TotalPK = 0, PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
if (not exists (select CharID from _Char with (nolock) where CharID = @CharID))
return -1
if (@TimeToKeep <= 0)
return -2
declare @NewJobID int
set @NewJobID = 0
--##JobID 1 = Guild // JobID 2 = Thief/Hunter/Trader
--##If you want to only have one not both, then just modify the line below!
if (@JobID = 1 and @Category = 2 or @JobID = 2)
BEGIN
return -1
END
ELSE
BEGIN
--##begin due to develop composite item
insert into _TimedJob(CharID,Category,JobID,TimeToKeep,Data1,Data2,Data3,Data4,Data5,Data6,Data7,Data8,Serial64,JID)
values(@CharID, @Category, @JobID, @TimeToKeep, @Data1, @Data2, @Data3, @Data4, @Data5, @Data6, @Data7, @Data8, @Serial64, @JID)
END
--##end due to develop composite item
set @NewJobID = @@identity
if (@@error <> 0 or @@rowcount = 0)
return -3
return @NewJobID
well the cursor in sql is used for something that equals a for each loop and the transaction is used to do something only if no errors are thrown or things like that .. it doesnt actually send the packet to the client that updates the status or things like that i think its hardcoded like the client notices the name starts with @, then opens that window and then sends a packet to the server that tells the server to execute the changename sp and after it the server sends a packet to the client with new informations .. like when useing a return scroll for example you have to give the item all itemtype ids = 3 so the server knows what it should do when useing this item
i was thinking about an item that gives the buff AND uses a teleport to town .. but the typeid 3 and 4 need to be 13 and 14 for the buff item and both need to be 3 for a return item .. and i dont know how these typeid's work or what values do what ..
Actually you can use "Expendable" type of scroll. (TID: 3, 3, 13, 14). And that's the only scroll we can use while in PK mode, nothing else. Thus you need to relog your character afterwards. or worse, make the server dc the char. There's no cure for "relog/dc" thing because we can't make the client automatically refreshes stat after we change something in db.
Ah, character change, well I was aiming to scroll with TID: 3, 3, 13, 14 (Time Service)yes we can make client automatic refresh same scroll caracter change ^_^
Sure it will point to the Skin Change UI, since there is no change about the UI recall.
You could for example use the 2dt editor and reedit the Skin Change UI to a whole different one, fitting for your "PK Removal" conditions, but aside of getting a new thing (which may be buggy as hell, or simply not working), you will and have to replace the Skin Change stuff for ever.
Ah, character change, well I was aiming to scroll with TID: 3, 3, 13, 14 (Time Service)
Anyhow, I'm testing with TID 3, 3, 13, 9 now. See if we get no "character change skin" dialog appearing in the client side
Well, you were wrong, making another scroll with same type as Skin Changer scroll will give you..... another Skin Changer scroll not other usable scroll like expendables. Guess you didn't try it before you reply
View attachment 152528