Register for your free account! | Forgot your password?

Go Back   elitepvpers › MMORPGs › Shaiya › Shaiya Private Server › Shaiya PServer Development
You last visited: Today at 16:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Shaiya AP per x50 kill

Discussion on Shaiya AP per x50 kill within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 220
Join Date: Jul 2018
Posts: 85
Received Thanks: 22
Shaiya AP per x50 kill

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.
ShaiyaIwanttolearn is offline  
Old   #2
 
[GameAdvisor]Finn's Avatar
 
elite*gold: 0
Join Date: Sep 2016
Posts: 172
Received Thanks: 107
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 @1 int
declare @1 int
set @1 = (select k1 from deleted)
set @1 = (select k1 from inserted)
if @1 @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) @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
[GameAdvisor]Finn is offline  
Thanks
1 User
Old   #3
 
elite*gold: 220
Join Date: Jul 2018
Posts: 85
Received Thanks: 22
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 @1 int
declare @1 int
set @1 = (select k1 from deleted)
set @1 = (select k1 from inserted)
if @1 @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) @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
ShaiyaIwanttolearn is offline  
Old   #4
 
[GameAdvisor]Finn's Avatar
 
elite*gold: 0
Join Date: Sep 2016
Posts: 172
Received Thanks: 107
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
[GameAdvisor]Finn is offline  
Old   #5
 
elite*gold: 220
Join Date: Jul 2018
Posts: 85
Received Thanks: 22
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.
ShaiyaIwanttolearn is offline  
Old   #6
 
[GameAdvisor]Finn's Avatar
 
elite*gold: 0
Join Date: Sep 2016
Posts: 172
Received Thanks: 107
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..
[GameAdvisor]Finn is offline  
Thanks
1 User
Old   #7
 
elite*gold: 220
Join Date: Jul 2018
Posts: 85
Received Thanks: 22
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.
ShaiyaIwanttolearn is offline  
Thanks
1 User
Old   #8
 
[GameAdvisor]Finn's Avatar
 
elite*gold: 0
Join Date: Sep 2016
Posts: 172
Received Thanks: 107
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..
[GameAdvisor]Finn is offline  
Thanks
1 User
Old   #9
 
elite*gold: 220
Join Date: Jul 2018
Posts: 85
Received Thanks: 22
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?
ShaiyaIwanttolearn is offline  
Reply


Similar Threads Similar Threads
[Jade Dynasty]Utopia Dynasty Rates*x50/x50/x50*
06/22/2011 - Private Server - 383 Replies
Hello everyone, We wish you a pleasant stay in InfinityFlyFF Online Server. We planning to keep an Long Term FlyFF Online Server like we host our MU Server which is already 4 years old. Granted Uptime and 24/7 Support. Server grant opening is on 3 February, 2011. http://www.youtube.com/watch?v=mEiGx76URMA&hd =1



All times are GMT +2. The time now is 16:41.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.