Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 22:05

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

Advertisement



[Question]Script Check Please..Need a Prof.To Check This Script!

Discussion on [Question]Script Check Please..Need a Prof.To Check This Script! within the SRO Private Server forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 365
Received Thanks: 381
[Question]Script Check Please..Need a Prof.To Check This Script!

Hello guys..
I want some of you to check this script and tell me if it works..or if there is any thing has to be modified or so...
It's a log procedure..that should Excute a query when a char lvls up.
PHP Code:
USE [Log_DB]
GO
/****** Object:  StoredProcedure [dbo].[_AddLogChar]    Script Date: 02/09/2014 22:43:28 ******/
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 and @len_desc 0)
    
begin    
        insert _LogEventChar values
(@CharIDGetDate(), @EventID, @Data1, @Data2, @strPos, @Desc)    
    
end
    
else if (@len_pos and @len_desc 0)
    
begin     
        insert _LogEventChar 
(CharIDEventTimeEventIDData1Data2EventPosvalues(@CharIDGetDate(), @EventID, @Data1, @Data2, @strPos)
    
end
    
else if (@len_pos and @len_desc 0)
    
begin     
        insert _LogEventChar 
(CharIDEventTimeEventIDData1Data2strDescvalues(@CharIDGetDate(), @EventID, @Data1, @Data2, @Desc)
    
end
    
else
    
begin
        insert _LogEventChar 
(CharIDEventTimeEventIDData1Data2values(@CharIDGetDate(), @EventID, @Data1, @Data2)
    
end




IF @EventID 22 -- Character level up
BEGIN
        
DECLARE @CharNameEQ VARCHAR(64) = (SELECT CharName16 from [SRO_VT_SHARD_INIT].[dbo].[_CharWHERE CharID = @CharID)

        
BEGIN
            EXEC 
[SRO_VT_SHARD_INIT].[dbo].[W/E] @CharNameEQ7
        END
        
    END 
khaledlollol is offline  
Old 02/09/2014, 22:49   #2
 
A new hope's Avatar
 
elite*gold: 0
Join Date: Sep 2012
Posts: 753
Received Thanks: 711
should work.
A new hope is offline  
Old 02/09/2014, 22:52   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 961
Received Thanks: 648
Yea, it should be working properly. However, Pay attention to the parameters required in the last procedure.

PHP Code:
EXEC [SRO_VT_SHARD_INIT].[dbo].[W/E] @CharNameEQ
magicanoo is offline  
Old 02/09/2014, 23:09   #4
 
elite*gold: 0
Join Date: May 2011
Posts: 365
Received Thanks: 381
when i execute it manually the **** works but this script has something wrong that it doesnt execute that query when a char lvls up so weird... check it again or try it with a different query change the query below and try it..
khaledlollol is offline  
Thanks
1 User
Old 02/10/2014, 07:16   #5
 
elite*gold: 2
Join Date: Aug 2011
Posts: 833
Received Thanks: 1,130
whats the ", 7" for?

first... you should not input the character name... its a bad habbit... you should pass the character id, rather then executing that search EVERY time the log procedure is run... its bad.

Code:
IF @EventID = 22 -- Character level up 
BEGIN 
        BEGIN 
            EXEC [SRO_VT_SHARD_INIT].[dbo].[W/E] @CharID, @Data1, @Data2
        END 
END
If a character levels up from 19 > 20... Data1 would be 19, Data2 would be 20... Pick one, or both like i did...

But try to avoid adding sql queries to log procedures like i said...

Finally... I dont see what the point of this new table is...

SELECT * FROM [SRO_VT_SHARD_INIT].[dbo].[W/E]

will be exactly the same as

SELECT * FROM [SRO_VT_LOG].[dbo].[_LogEventChar] WHERE [EventID] = 22

so.... yea...
Timlock is offline  
Old 02/11/2014, 09:32   #6
 
elite*gold: 0
Join Date: May 2011
Posts: 365
Received Thanks: 381
This is a query to run an Auto Equipment System...
And this 7 is the+ of the Item and CharID cant be added there cuz the whole system works with char name.
That Table works but this Query at LogChar doesnt seem to work if i try to executee this

EXEC [SRO_T_SHARD_INIT].[dbo].[W/E] @CharName , 7
i get my gear..
but when i level up it should run the query but it doesnt..
khaledlollol is offline  
Thanks
1 User
Old 02/11/2014, 12:52   #7
 
KingDollar's Avatar
 
elite*gold: 857
Join Date: Dec 2013
Posts: 857
Received Thanks: 679
ummm


you are using srzor GS ?
KingDollar is offline  
Reply


Similar Threads Similar Threads
[Release] PaySafeCard Check Spenden Script
02/03/2013 - Metin2 PServer Guides & Strategies - 36 Replies
Hey Leute, wollte euch hier mein Spenden Script für euch zu Verfügung stellen, welches eigentlich für den Verkauf vorgesehen war, dann aber doch weniger Zeit beanspruchte als ich gedacht habe. Features - User gibt PSC Code ein, Script Checkt Guthaben der PSC -> User bekommt Coins bei erfolgreicher Spende (optional) -> PSC Code wird per Mail an Admin gesendet Vorraussetzungen - Webspace mit PHP cURL Erweiterung
Script check
01/29/2013 - EO PServer Hosting - 0 Replies
And then galerinha, blz? Today I am with a question, how do I check the map a script that family owns?:confused:
I want check on This Script
05/10/2010 - Kal Online - 0 Replies
I Made This Script and i want know if anyone can Penetrates db from this script or no i mean i want know this script protected or no Name Script : Find Password With ID and SN This the Site : http://196.205.224.124 ID : asdsa SN : sa And Password Will Be : Solve
PHP check script
11/26/2009 - Dekaron Private Server - 5 Replies
I think its wrong selection , but oke. Where can i set limit to the user names So ppl cant add "$, ^, %, etc"?? */ //settings
script for attendance check
07/22/2009 - Kal Online - 11 Replies
I am not looking for one, just someone to point me in the right direction I want to make a script which would automatically do the attendance check for multiple accounts in what language should I attempt? python? willing to learn here :mofo:



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


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.