Shaiya AP per x50 kill

09/19/2019 02:44 ShaiyaIwanttolearn#1
Hello would like to know if it is possible to set for players to receive AP, after a certain amount of kills, for example every 50 Kills during PvP, the player automatically receives 500 AP without cheating. I tried to do something using an example of Ap per kills, but to no avail.
09/19/2019 03:46 [GameAdvisor]Finn#2
Quote:
Originally Posted by ShaiyaIwanttolearn View Post
Hello would like to know if it is possible to set for players to receive AP, after a certain amount of kills, for example every 50 Kills during PvP, the player automatically receives 500 AP without cheating. I tried to do something using an example of Ap per kills, but to no avail.

USE [PS_GameData]
GO

/****** Object: Trigger [dbo].[PointsForKills] Script Date: 09/27/2012 11:57:00 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO




create trigger [dbo].[PointsForKills]
on [PS_GameData].[dbo].[Chars]
after update
as
IF (UPDATE (k1))
begin
declare @[Only registered and activated users can see links. Click Here To Register...]1 int
declare @[Only registered and activated users can see links. Click Here To Register...]1 int
set @[Only registered and activated users can see links. Click Here To Register...]1 = (select k1 from deleted)
set @[Only registered and activated users can see links. Click Here To Register...]1 = (select k1 from inserted)
if @[Only registered and activated users can see links. Click Here To Register...]1 @[Only registered and activated users can see links. Click Here To Register...]1
begin
update PS_userdata.dbo.users_master
set point=point+5
from PS_userdata.dbo.users_master m,inserted i where m.userUID=i.useruid
end
/*if I wanted to do 500 points per x000 kills I would do something like this

if (convert ( varchar (5) @[Only registered and activated users can see links. Click Here To Register...]1) like '%000')
begin
update PS_userdata.dbo.users_master
set point=point+500
from PS_userdata.dbo.users_master m,inserted i where m.userUID=i.useruid
end
This would give 500 points to every k1 value that is "like" 1000 or 2000 or 3000 etc, not just 1000 kills
*/
end

GO
09/19/2019 05:46 ShaiyaIwanttolearn#3
Quote:
Originally Posted by [GameAdvisor]Finn View Post
USE [PS_GameData]
GO

/****** Object: Trigger [dbo].[PointsForKills] Script Date: 09/27/2012 11:57:00 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO




create trigger [dbo].[PointsForKills]
on [PS_GameData].[dbo].[Chars]
after update
as
IF (UPDATE (k1))
begin
declare @[Only registered and activated users can see links. Click Here To Register...]1 int
declare @[Only registered and activated users can see links. Click Here To Register...]1 int
set @[Only registered and activated users can see links. Click Here To Register...]1 = (select k1 from deleted)
set @[Only registered and activated users can see links. Click Here To Register...]1 = (select k1 from inserted)
if @[Only registered and activated users can see links. Click Here To Register...]1 @[Only registered and activated users can see links. Click Here To Register...]1
begin
update PS_userdata.dbo.users_master
set point=point+5
from PS_userdata.dbo.users_master m,inserted i where m.userUID=i.useruid
end
/*if I wanted to do 500 points per x000 kills I would do something like this

if (convert ( varchar (5) @[Only registered and activated users can see links. Click Here To Register...]1) like '%000')
begin
update PS_userdata.dbo.users_master
set point=point+500
from PS_userdata.dbo.users_master m,inserted i where m.userUID=i.useruid
end
This would give 500 points to every k1 value that is "like" 1000 or 2000 or 3000 etc, not just 1000 kills
*/
end

GO

that's not what i'm trying to do, let's suppose every 50 kills in pvp the player gets 500 AP, when he completes 50 kills the amount is left and the player would have to kill 50 kills to get more points
09/19/2019 06:39 [GameAdvisor]Finn#4
Quote:
Originally Posted by ShaiyaIwanttolearn View Post
that's not what i'm trying to do, let's suppose every 50 kills in pvp the player gets 500 AP, when he completes 50 kills the amount is left and the player would have to kill 50 kills to get more points
try to read this part
09/19/2019 22:24 ShaiyaIwanttolearn#5
Quote:
Originally Posted by failpvper View Post
if you were doing this by rank...

put this in your usp.Insert_Action_Log_E

IF (@ActionType = 103)
BEGIN
IF (@Text2) LIKE 'kill=49%'
BEGIN
UPDATE PS_UserData.dbo.Users_Master SET Point = Point + 500 WHERE UserUID = (@UserUID)
END

IF (@Text2) LIKE 'kill=299%'
BEGIN
UPDATE PS_UserData.dbo.Users_Master SET Point = Point + 500 WHERE UserUID = (@UserUID)
END
END

you'll need to set the kill count to to one point below, because the kills you have when a pvp kill is logged, is what it inserts; not what you have after the kill. i know it's not exactly what you want, but it works.

the Text2 column has this string; kill=49, death=0, win=0, lose=0

this is why we use the LIKE operator, and use the % to trim off the rest of the string, otherwise the other values will make the IF statement impossible. to add more IF checks, just paste them, and change the kills.


my idea would be basically, you killed or received 50 kills in PvP you would get automatic points, it would look like a quest where you kill 50 enemies from the opposing faction, then you collect Item AP at npc, but I think that way It would be tiring for the players, so I tried to create a procedure that does the same thing as the quest, except that it delivers the aps automatically, without the player going to a npc redeeming the reward.
09/20/2019 02:30 [GameAdvisor]Finn#6
Quote:
Originally Posted by ShaiyaIwanttolearn View Post
my idea would be basically, you killed or received 50 kills in PvP you would get automatic points, it would look like a quest where you kill 50 enemies from the opposing faction, then you collect Item AP at npc, but I think that way It would be tiring for the players, so I tried to create a procedure that does the same thing as the quest, except that it delivers the aps automatically, without the player going to a npc redeeming the reward.
sorry but i think you didnt even know this sql procedure.. did you even try his said? of course we know your point but i think you didnt even try this procedure....
this procedure can give to players points every kill that you change to % but the points show ingame (itemmall) if the players got relog..
09/20/2019 04:37 ShaiyaIwanttolearn#7
Quote:
Originally Posted by [GameAdvisor]Finn View Post
sorry but i think you didnt even know this sql procedure.. did you even try his said? of course we know your point but i think you didnt even try this procedure....
this procedure can give to players points every kill that you change to % but the points show ingame (itemmall) if the players got relog..
I do not know if you read, or did not understand what I said, your procedure, which is not really yours, has been published here before, and as I said, I'm not looking for it, what I'm looking for and do something similar, when you create a quest to kill 100 players from the opposing faction, then you go to the quest's NPC and redeem a reward, which in my case would be AP, but I would like to have an idea of ​​a SQL procedure that performs the same function as quest, and sends AP automatically each time the player kills 50 people in PvP. You're saying what you don't know, not wanting to be rude.
09/20/2019 04:40 [GameAdvisor]Finn#8
Quote:
Originally Posted by ShaiyaIwanttolearn View Post
I do not know if you read, or did not understand what I said, your procedure, which is not really yours, has been published here before, and as I said, I'm not looking for it, what I'm looking for and do something similar, when you create a quest to kill 100 players from the opposing faction, then you go to the quest's NPC and redeem a reward, which in my case would be AP, but I would like to have an idea of ​​a SQL procedure that performs the same function as quest, and sends AP automatically each time the player kills 50 people in PvP. You're saying what you don't know, not wanting to be rude.
Read again what im saying i didnt tell that you try my procedure i said try his procedure and i already tell sorry before telling you that..
09/20/2019 16:54 ShaiyaIwanttolearn#9
Quote:
Originally Posted by failpvper View Post
the action type for ending a quest is 133. Value1 column records the QuestID, and Value2 = 1 if they succeeded. so this would work if you made a repeatable quest...

IF (@ActionType) = 133 AND (@Value1) = 1222 -- change to your QuestID
BEGIN
IF (@Value2) = 1
BEGIN
UPDATE PS_UserData.dbo.Users_Master
SET Point = Point + 500
WHERE UserUID = (@UserUID)
END
END

i used the 'Chavi's Gate' QuestID of 1222 as an example. you would obviously change that to your custom QuestID. this will do what you're asking for.
thank you, that was exactly it, but in this role after the quest is completed it automatically activates to collect, or does it always need to relog the character to take effect?