-
Re: Scroll to Remove PK from Char
yeah you didnt get my question and you prob didnt make what im looking for .. i know that removeing return -3 will stop the disconnect but i wasnt asking how to stop the disconnect i asked how to make the scroll give a buff (that we need to execute our sql) AND teleport the player to town all together in one item .. i guess its simply not possible for us
-
Re: Scroll to Remove PK from Char
aha Automatically teleport after use the scroll
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
lemoniscool
yeah you didnt get my question and you prob didnt make what im looking for .. i know that removeing return -3 will stop the disconnect but i wasnt asking how to stop the disconnect i asked how to make the scroll give a buff (that we need to execute our sql) AND teleport the player to town all together in one item .. i guess its simply not possible for us
Hint:_LogEventItem :)
if itemid
then excute your query or whateva.
-
Re: Scroll to Remove PK from Char
i dont think _logeventitem can teleport you, in fact (at least i believe) no procedure teleport you (ofc can change your coords, but no real time teleport, unless you can codecave or w/e client to send the teleport packet, or w/e is needed when the buff ends)
-
Re: Scroll to Remove PK from Char
buf instead of makeing the scroll a buff item you can make it a teleport scroll and put the pk remove sql into _AddLogItem, didnt even think about it :D great thanks DieEyes but any ideas on how to remove the "cannot use return scroll with murderer status"?
i found the error message inside cro_client.exe and successfully disabled it but the scroll still cannot be used so i guess there is a check on server side too but i cant find it like i did in sro_client ..
-
Re: Scroll to Remove PK from Char
guys , i don't understand
about this part
if(@JobID = '34005') -- Pk Remover
begin
Update _Char Set DailyPK = 0 Where CharID = @CharID
Update _Char Set TotalPK = 0 Where CharID = @CharID
Update _Char Set PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
I must add it in table _TimedJop or just excute it like a query ?
and how to get the line in itemdata_45000 ?
-
Re: Scroll to Remove PK from Char
icant find Procedure _TimedJob,,,help,please?
need i add a procedure named _TimedJob ?
hi,friend,
i cant find Procedure _TimedJob
do i need create a new procedure named _TimedJob ?
help,pls,thank u.
Quote:
Originally Posted by
Jangan
erm... can you just reduce the above code to this.
Code:
if(@JobID = '34005') -- Pk Remover
begin
Update _Char Set DailyPK = 0 Where CharID = @CharID
Update _Char Set TotalPK = 0 Where CharID = @CharID
Update _Char Set PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
into
Code:
if(@JobID = '34005') -- Pk Remover
begin
Update _Char Set DailyPK = 0, TotalPK = 0, PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
hi,friend,
i cant find Procedure _TimedJob
do i need create a new procedure named _TimedJob ?
help,pls,thank u.
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
chichi
icant find Procedure _TimedJob,,,help,please?
need i add a procedure named _TimedJob ?
hi,friend,
i cant find Procedure _TimedJob
do i need create a new procedure named _TimedJob ?
help,pls,thank u.
hi,friend,
i cant find Procedure _TimedJob
do i need create a new procedure named _TimedJob ?
help,pls,thank u.
_AddTimedJob
need more Explain ?
-
Re: Scroll to Remove PK from Char
my old _AddTimedJob is finished by:
IF (@@error <> 0 or @@rowcount = 0)
return -3
return @NewJobID
what should i add after "return @NewJobID" ?
help,pls,thanks
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Caosfox
replace return -3 for
set @NewJobID = @@identity
return @NewJobID
after replace ,players neednt dc ?
-
Re: Scroll to Remove PK from Char
no dc (or relog) = no pk is removed
-
Re: Scroll to Remove PK from Char
Maybe that's a noob question but can some1 tell me when the item executes the procedure? I have in mind to make some items that executes stored procedures and i don't know how to link the item with the procedure i want.
-
Re: Scroll to Remove PK from Char
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
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Caosfox
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
Thank you very much!
-
Re: Scroll to Remove PK from Char
It's possible to make this pkremover like a return scroll and when it updates the db makes the teleport automatically? if it is, how can i do it?
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Caosfox
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 !!
-
Re: Scroll to Remove PK from Char
Hey Guys i have other idea..
Well this is based on Premium.
When u use a premium this automatically add:
- Icon that give you return, resurect and reverse scrols.
- The Skill ('SKILL_MALL_PRE_APRU_4W_01') that give you the % dmg archemy luck etc..
- and the item 4 weeks its a tiket exp named 'ITEM_PRE_GOLTAM_4W_PLUS' and this is used automatically in chain with the others.
what if we try modify a item like premium?
♦ the Icon that give you return, resurect and reverse scrols. can make null or remove
♦ 'SKILL_MALL_PRE_APRU_4W_01' this skill can be replaced for our skill (+_Addtimedjob)
♦ 'ITEM_PRE_GOLTAM_4W_PLUS' that is the tiket exp, change for a return scroll..
So if this work.. when use the item will add the Skill to remove the pk (or any we want) and use a return scroll..
What you think of the idea?
-
Re: Scroll to Remove PK from Char
if(@JobID = '33817') -- Pk Remover
begin
Update _Char Set DailyPK = 0 Where CharID = @CharID
Update _Char Set TotalPK = 0 Where CharID = @CharID
Update _Char Set PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
Then crash :/
-
Re: Scroll to Remove PK from Char
delet return -3 and you dont take crash but you need to teleport
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
BadFist
delet return -3 and you dont take crash but you need to teleport
Done but nothing happen :/
-
Re: Scroll to Remove PK from Char
PHP Code:
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
Cuz of it ,,
if(@JobID = '33816') -- Pk Remover
begin
Update _Char Set DailyPK = 0, TotalPK = 0, PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
but i don't know how to fix it , all scrolls had the same problem btw :mad:
Anyone can help me please ! :(
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
lemoniscool
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 ..
It's:
_RefObjCommon: TypeID1 = 3, TypeID2 = 3, TypeID3 = 3, TypeID4 = 1
_RefObjItem: Param1 = <seconds>, Param2 = 1, Param3 = -1, Desc3_128 = 'RESURRECT'
And you got yourself a "return-scroll-type" of scroll ;)
-
Re: Scroll to Remove PK from Char
as the scroll is activated if pk
remember being pk does not bind any parchment
-
Re: Scroll to Remove PK from Char
Well making scroll to remove pk is bullshit... You can't use scrolls if you are pk. So I doubt If any of you tried it :D The thing is I just need to find out stored proc for Skin Gender Changer so I could see how it teleports player after the shape of character is changed. Because you can use it even if you are pk. Any clue where is that procedure. Will take sometime to find it...
-
Re: Scroll to Remove PK from Char
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.