Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server > SRO PServer Guides & Releases
You last visited: Today at 05:40

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

Advertisement



[SQL] Kill Fetch [KillEvent/Points/Survival]

Discussion on [SQL] Kill Fetch [KillEvent/Points/Survival] within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
[SQL] Kill Fetch [KillEvent/Points/Survival]

PHP Code:
CREATE PROCEDURE Exo_KillFetch
-- =============================================
-- 
Author:        <Exo>
-- 
Create date: <13.5.2014>
-- 
Description:    <KillFetch>
-- =============================================
  @
CharID INT
  @
Desc   VARCHAR(512),
  @
strPos VARCHAR(64)
AS
BEGIN SET NOCOUNT ON;
--
//---------------------------------------------------------------
  
DECLARE
        @
KillerName   VARCHAR(max),
        @
KillerID     INT,
        @
JobType      VARCHAR(max),
        @
StartPos     TINYINT
--//---------------------------------------------------------------    

  
SELECT @StartPos   = (SELECT CHARINDEX('(',@desc)) + 1
  SELECT 
@KillerName = (SELECT SUBSTRING(@Desc, @StartPosCHARINDEX(')', @Desc, @StartPos) - @StartPos))
  
SELECT @KillerID   = (SELECT CharID FROM Fayox_Shard.._Char WHERE CharName16 = @KillerName)
--
//---------------------------------------------------------------
    
SELECT @JobType = CASE
           
WHEN   (@desc LIKE '%My: Trader%'
               OR (@
desc LIKE '%My: Robber%')
               OR (@
desc LIKE '%My: Hunter%')
                    
THEN 'Job'
         
WHEN (@desc LIKE '%Murderer%')  
                    
THEN 'Murder'
           
ELSE 'Free'
                  
END
--//---------------------------------------------------------------
BEGIN TRANSACTION     
--ADD your event conditions here example:
--IF (@
strPos '0x0000')
     --
BEGIN
        
-- Give silk
     
--END

  INSERT Fayox_Log
.._KillLogs VALUES (@KillerID,@CharID,@strPos,@JobType)
COMMIT TRANSACTION
END 
To run this procedure, go to your _AddLogChar SP and add this:
PHP Code:
IF (@EventID 20)
BEGIN
EXEC Exo_KillFetch 
@CharID,@Desc,@strPos
END 
​Exo is offline  
Thanks
10 Users
Old 03/20/2015, 21:47   #2
 
Justin1337*'s Avatar
 
elite*gold: 480
Join Date: Jan 2012
Posts: 655
Received Thanks: 579
Nice brother, thanks a lot. =)
Justin1337* is offline  
Old 03/20/2015, 21:48   #3
 
elite*gold: 0
Join Date: Dec 2010
Posts: 328
Received Thanks: 32
there is some thing wrong in this Query
zizoelnigm is offline  
Old 03/20/2015, 21:49   #4


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by zizoelnigm View Post
there is some thing wrong in this Query
which is?
​Exo is offline  
Old 03/20/2015, 23:58   #5
 
elite*gold: 0
Join Date: Jan 2015
Posts: 94
Received Thanks: 115
Nice Work Keep It Up ^_^
X-Vortex is offline  
Old 03/21/2015, 02:35   #6
 
elite*gold: 0
Join Date: Oct 2012
Posts: 137
Received Thanks: 110
I Like Your Way Of Coding.
geomangy is offline  
Old 03/21/2015, 11:48   #7
 
_0x0000's Avatar
 
elite*gold: 0
Join Date: Mar 2015
Posts: 3
Received Thanks: 0
thx you
_0x0000 is offline  
Old 03/21/2015, 12:15   #8


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
PS: Play with the trans as you like, hint: characters killed by mobs will be added and the KillerID will be null, you can skip that, just add you condition.
​Exo is offline  
Old 03/21/2015, 15:10   #9
 
elite*gold: 0
Join Date: Mar 2015
Posts: 48
Received Thanks: 2
Nice Job !
leader* is offline  
Old 03/22/2015, 12:39   #10
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
Code:
	IF	 @EventID = 19
	AND	(@Desc LIKE '/[My: Robber, %, no freebattle team/] /[His(%): Trader, %, no freebattle team/]' ESCAPE '/'
	OR	 @Desc LIKE '/[My: Trader, %, no freebattle team/] /[His(%): Robber, %, no freebattle team/]' ESCAPE '/'
	OR	 @Desc LIKE '/[My: Hunter, %, no freebattle team/] /[His(%): Robber, %, no freebattle team/]' ESCAPE '/'
	OR	 @Desc LIKE '/[My: Robber, %, no freebattle team/] /[His(%): Hunter, %, no freebattle team/]' ESCAPE '/')
Code:
SELECT	@KillerName = SUBSTRING(@Desc, (CHARINDEX('[His(', @Desc) +5), (CHARINDEX('): ', @Desc) - (CHARINDEX('[His(', @Desc) +5)))
i made mine like 1 or 2 years ago but its still faster then this...

feel free to use it
Syloxx is offline  
Thanks
3 Users
Old 03/22/2015, 12:49   #11


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
^ Because I fetch other kills? Actually all of them, and you jut fetch the job kills.

Also you have less conditions, even if it would be faster it wouldn't be more than 10ms or smth, nothing major there.
​Exo is offline  
Old 03/22/2015, 13:11   #12
 
Syloxx's Avatar
 
elite*gold: 56
Join Date: Oct 2013
Posts: 1,165
Received Thanks: 762
just add some more OR @Desc LIKE '' and you are ready to go
Syloxx is offline  
Old 03/22/2015, 13:20   #13


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Whatever...
​Exo is offline  
Old 03/24/2015, 12:31   #14
 
elite*gold: 0
Join Date: Jan 2008
Posts: 79
Received Thanks: 8
can u tell me how it start or where's the time to edit it i don't know how to start it
raptter is offline  
Old 03/24/2015, 12:49   #15


 
​Exo's Avatar
 
elite*gold: 28
Join Date: Aug 2014
Posts: 4,096
Received Thanks: 2,649
Quote:
Originally Posted by raptter View Post
can u tell me how it start or where's the time to edit it i don't know how to start it
PHP Code:
IF (@EventID 20)
BEGIN
EXEC Exo_KillFetch 
@CharID,@Desc,@strPos
END 
​Exo is offline  
Reply


Similar Threads Similar Threads
[Tutorial] Changing the kill cap and stat points given by the Vet Manager
09/14/2018 - Shaiya PServer Guides & Releases - 6 Replies
Hello everyone, As some of you may have remarked, on Shaiya Euphoria I modified the PvP rank kill caps and the amount of stat points a player receives from the Vet Manager after reaching a certain PvP rank. I was already asked by some individuals how to do it, so I decided to make a thread here on elitepvpers to explain how it is done. I hope that those who are reading this post are more curious about knowing how it is done, than just having it done by someone, and this is why I'll explain...
[Help] ClientSocket.Fetch
04/29/2013 - Flyff Private Server - 0 Replies
2013/ 4/29 09:16:44 Other Cache Connection - IP : 124.120.236.222 2013/ 4/29 09:19:03 Other Cache Connection - IP : 2013/ 4/29 09:19:22 CClientSocket.Fetch: ip = 124.120.236.222, size = 1330205781 2013/ 4/29 09:19:22 CClientSocket.Fetch: ip = 124.120.236.222, size = 1330205781 2013/ 4/29 09:19:22 CClientSocket.Fetch: ip = 124.120.236.222, size = 1330205781
[B]Boss KillEvent - Service
10/31/2011 - WarRock Trading - 3 Replies
/closed
Easy survival mode all win with 30 kill
08/27/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 5 Replies
Make a rum and scan 1 (team mode) Then switch to survival mode scan 2 Then pick the two adress that starts at 02 ((((Thats the adreess for survival mode all win))))))) To get 30 kill Start a game (team mode) then kill 1 enemy and scan 1 after that kill another one and scan 2..
Less PK Points Per Kill
02/19/2007 - CO2 Guides & Templates - 11 Replies
Ok Guys i have just remembred how to get 5 pk points everytime u kill some 1. You go up to the person you want to kill and go with no gear make him kill you a couple times to make him on ur enemy list. Then everytime you kill that person after you get him/her in enemy you will get 5 pk points if you already know this please dont flame this thanks. ;)



All times are GMT +2. The time now is 05:40.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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