-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Its because the program is reading the tables within a certain time, you could always make it check the tables more often for kills.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
how to make it read the tables faster ?
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Crue
i have a small question why the notice take long time to appear
maybe cuz i open the server from my pc ?
The original code has 5 seconds interval on sending notices. Having so many records will take awhile. If you doing "PlusNotice" you might wanna put code to delete the log if it's overdue for like 2 days or so. If you doing kill notices, you might wanna set some kind of kill count reset sequence every 1 month/1 week or so. And another thing, setup INDEXING in the table to make it search faster. And of course, having SQL and GS running in your laptop is far slower than having them running in the real server.
Quote:
Originally Posted by
B1QB0SS
how to make it read the tables faster ?
Get a better equipment
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
The original code has 5 seconds interval on sending notices. Having so many records will take awhile. If you doing "PlusNotice" you might wanna put code to delete the log if it's overdue for like 2 days or so. If you doing kill notices, you might wanna set some kind of kill count reset sequence every 1 month/1 week or so. And another thing, setup INDEXING in the table to make it search faster. And of course, having SQL and GS running in your laptop is far slower than having them running in the real server.
Get a better equipment
My Server Running On 16GB Dedicated And Still SLow -.- And When i Open PlusNotice Prog it i'll Send Old Upgraded items While THe program was Offline
sorry for bad english but try to understand :D
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
B1QB0SS
My Server Running On 16GB Dedicated And Still SLow
sorry for bad english but try to understand :D
Then the problem is not related to the server, but to the person.
sorry I tried to understand your Eblish but I couldn't.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
Eblish
hmm maybe my english better than yours -.-
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
B1QB0SS
hmm maybe my english better than yours -.-
b1qnab , you can go out from here if you don't like the release
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Crue
b1qnab , you can go out from here if you don't like the release
Another Idiot "Egyptian" Calm your Tits iam Not talking With you 14 y/o kid
Iam talking with Thread Owner Not A bull Of SHit Named "Crue" Just Avoid me And you'll be Fine
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
B1QB0SS
Another Idiot "Egyptian" Calm your Tits iam Not talking With you 14 y/o kid
Iam talking with Thread Owner Not A bull Of SHit Named "Crue" Just Avoid me And you'll be Fine
b1qnab 12 years old talk , dude you are egyptian and have your idoit pic
and all know you are egyptian and avoid you ? haha you make me laugh
i won't waste my time with you
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
You guys can go argue/fight/beat/kill each other somewhere else, this is not proper place for it. thank you.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
You guys can go argue/fight/beat/kill each other somewhere else, this is not proper place for it. thank you.
+1 xD
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Crue
b1qnab 12 years old talk , dude you are egyptian and have your idoit pic
and all know you are egyptian and avoid you ? haha you make me laugh
i won't waste my time with you
Your Face Like : :fanny:
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
thanks alot, combined it to work with the pvp logs, working flawless.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
turkplaya
thanks alot, combined it to work with the pvp logs, working flawless.
nicely done :)
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
nicely done :)
Thanks to your release :)
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Hello Bro It's Work Fine But Notic Do not show But Show This
http://im37.gulfup.com/Sc7IW.jpg
And Show This
http://im37.gulfup.com/SIB7S.jpg
Help Plzz :)
- - - Updated - - -
Sorry Bro I'm Work It Sorry For My Comment :)
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Hex1337
amazing :D thnx
I assume you got it working on your side, excellent ;)
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
why do I always get "Version incorrect" even I already changed the version similar to my server?
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
ignore"version incorect" just login...
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
It's not working for me the job nicknames, if I switch to real char names it works.~
/edit
It works now, I changed to this
Quote:
DECLARE @KillerNickName VARCHAR(200)
DECLARE @CharNickName VARCHAR(200)
select @KillerNickName = NickName16 FROM [SRO_VT_SHARD].[dbo].[_CharNickNameList] WHERE CharID = @KillerID
select @CharNickName = NickName16 FROM [SRO_VT_SHARD].[dbo].[_CharNickNameList] WHERE CharID = @CharID
It wasn't working because players have more than 1 alias associated to their charid.. so DB doesnt know which one to choose, now it chooses the 1st name from the list.
Isn't there a way to check which one they're using now? If not then I'll just use real char names.
And now found out that it sends a notice when the user kills or gets killed by a Job mob...
Wish people did more testing before releasing, but thanks.
Here's a dirty hack to not show monster kills while job, adapt it to your own noticewriter.
Quote:
IF (@veremosjob LIKE '%Monster%')
BEGIN
SELECT @@VERSION
END
ELSE BEGIN
SELECT dbo.WriteTextFile(@veremosjob, @randomfile, 0)
END
-- Update the log
INSERT INTO _LogEventPVP VALUES (0, @KillerID, @CharID, @JobType, GETDATE(), @strPos, @strDesc)
UPDATE _LogEventPVP SET isSent = 1 WHERE CharID = @CharID AND EventTime < DATEADD(MINUTE, -5, GETDATE())
SELECT dbo.WriteTextFile(@veremos, @randomfile, 0)
Also would it be possible to make something that checks if the kill notice is the same as the last one and not post if it is, to avoid flood, instead of 5 minute timer.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
isozy
It's not working for me the job nicknames, if I switch to real char names it works.~
/edit
It works now, I changed to this
It wasn't working because players have more than 1 alias associated to their charid.. so DB doesnt know which one to choose, now it chooses the 1st name from the list.
Isn't there a way to check which one they're using now? If not then I'll just use real char names.
The query was made under SQL2008 environment. For SQL-2005 You have to first "DECLARE", then another line doing "SET", because doing DECLARE at the same line assigning variable only works in SQL-2008.
About getting charracter nickname, do "SELECT TOP (1)" instead of "SELECT", but we wouldn't know which of the name the player is using right now because there are no ID column, I forgot that a player can have multiple nicknames and selecting all of those could give an empty result for single variable.
cheers ;)
Quote:
Originally Posted by
isozy
And now found out that it sends a notice when the user kills or gets killed by a Job mob...
Wish people did more testing before releasing, but thanks.
Here's a dirty hack to not show monster kills while job, adapt it to your own noticewriter.
Also would it be possible to make something that checks if the kill notice is the same as the last one and not post if it is, to avoid flood, instead of 5 minute timer.
About this I wouldn't know, I didn't include monsters in the code. Good tips though :)
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
The query was made under SQL2008 environment. For SQL-2005 You have to first "DECLARE", then another line doing "SET", because doing DECLARE at the same line assigning variable only works in SQL-2008.
About getting charracter nickname, do "SELECT TOP (1)" instead of "SELECT", but we wouldn't know which of the name the player is using right now because there are no ID column, I forgot that a player can have multiple nicknames and selecting all of those could give an empty result for single variable.
cheers ;)
About this I wouldn't know, I didn't include monsters in the code. Good tips though :)
I'm using 2008 R2... I'm sure I speak english well enough for you to understand me, so let's try again.
1. It wasn't working because players have more than ONE NAME for their jobs... example if you have two characters, 1 hunter and 1 thief, you will have 2 names for the same CHARID.
1.1 Database doesn't know which name to use for CHARID because theres more than one, therefore doesn't send the notice.
1.2 Because I used DECLARE and SET it started sending the notice, I assume it just chose a random name from the list.
2. You didn't include monsters in the code, let me remind you of the fundamentals of Silkroad jobs. When you go do a trade or you go steal a trade being a Thief, if you have merchandise there will be NPC hunters/thiefs killing you.
2.1 If you die by one of those NPC thiefs or hunters that spawn while you are on JOB it will send out a notice saying you got killed by the NPC.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
isozy
I'm using 2008 R2... I'm sure I speak english well enough for you to understand me, so let's try again.
Sure
Quote:
Originally Posted by
isozy
1. It wasn't working because players have more than ONE NAME for their jobs... example if you have two characters, 1 hunter and 1 thief, you will have 2 names for the same CHARID.
The query works in general, with 1 name, you just said "it doesn't work" as in general meaning. As you said in your first post:
Quote:
Originally Posted by
isozy
It's not working for me the job nicknames, if I switch to real char names it works.~
/edit
Right there.
Quote:
Originally Posted by
isozy
1.1 Database doesn't know which name to use for CHARID because theres more than one, therefore doesn't send the notice.
Yes, I noticed that. that's why I replied with this:
Quote:
Originally Posted by
Witchy Moo
...but we wouldn't know which of the name the player is using right now because there are no ID column, I forgot that a player can have multiple nicknames and selecting all of those could give an empty result for single variable...
So it's up to you guys how you wanna hack the query.
Quote:
Originally Posted by
isozy
1.2 Because I used DECLARE and SET it started sending the notice, I assume it just chose a random name from the list.
Changing the DECLARE @variable TYPE = value to DECLARE and SET don't have anything to do with the goal of sending the notices. You did changed the single line in to multiple lines and you said "it works" after that and not before, which makes me think multiple lines made the query works in your server, which also makes me think you're using SQL 2005 since single line declaration doesn't work in SQL 2005. Or maybe I'm just too stupid to understand what you meant by that.
Quote:
Originally Posted by
isozy
2. You didn't include monsters in the code, let me remind you of the fundamentals of Silkroad jobs. When you go do a trade or you go steal a trade being a Thief, if you have merchandise there will be NPC hunters/thiefs killing you.
2.1 If you die by one of those NPC thiefs or hunters that spawn while you are on JOB it will send out a notice saying you got killed by the NPC.
Like I said, good tips, good info, thanks for reminding. You can do as you pleased with the query codes. Perhaps you might even share with us when you got it working under your modifications :)
cheers
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Nah, I was hoping you could help, I'm not very experienced I just hack my way in.
Quote:
Changing the DECLARE @variable TYPE = value to DECLARE and SET don't have anything to do with the goal of sending the notices. You did changed the single line in to multiple lines and you said "it works" after that and not before, which makes me think multiple lines made the query works in your server, which also makes me think you're using SQL 2005 since single line declaration doesn't work in SQL 2005. Or maybe I'm just too stupid to understand what you meant by that.
It didn't work with multiple names and the way I did it made it work with multiple names, we just need a way to verify which one is the current one.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
isozy
Nah, I was hoping you could help, I'm not very experienced I just hack my way in.
It didn't work with multiple names and the way I did it made it work with multiple names, we just need a way to verify which one is the current one.
Well, I'm just too dumb to do that on my own :ehh:, so, by all means, do that, and perhaps it'll be nice if you can share after.
cheers
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
Well, I'm just too dumb to do that on my own :ehh:, so, by all means, do that, and perhaps it'll be nice if you can share after.
cheers
I didnt work pls help me
http://u1312.hizliresim.com/1j/k/vmq8j.png
AddLogChar
Quote:
USE [SRO_VT_LOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 12/17/2013 20:25:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogChar]
@CharID int,
@EventID tinyint,
@Data1 int,
@Data2 int,
@strPos varchar(64),
@Desc varchar(128)
as
declare @len_pos int
declare @len_desc int
set @len_pos = len(@strPos)
set @len_desc = len(@Desc)
if (@len_pos > 0 and @len_desc > 0)
begin
return -1
end
else if (@len_pos > 0 and @len_desc = 0)
begin
return -2
end
else if (@len_pos = 0 and @len_desc > 0)
begin
return -3
end
else
begin
return -4
end
IF (@EventID = 20) -- PVP
BEGIN
IF (@Desc LIKE '%Trader, Neutral, no freebattle team%' -- Trader
OR @Desc LIKE '%Hunter, Neutral, no freebattle team%' -- Hunter
OR @Desc LIKE '%Robber, Neutral, no freebattle team%' -- Thief
OR @Desc like '%no job, Neutral, %no job, Neutral%' -- Free PVP
)
BEGIN
-- Get killer name
DECLARE @KillerName VARCHAR(512) = @Desc
DECLARE @KillerID INT = 0
SELECT @KillerName = REPLACE(@KillerName, LEFT(@KillerName, CHARINDEX('(', @KillerName)), '')
SELECT @KillerName = REPLACE(@KillerName, RIGHT(@KillerName, CHARINDEX(')', REVERSE(@KillerName))), '')
SELECT @KillerID = CharID FROM [SRO_VT_SHARD].[dbo].[_Char] WHERE CharName16 = @KillerName
-- Get job type
DECLARE @JobString VARCHAR(10) = LTRIM(RTRIM(SUBSTRING(@Desc, 5, 7)))
DECLARE @JobType INT = CASE
WHEN @JobString LIKE 'Trader' THEN 1
WHEN @JobString LIKE 'Robber' THEN 2
WHEN @JobString LIKE 'Hunter' THEN 3
ELSE 0 END
-- Delete original log
DELETE FROM _LogEventChar WHERE CharID = @CharID AND EventID = 20
AND (strDesc LIKE '%Trader, Neutral, no freebattle team%'
OR strDesc LIKE '%Hunter, Neutral, no freebattle team%'
OR strDesc LIKE '%Robber, Neutral, no freebattle team%'
OR @Desc like '%no job, Neutral, %no job, Neutral%')
-- Get additional info for notice message
DECLARE @CharName VARCHAR(64) = (SELECT CharName16 FROM [SRO_VT_SHARD].[dbo].[_Char] WHERE CharID = @CharID)
DECLARE @JobDesc VARCHAR(32) = CASE WHEN @JobType BETWEEN 1 AND 3 THEN 'Job Conflict' ELSE 'Free PVP' END
DECLARE @strDesc VARCHAR(512)
IF (@JobString LIKE 'Trader' OR @JobString LIKE 'Robber' OR @JobString LIKE 'Hunter')
BEGIN
-- If it's a Job Kill, then write character nicknames
DECLARE @KillerNickName VARCHAR(64) = (SELECT NickName16 FROM [SRO_VT_SHARD].[dbo].[_CharNickNameList] WHERE CharID = @KillerID)
DECLARE @CharNickName VARCHAR(64) = (SELECT NickName16 FROM [SRO_VT_SHARD].[dbo].[_CharNickNameList] WHERE CharID = @CharID)
SET @strDesc = '[' + @KillerNickName + '] has just killed [' + @CharNickName + '] in [' + @JobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
ELSE BEGIN
-- If it's normal PVP Kill, write real character names
SET @strDesc = '[' + @KillerName + '] has just killed [' + @CharName + '] in [' + @JobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
-- Update the log
INSERT INTO _LogEventPVP VALUES (0, @KillerID, @CharID, @JobType, GETDATE(), @strPos, @strDesc)
-- Flag notice if it's not sent more than 5 minutes
UPDATE _LogEventPVP SET isSent = 1 WHERE CharID = @CharID AND EventTime < DATEADD(MINUTE, -5, GETDATE())
END
END
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
ahmetagcan
I didnt work pls help me
First:
change this:
Code:
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len(@Desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
return -1
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
return -2
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
return -3
end
else
begin
return -4
end
to this:
Code:
IF (@EventID != 20)
BEGIN
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len(@Desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
return -1
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
return -2
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
return -3
end
else
begin
return -4
end
END
Second, make sure your SR_GameServer is LOGGING, again and again and again I repeat, if you use Evangelion SR_GameServer and you disable the log inside the .ini file, it will not log anything at all. So make sure it's working. How? well you seems to put "-1" to all conditions there so check out the _LogEventItem table, maybe there are some records there, if not, means MAYBE your server is not logging anything.
good luck
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
First:
change this:
Code:
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len(@Desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
return -1
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
return -2
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
return -3
end
else
begin
return -4
end
to this:
Code:
IF (@EventID != 20)
BEGIN
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len(@Desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
return -1
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
return -2
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
return -3
end
else
begin
return -4
end
END
Second, make sure your SR_GameServer is LOGGING, again and again and again I repeat, if you use Evangelion SR_GameServer and you disable the log inside the .ini file, it will not log anything at all. So make sure it's working. How? well you seems to put "-1" to all conditions there so check out the _LogEventItem table, maybe there are some records there, if not, means MAYBE your server is not logging anything.
good luck
I changed new error
http://u1312.hizliresim.com/1j/l/vn38h.png
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
ahmetagcan
you forgot "(" sign before "@len_pos" on every line. I think it's pretty CLEAR in your SQL window that the RED underline appears under the wrong statement. Well things like this happens when you just copy paste without reading it.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
People should stop copy paste stuff. YOU WILL NEVER LEARN ANYTHING OUT OF IT ! SQL can be really simple, just give it some time.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
I got his error when I try to modify _AddLogChar SP
Quote:
Mens. 137, Nivel 15, Estado 2, Línea 1
Must declare the scalar variable "@EventID".
Mens. 137, Nivel 15, Estado 2, Línea 3
Must declare the scalar variable "@Desc".
Mens. 137, Nivel 15, Estado 2, Línea 10
Must declare the scalar variable "@Desc".
Mens. 137, Nivel 15, Estado 2, Línea 12
Must declare the scalar variable "@KillerName".
Mens. 137, Nivel 15, Estado 2, Línea 13
Must declare the scalar variable "@KillerName".
Mens. 137, Nivel 15, Estado 2, Línea 14
Must declare the scalar variable "@KillerName".
Mens. 137, Nivel 15, Estado 2, Línea 16
Must declare the scalar variable "@Desc".
Mens. 137, Nivel 15, Estado 2, Línea 18
Must declare the scalar variable "@JobString".
Mens. 137, Nivel 15, Estado 2, Línea 23
Must declare the scalar variable "@CharID".
Mens. 137, Nivel 15, Estado 2, Línea 29
Must declare the scalar variable "@CharID".
Mens. 137, Nivel 15, Estado 2, Línea 30
Must declare the scalar variable "@JobType".
Mens. 137, Nivel 15, Estado 2, Línea 32
Must declare the scalar variable "@JobString".
Mens. 137, Nivel 15, Estado 2, Línea 36
Must declare the scalar variable "@CharID".
Mens. 137, Nivel 15, Estado 2, Línea 37
Must declare the scalar variable "@CharNickName".
Mens. 137, Nivel 15, Estado 2, Línea 41
Must declare the scalar variable "@KillerName".
Mens. 137, Nivel 15, Estado 2, Línea 44
Must declare the scalar variable "@CharID".
Mens. 137, Nivel 15, Estado 2, Línea 46
Must declare the scalar variable "@CharID".
I am stuck in that any help will be thankful
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
pandahot
I got his error when I try to modify _AddLogChar SP
I am stuck in that any help will be thankful
Ah, I recon you use MSSQL-2005, or didn't u?
Single line declaration and variable setting doesn't work in MSSQL-2005, it works only in MSSQL-2008 and above.
So the solution is you have to change all declarations that appears like this:
Code:
DECLARE @variableName VARTYPE = Value
into this:
Code:
DECLARE @variableName VARTYPE
SET @variableName = Value
For example, in the first declaration in that SP (getting killer name), you will find this:
Change that to:
Do the same for all other declarations in that SP and re-run it :)
good luck
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
can you give me this noticewriter source code?
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
B1QB0SS
can you give me this noticewriter source code?
you can't create your own ? b1qb0ss ?
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
B1QB0SS
can you give me this noticewriter source code?
I cannot, because it's already in the FIRST PAGE of this topic.... duh? :blink:
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
why my strdesc is null. I used SP on first page
0 461933 320888 3 2014-01-02 14:09:00.057 ?? ?(0x5faa) (546, 127) NULL
so Tool writenoice dont send msg and crash
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
All OKE But when many people PVP , Windown noitece GLOBAL is full
I Want edit to this notifice show in a newwindow
Can u Fix it
http://d.f21.photo.zdn.vn/upload/ori...11_574_574.jpg
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
well..is eazy and same time hard...
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
mylove0990
All OKE But when many people PVP , Windown noitece GLOBAL is full
I Want edit to this notifice show in a newwindow
Can u Fix it
No I cannot, I'm not the one who created PlusNotice, I simply modified it to work with my Stored Procedure, if you have questions related to PlusNotice features (such as changing notice to system window and so on so forth), you can post in original thread of PlusNotice, right here.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Error:
Msg 137, Level 15, State 2, Line 1Must declare the scalar variable "@EventID".
Msg 137, Level 15, State 2, Line 3
Must declare the scalar variable "@desc".
Msg 137, Level 15, State 2, Line 10
Must declare the scalar variable "@desc".
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '@killername'.
Msg 137, Level 15, State 2, Line 14
Must declare the scalar variable "@killername".
Msg 102, Level 15, State 1, Line 16
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Line 18
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 23
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 29
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 30
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 36
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 37
Must declare the scalar variable "@CharnickName".
Msg 137, Level 15, State 2, Line 41
Must declare the scalar variable "@killername".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 46
Must declare the scalar variable "@CharID".
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
MeGZONE
Error:
SQL 2005 i presume?
http://forum.ragezone.com/f722/simpl...ml#post7922535
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
No i have SQL Server 2008 R2
Give me ur Skype
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
MeGZONE
No i have SQL Server 2008 R2
Give me ur Skype
Then you put wrong variables at declaration statement lines. Those error were simply SQL errors in general which can happen in any SP at anytime. So take your time to review your own statements in the SP, doing raw copy + paste + complaint won't get your anywhere.
Or better yet, attach your SP here.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
Then you put wrong variables at declaration statement lines. Those error were simply SQL errors in general which can happen in any SP at anytime. So take your time to review your own statements in the SP, doing raw copy + paste + complaint won't get your anywhere.
Or better yet, attach your SP here.
Code:
USE [LOG_DB]GO
/****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 01/09/2014 20:12:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogChar] @CharID int, @eventID tinyint, @data1 int, @data2 int,
@strPos varchar(64), @desc varchar(128)
as
if( @eventID=4 or @eventID=6 or @eventID=9 )
BEGIN
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len @desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
insert _LogEventChar values @CharID, GetDate(), @eventID, @data1, @data2, @strPos, @desc)
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values @CharID, GetDate(), @eventID, @data1, @data2, @strPos)
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values @CharID, GetDate(), @eventID, @data1, @data2, @desc)
end
else
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values @CharID, GetDate(), @eventID, @data1, @data2)
end
--DELETE TOP (3) FROM _LogEventChar WHERE EventTime < DATEADD(week, -2, GETDATE())
END
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
no no... don't paste your SP, i said "ATTACH", not "PASTE", RageZone has weird feature translating words began with "@" as link to user profile, which is annoying, it'll mess up some codes.. so attach it as file.
-
1 Attachment(s)
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
Witchy Moo
no no... don't paste your SP, i said "ATTACH", not "PASTE", RageZone has weird feature translating words began with "@" as link to user profile, which is annoying, it'll mess up some codes.. so attach it as file.
OK uploaded
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
After change declaration to 2005 Version I still have errors
Code:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 47
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 51
Incorrect syntax near '@desc'.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
lewy1000
After change declaration to 2005 Version I still have errors
Code:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 47
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 51
Incorrect syntax near '@desc'.
No offense but if you dont master SQL basics, you shouldn't waste your time on db editing.
-
1 Attachment(s)
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Quote:
Originally Posted by
mylove0990
why my strdesc is null. I used SP on first page
0 461933 320888 3 2014-01-02 14:09:00.057 ?? ?(0x5faa) (546, 127) NULL
so Tool writenoice dont send msg and crash
the same problem
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
why my strdesc is null. I used SP on first page
0 461933 320888 3 2014-01-02 14:09:00.057 ?? ?(0x5faa) (546, 127) NULL
so Tool writenoice dont send msg and crash
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 39
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 44
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 45
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 48
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 50
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 62
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 64
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 69
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 73
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 76
Must declare the scalar variable "@jobType".
Msg 156, Level 15, State 1, Procedure _AddLogChar, Line 80
Incorrect syntax near the keyword 'END'.
!!
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Code:
USE [LOG_DB]
GO
/****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 02/07/2014 01:52:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogChar]
@CharID int,
@eventID tinyint,
@data1 int,
@data2 int,
@strPos varchar(64),
@desc varchar(128)
as
IF @eventID != 20)
BEGIN
declare @Len_pos int
declare @Len_desc int
set @Len_pos = len(@strPos)
set @Len_desc = len @desc)
if @Len_pos > 0 and @Len_desc > 0)
begin
insert _LogEventChar values @CharID, GetDate(), @eventID, @data1, @data2, @strPos, @desc)
end
else if @Len_pos > 0 and @Len_desc = 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values @CharID, GetDate(), @eventID, @data1, @data2, @strPos)
end
else if @Len_pos = 0 and @Len_desc > 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values @CharID, GetDate(), @eventID, @data1, @data2, @desc)
end
else
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values @CharID, GetDate(), @eventID, @data1, @data2)
end
END
IF @eventID = 20) -- PVP
BEGIN
IF @desc LIKE '%Trader, Neutral, no freebattle team%' -- Trader
OR @desc LIKE '%Hunter, Neutral, no freebattle team%' -- Hunter
OR @desc LIKE '%Robber, Neutral, no freebattle team%' -- Thief
OR @desc like '%no job, Neutral, %no job, Neutral%' -- Free PVP
)
BEGIN
-- Get killer name
DECLARE @killername VARCHAR(512)
SET @killername = @desc
DECLARE @killeriD INT
SET @killeriD = 0
SELECT @killername = REPLACE @killername, LEFT @killername, CHARINDEX('(', @killername)), '')
SELECT @killername = REPLACE @killername, RIGHT @killername, CHARINDEX(')', REVERSE @killername))), '')
SELECT @killeriD = CharID FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharName16 = @killername
-- Get job type
DECLARE @jobString VARCHAR(10)
SET @jobString= LTRIM(RTRIM(SUBSTRING @desc, 5, 7)))
DECLARE @jobType INT
SET @jobType= CASE
WHEN @jobString LIKE 'Trader' THEN 1
WHEN @jobString LIKE 'Robber' THEN 2
WHEN @jobString LIKE 'Hunter' THEN 3
ELSE 0 END
-- Delete original log
DELETE FROM _LogEventChar WHERE CharID = @CharID AND EventID = 20
AND (strDesc LIKE '%Trader, Neutral, no freebattle team%'
OR strDesc LIKE '%Hunter, Neutral, no freebattle team%'
OR strDesc LIKE '%Robber, Neutral, no freebattle team%'
OR @desc like '%no job, Neutral, %no job, Neutral%')
-- Get additional info for notice message
DECLARE @CharName VARCHAR(64)
SET @CharName = (SELECT CharName16 FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharID = @CharID)
DECLARE @jobDesc VARCHAR(32)
SET @jobDesc= CASE WHEN @jobType BETWEEN 1 AND 3 THEN 'Job Conflict' ELSE 'Free PVP' END
DECLARE @strDesc VARCHAR(512)
IF @jobString LIKE 'Trader' OR @jobString LIKE 'Robber' OR @jobString LIKE 'Hunter')
BEGIN
-- If it's a Job Kill, then write character nicknames
DECLARE @killerNickName VARCHAR(64)
SET @killerNickName = (SELECT NickName16 FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharID = @killeriD)
DECLARE @CharnickName VARCHAR(64)
SET @CharnickName= (SELECT NickName16 FROM [SRO_VT_SHARD_INIT].[dbo].[_Char] WHERE CharID = @CharID)
SET @strDesc = '[' + @killerNickName + '] has just killed [' + @CharnickName + '] in [' + @jobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
ELSE BEGIN
-- If it's normal PVP Kill, write real character names
SET @strDesc = '[' + @killername + '] has just killed [' + @CharName + '] in [' + @jobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
-- Update the log
INSERT INTO _LogEventPVP VALUES (0, @killeriD, @CharID, @jobType, GETDATE(), @strPos, @strDesc)
-- Flag notice if it's not sent more than 5 minutes
UPDATE _LogEventPVP SET isSent = 1 WHERE CharID = @CharID AND EventTime < DATEADD(MINUTE, -5, GETDATE())
END
END
Script works great, but when I kill some1 then nothing added to DB :<
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
http://i.hizliresim.com/xBnRR9.png
What is the cause of this error? Locations, please help me to correct the information I am writing Waiting
-
1 Attachment(s)
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
My ERROR:
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@EventID".
Msg 137, Level 15, State 2, Line 3
Must declare the scalar variable "@desc".
Msg 137, Level 15, State 2, Line 10
Must declare the scalar variable "@desc".
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Line 13
Incorrect syntax near '@killername'.
Msg 137, Level 15, State 2, Line 14
Must declare the scalar variable "@killername".
Msg 102, Level 15, State 1, Line 16
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Line 18
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 23
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 29
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 30
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Line 32
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Line 36
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 37
Must declare the scalar variable "@CharnickName".
Msg 137, Level 15, State 2, Line 41
Must declare the scalar variable "@killername".
Msg 137, Level 15, State 2, Line 44
Must declare the scalar variable "@CharID".
Msg 137, Level 15, State 2, Line 46
Must declare the scalar variable "@CharID".
and Attachs SP
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
AddLogChar gives me these errors :
Code:
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 81
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 86
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 87
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 90
Incorrect syntax near '@desc'.
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 92
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 104
Must declare the scalar variable "@jobType".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 106
Must declare the scalar variable "@jobString".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 111
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 115
Must declare the scalar variable "@jobDesc".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 118
Must declare the scalar variable "@jobType".
Msg 156, Level 15, State 1, Procedure _AddLogChar, Line 122
Incorrect syntax near the keyword 'END'.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Seriously you guys are all stupid as fuck.
The shit is just missing a few brackets... can you even set those yourself?
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
:junglejane: ok I'm new to this, so I only get that Systema Copy and execute these queries Explain to me please
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Error when executing query _AddLogChar Stored producer
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
1 Attachment(s)
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
hey @Witchy Moo , i'm working on 2005 i edit the _AddLogChar but i still can't fix it ! i get many errors also edited declares as u said
can u take a look and try to fix it or just tell me how !
here is my error msgs
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 45
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near '@killername'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 46
Incorrect syntax near 'REVERSE'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 50
Incorrect syntax near '@desc'.
Msg 156, Level 15, State 1, Procedure _AddLogChar, Line 52
Incorrect syntax near the keyword 'WHEN'.
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 66
Must declare the scalar variable "@jobType".
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 68
Incorrect syntax near ')'.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 71
Incorrect syntax near '('.
Msg 102, Level 15, State 1, Procedure _AddLogChar, Line 72
Incorrect syntax near '('.
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 73
Must declare the scalar variable "@killerNickName".
Msg 137, Level 15, State 2, Procedure _AddLogChar, Line 80
Must declare the scalar variable "@jobType".
Msg 156, Level 15, State 1, Procedure _AddLogChar, Line 84
Incorrect syntax near the keyword 'END'.
the full _AddLogChar in attachment
Fixed Thanks
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
hm..... cant get trough it.
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
i have this problem can anyone help???
http://im73.gulfup.com/Qaomg2.png
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
How to level restrictions? Example Lvl 95 + Killed
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
How could buffer instead of goods?
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
To everyone who get many sql errors and his brain has allot of blue screens :D
this is one is working just change eroticuskingz0r to SRO_VT_SHARD or your database name
CRTL +H > SEARCH "eroticuskingz0r"
Change to "MYDATABASENAME" (SRO_VT_SHARD)
add this script after last END .
Code:
IF (@EventID = 20) -- PVP
BEGIN
IF @desc LIKE '%Trader, Neutral, no freebattle team%' -- Trader
OR @desc LIKE '%Hunter, Neutral, no freebattle team%' -- Hunter
OR @desc LIKE '%Robber, Neutral, no freebattle team%' -- Thief
OR @desc like '%no job, Neutral, %no job, Neutral%' -- Free PVP
)
BEGIN
-- Get killer name
DECLARE @killername VARCHAR(512) = @desc
DECLARE @killeriD INT = 0
SELECT @killername = REPLACE @killername, LEFT @killername, CHARINDEX('(', @killername)), '')
SELECT @killername = REPLACE @killername, RIGHT @killername, CHARINDEX(')', REVERSE @killername))), '')
SELECT @killeriD = CharID FROM [eroticuskingz0rDB].[dbo].[_Char] WHERE CharName16 = @killername
-- Get job type
DECLARE @jobString VARCHAR(10) = LTRIM(RTRIM(SUBSTRING @desc, 5, 7)))
DECLARE @jobType INT = CASE
WHEN @jobString LIKE 'Trader' THEN 1
WHEN @jobString LIKE 'Robber' THEN 2
WHEN @jobString LIKE 'Hunter' THEN 3
ELSE 0 END
-- Delete original log
DELETE FROM _LogEventChar WHERE CharID = @CharID AND EventID = 20
AND (strDesc LIKE '%Trader, Neutral, no freebattle team%'
OR strDesc LIKE '%Hunter, Neutral, no freebattle team%'
OR strDesc LIKE '%Robber, Neutral, no freebattle team%'
OR @desc like '%no job, Neutral, %no job, Neutral%')
-- Get additional info for notice message
DECLARE @CharName VARCHAR(64) = (SELECT CharName16 FROM [eroticuskingz0rDB].[dbo].[_Char] WHERE CharID = @CharID)
DECLARE @jobDesc VARCHAR(32) = CASE WHEN @jobType BETWEEN 1 AND 3 THEN 'Job Conflict' ELSE 'Free PVP' END
DECLARE @strDesc VARCHAR(512)
IF @jobString LIKE 'Trader' OR @jobString LIKE 'Robber' OR @jobString LIKE 'Hunter')
BEGIN
-- If it's a Job Kill, then write character nicknames
DECLARE @killerNickName VARCHAR(64) = (SELECT NickName16 FROM [eroticuskingz0rDB].[dbo].[_CharNickNameList] WHERE CharID = @killeriD)
DECLARE @CharnickName VARCHAR(64) = (SELECT NickName16 FROM [eroticuskingz0rDB].[dbo].[_CharNickNameList] WHERE CharID = @CharID)
SET @strDesc = '[' + @killerNickName + '] has just killed [' + @CharnickName + '] in [' + @jobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
ELSE BEGIN
-- If it's normal PVP Kill, write real character names
SET @strDesc = '[' + @killername + '] has just killed [' + @CharName + '] in [' + @jobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
-- Update the log
INSERT INTO _LogEventPVP VALUES (0, @killeriD, @CharID, @jobType, GETDATE(), @strPos, @strDesc)
-- Flag notice if it's not sent more than 5 minutes
UPDATE _LogEventPVP SET isSent = 1 WHERE CharID = @CharID AND EventTime < DATEADD(MINUTE, -5, GETDATE())
END
END
http://i.imgur.com/D9LoDcn.png
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
help me to activate it on my server
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
them'm honest I'm a little rough with this part of Add_Charlog that more should I add and where in the DB
someone can take their time and explain well .. everything fits my DB but kill 10 times in the game is not active and not recorded in logeventchar
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
help please error ejecute code sro_vt_log
- - - Updated - - -
Quote:
Originally Posted by
Eroticus
To everyone who get many sql errors and his brain has allot of blue screens :D
this is one is working just change eroticuskingz0r to SRO_VT_SHARD or your database name
CRTL +H > SEARCH "eroticuskingz0r"
Change to "MYDATABASENAME" (SRO_VT_SHARD)
add this script after last END .
Code:
IF (@EventID = 20) -- PVP
BEGIN
IF @desc LIKE '%Trader, Neutral, no freebattle team%' -- Trader
OR @desc LIKE '%Hunter, Neutral, no freebattle team%' -- Hunter
OR @desc LIKE '%Robber, Neutral, no freebattle team%' -- Thief
OR @desc like '%no job, Neutral, %no job, Neutral%' -- Free PVP
)
BEGIN
-- Get killer name
DECLARE @killername VARCHAR(512) = @desc
DECLARE @killeriD INT = 0
SELECT @killername = REPLACE @killername, LEFT @killername, CHARINDEX('(', @killername)), '')
SELECT @killername = REPLACE @killername, RIGHT @killername, CHARINDEX(')', REVERSE @killername))), '')
SELECT @killeriD = CharID FROM [eroticuskingz0rDB].[dbo].[_Char] WHERE CharName16 = @killername
-- Get job type
DECLARE @jobString VARCHAR(10) = LTRIM(RTRIM(SUBSTRING @desc, 5, 7)))
DECLARE @jobType INT = CASE
WHEN @jobString LIKE 'Trader' THEN 1
WHEN @jobString LIKE 'Robber' THEN 2
WHEN @jobString LIKE 'Hunter' THEN 3
ELSE 0 END
-- Delete original log
DELETE FROM _LogEventChar WHERE CharID = @CharID AND EventID = 20
AND (strDesc LIKE '%Trader, Neutral, no freebattle team%'
OR strDesc LIKE '%Hunter, Neutral, no freebattle team%'
OR strDesc LIKE '%Robber, Neutral, no freebattle team%'
OR @desc like '%no job, Neutral, %no job, Neutral%')
-- Get additional info for notice message
DECLARE @CharName VARCHAR(64) = (SELECT CharName16 FROM [eroticuskingz0rDB].[dbo].[_Char] WHERE CharID = @CharID)
DECLARE @jobDesc VARCHAR(32) = CASE WHEN @jobType BETWEEN 1 AND 3 THEN 'Job Conflict' ELSE 'Free PVP' END
DECLARE @strDesc VARCHAR(512)
IF @jobString LIKE 'Trader' OR @jobString LIKE 'Robber' OR @jobString LIKE 'Hunter')
BEGIN
-- If it's a Job Kill, then write character nicknames
DECLARE @killerNickName VARCHAR(64) = (SELECT NickName16 FROM [eroticuskingz0rDB].[dbo].[_CharNickNameList] WHERE CharID = @killeriD)
DECLARE @CharnickName VARCHAR(64) = (SELECT NickName16 FROM [eroticuskingz0rDB].[dbo].[_CharNickNameList] WHERE CharID = @CharID)
SET @strDesc = '[' + @killerNickName + '] has just killed [' + @CharnickName + '] in [' + @jobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
ELSE BEGIN
-- If it's normal PVP Kill, write real character names
SET @strDesc = '[' + @killername + '] has just killed [' + @CharName + '] in [' + @jobDesc + '] mode on [' + CONVERT(NVARCHAR(30), GETDATE(), 0) + ']'
END
-- Update the log
INSERT INTO _LogEventPVP VALUES (0, @killeriD, @CharID, @jobType, GETDATE(), @strPos, @strDesc)
-- Flag notice if it's not sent more than 5 minutes
UPDATE _LogEventPVP SET isSent = 1 WHERE CharID = @CharID AND EventTime < DATEADD(MINUTE, -5, GETDATE())
END
END
http://i.imgur.com/D9LoDcn.png
help please error ejecute code sro_vt_log
-
[Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Hi, i want to send the notice for only specific player, for example who are in job mode. How can i do that
-
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
Thank You . Based on your Topic Iam make a PVP Rank .. Now my DB can count Kills, Killed and Killer in PVP MODE .. ALOT TY ..
now going to work and make a php code to count it in Rank to Web .
http://s2.postimg.org/quctw2je1/rank.png
-
1 Attachment(s)
Re: "Simplified" [Job/FreePVP Kill] Fetching (vSRO 1.88) - Now works with NoticeWrite
In case you need the working code (to add after the last end)
Attachment 163470