-
Scroll to Remove PK from Char
RefObjCommon
PHP Code:
1 43605 ITEM_MALL_PKREMOVER ???? ???? ??? (???) xxx SN_ITEM_MALL_PKREMOVER SN_ITEM_MALL_PKREMOVER_TT_DESC 1 0 3 3 13 14 180000 3 0 1 1 1 255 0 1 0 0 129 0 0 0 0 0 0 0 -1 0 -1 0 -1 0 -1 0 -1 0 0 0 0 0 0 0 100 0 0 0 xxx item\etc\drop_mall_scroll.bsr Premium\etc\pkremover.ddj xxx xxx 22005
RefObjItem
PHP Code:
22005 1 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1000 ????(?) 1 [USU1:SKILL_MALL_PKREMOVER] -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx -1 xxx 0 0 0
RefSkill
PHP Code:
1 34005 1013 SKILL_MALL_PKREMOVER ???? ???? SKILL_MALL_PKREMOVER 0 1 1 0 0 0 0 0 1000 0 0 0 3599 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 255 255 0 0 0 0 0 255 255 255 255 item\etc\mall_optlevel_upgrade_scroll_1.ddj SN_SKILL_MALL_PKREMOVER xxx SN_SKILL_MALL_PKREMOVER_TT_DESC xxx 0 0 3 1667396966 1851946342 1685418593 1500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Procedure
_TimedJob
PHP 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
-
Re: Scroll to Remove PK from Char
could you please add the icon you used for this?
-
Re: Scroll to Remove PK from Char
Instead of giving them Fish and making 10+ threads why you can't simply do that?
Code:
if(@JobID = '34005') -- Pk Remover
begin
--code goes here
return -3
end
-
Re: Scroll to Remove PK from Char
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
-
Re: Scroll to Remove PK from Char
Quote:
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
when i run query it error
Quote:
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@JobID".
Msg 137, Level 15, State 2, Line 4
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 5
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 6
Must declare the scalar variable "@CharID".
Msg 178, Level 15, State 1, Line 7
A RETURN statement with a return value cannot be used in this context.
Vsro 1.88
-
Re: Scroll to Remove PK from Char
the code does the same anyways but i prefer statements like the one you used too Jangan, but i dont like the way this works anyways .. i dont want my players to be disconnected when they use an item .. isnt there any other way to update their status? i tried makeing the items teleport to the recall point but when doing this the buff isnt applied so the sql isnt executed either .. any ideas?
-
Re: Scroll to Remove PK from Char
of course there is ... if i had a sever to work with i can make you one.
what you basically do is use the cursor/transaction standards... "the same concept of my name changing method, or how guilds update levels everytime you level". http://forum.ragezone.com/f722/offic...racter-810072/
this is just a theory.. if it does work with updating names and guild level, character level etc... it should work for the rest of the data.
-
Re: Scroll to Remove PK from Char
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 ..
-
Re: Scroll to Remove PK from Char
Wow nice, that make an item use a sql procedure, nice way I love
-
Re: Scroll to Remove PK from Char
Lemoniscool, i personally havent tried it out yet, however why not a trigger on _inventory for refitemid from _items?
Also, there isn't actually a need of disconnecting the chars. Teleportation should work alright shouldnt it?
-
Re: Scroll to Remove PK from Char
what do you mean Royalblade? didnt understand what youre suggesting but youre right teleporting would be enough thats what i was trying but its not possible to make one item give a buff AND teleport ..
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Royalblade
Lemoniscool, i personally havent tried it out yet, however why not a trigger on _inventory for refitemid from _items?
Also, there isn't actually a need of disconnecting the chars. Teleportation should work alright shouldnt it?
Yep, tp works fine :)
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Showtek
Yep, tp works fine :)
Tell us how you did via teleporting :P
-
Re: Scroll to Remove PK from Char
use any teleport or any teleport scroll, and teleport to same place or another place
-
Re: Scroll to Remove PK from Char
i can't :) because when i press on the scroll i get direct Disconnect :)
-
Re: Scroll to Remove PK from Char
replace return -3 for
set @NewJobID = @@identity
return @NewJobID
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Caosfox
replace return -3 for
set @NewJobID = @@identity
return @NewJobID
sorry i didn't get it
PHP Code:
if(@JobID = '35046') -- Pk Remover
begin
Update _Char Set DailyPK = 0, TotalPK = 0, PKPenaltyPoint = 0 Where CharID = @CharID
return -3
end
Tell me or re-send to me again
Thanks again ^^
-
Re: Scroll to Remove PK from Char
if(@JobID = '35046') -- Pk Remover
begin
Update _Char Set DailyPK = 0, TotalPK = 0, PKPenaltyPoint = 0 Where CharID = @CharID
set @NewJobID = @@identity
return @NewJobID
end
like this
-
Re: Scroll to Remove PK from Char
Msg 137, Level 15, State 1, Procedure _AddTimedJob, Line 57
Must declare the scalar variable "@NewJobID".
Msg 137, Level 15, State 2, Procedure _AddTimedJob, Line 58
Must declare the scalar variable "@NewJobID".
i got this when i execute
-
Re: Scroll to Remove PK from Char
my bad, leave it this way:
if(@JobID = '35046') -- Pk Remover
begin
Update _Char Set DailyPK = 0, TotalPK = 0, PKPenaltyPoint = 0 Where CharID = @CharID
end
-
Re: Scroll to Remove PK from Char
Thank you :)
but btw under murder status you can't teleport or Scroll :) so you gone wait till 1st die xD
-
Re: Scroll to Remove PK from Char
opps.. true, forgot about it. simply relog, is better than any dc. you can add on description of the item " need to relog to take effect" or something like that
-
Re: Scroll to Remove PK from Char
yes i do that :) thank you bro <3
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
Showtek
Yep, tp works fine :)
how did you make the scroll give a buff AND teleport??
-
Re: Scroll to Remove PK from Char
Quote:
Originally Posted by
lemoniscool
how did you make the scroll give a buff AND teleport??
Remove this from the query
and execute and the scroll won't give you Disconnect you want to teleport to get the effect
Credit to Caosfox