[Release]Various SQL Scripts to Improve you SRO experience

11/04/2012 16:55 royalblade#1
1. Dont ask me to make this query faster
2. Dont flame me for being a lazyass and not using variables
3. Dont ask me for support
4. Dont PM me or anything else
5. If this has been posted b4, i dont give a fucking shit
6. EvaTools blablabla does that ye, but i had to write this cuz our eva didnt wanna work due to some heavy server lags...


PHP Code:
Declare @Charname varchar (64)
 
Set @Charname '600RR'
 
  
Insert into _BlockedUser ([UserJID]
      ,[
UserID]
      ,[
Type]
      ,[
SerialNo]
      ,[
timeBegin]
      ,[
timeEnd])
      
      
Values (
      (
Select UserJID from SRO_VT_SHARD.dbo._User Where CharID 
      (
Select CharID from SRO_VT_SHARD.dbo._Char Where CharName16 = @Charname)),
      (
Select StrUserID from dbo.TB_User where JID = (Select UserJID from SRO_VT_SHARD.dbo._User Where CharID = (Select CharID from SRO_VT_SHARD.dbo._Char Where CharName16 = @Charname))),
      
1,
      (
Select MAX(SerialNo)+1 from _BlockedUser ),(Select MAX(timeBeginfrom _BlockedUser),
      (
Select MAX(timeEndfrom _BlockedUser) ) 


PHP Code:
Declare @JID bigint

Use SRO_VT_SHARD
 Set 
@JID = (Select JID From [SRO_VT_SHARD].[dbo].[_User]
 
Where CharID= (Select CharID from _Char Where Charname16 'CHARNAME HERE')      )

USE 
SRO_VT_ACCOUNT
 UPDATE 
[SRO_VT_ACCOUNT].[dbo].[SK_SilkSet silk_own=silk_own+10000 Where JID=@JID 

Change the "/" to "*" if u want to "increase" the dmg

PHP Code:
use SRO_VT_SHARD

DECLARE @MobCodename VARCHAR (64)
DECLARE @
DivideBy INT
Declare @DMG INT 

Set 
@DMG '3500'
SET @MobCodename 'MOB_SD_KEISAS_3'
set @DivideBy '2'

update _RefSkill set Param5 Param5/@DivideBy where ID like (select DefaultSkill_1 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_2 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_3 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_4 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_5 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_6 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_7 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_8 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_9 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param5 
Param5/@DivideBy where ID like (select DefaultSkill_10 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG

update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_1 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_2 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_3 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_4 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_5 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_6 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_7 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_8 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_9 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG
update _RefSkill set Param6 
Param5/@DivideBy where ID like (select DefaultSkill_10 from _RefObjChar where ID = (select Link from _RefObjCommon where CodeName128 like @MobCodename))
and 
Param5 > @DMG 

PHP Code:
SELECT TOP 1000 [AccountID]
      ,[
JID]
      ,[
Gold]
  
FROM [SRO_VT_SHARD].[dbo].[_AccountJID]
  
Where AccountID like '%MISOB%' 
This might be existing b4 since i dont remember writing this...


PHP Code:
Use SRO_VT_SHARD
Select Distinct SG
.GuildIDGM.CharName as GuildMasterG.Name as GuildNameSG.FortressIDREFSG.CodeName128 As FortressName From _SiegeFortressRequest as SG
Right Join _RefSiegeFortress 
As REFSG On SG.FortressID REFSG.FortressID
Right Join _Guild 
as G On G.ID SG.GuildID
Right Join _RefSiegeFortress on REFSG
.FortressID SG.FortressID
Right Join _GuildMember 
as GM On GM.GuildID SG.GuildID 
Where GM
.MemberClass and SG.RequestType 0
Order By REFSG
.CodeName128 Asc 
PHP Code:
Declare @Charname varchar (64)
Set @Charname ''
Declare @charid int
Set 
@charid = (Select CharID from [SRO_VT_SHARD].[dbo].[_Char]Where CharName16 = @Charname)

SELECT FROM [SRO_VT_ACCOUNT].[dbo].[SK_SilkBuyList]
  
Where UserJID = (Select UserJID From [SRO_VT_SHARD].[dbo].[_User
This needs some pk2 edit and u might need more than 1 braincell for this...

i DONT give any support or anything, im just helping lazy asses like myself to have an easier life.. if this exists or can be made easier or anything dont PM me cuz i dont give a shit.

PHP Code:
declare @newhwan int
declare @Charname varchar (30)

Update _Char Set HwanLevel '0' where HwanLevel '10'

Set @Charname = ( Select top 1 Charname16 from SRO_VT_SHARD.dbo.UniqueKills
order by SRO_VT_SHARD
.dbo.UniqueKills.timestamp desc)

set @newhwan = ((select COUNT(Monsterfrom SRO_VT_SHARD.dbo.UniqueKills 
where charname16 
= @Charname and Monster 'MOB__NAME_________')+100) -- 100 If first HWANLEVEL 100...
-- 
HWANLVL 100 Unique hunterHWANLEVEL 101 UniqueHunter #1 ... and so on... u have to media edit that

Update SRO_VT_SHARD.dbo._Char set SRO_VT_SHARD.dbo._Char.HwanLevel 
@
newhwan where CharName16 
@
Charname AND (select top 1 [SRO_VT_SHARD].dbo.UniqueKills.Monster from [SRO_VT_SHARD].dbo.UniqueKills) = 'MOB_GOD_FLAME_COWKING_B4' 
PHP Code:
Select CH.Charname16CH.CharIDLOGS.strDescREFc.CodeName128LOGS.EventTime
from _LogEventItem 
as LOGS
Right join SRO_VT_SHARD
.dbo._Char as CH on LOGS.CharID CH.CharID
Right join SRO_VT_SHARD
.dbo._RefObjCommon as REFC ON REFC.ID Logs.ItemRefID
Where logs
.dwData '655369' and logs.Operation 90 
dwdata 655369 = +1 .... to check the logs of +2.. 655369*2+1 (+1 = starting plus, *2 = next plus)
Operation = 90 = Success
Operation = 91 = Fail
to check it for each char add >> AND CH.Charname16 = 'charname' <<
11/04/2012 22:18 PortalDark#2
#approved
#threads merged
7 different threads with little scripts is to much, it will be used in one single thread
11/04/2012 22:46 LastThief*#3
I just lold my ass off the way you're writing you think you're superior or something by releasing some scripts ? dude be more mature.You're just harassing and insulting everyone because you released scripts that's not acceptable from my point of view
11/04/2012 22:54 killercom#4
nice release
11/05/2012 07:25 90d0fwar#5
perfect
11/05/2012 07:31 ahmed4ever2u#6
why you talk like that ?.
11/05/2012 16:06 SayedKate#7
useless,and clear your mouth.
11/06/2012 01:35 royalblade#8
Quote:
Originally Posted by LastThief* View Post
I just lold my ass off the way you're writing you think you're superior or something by releasing some scripts ? dude be more mature.You're just harassing and insulting everyone because you released scripts that's not acceptable from my point of view
Lol i didnt think, people like uŽd that arent just leechers would care bout it. I seriously lold my ass off when u wrote that....

Its meant for those brainless people here that love asking : Hey menz y u no gif explenetan how mek use dis oqe?
11/06/2012 05:00 PortalDark#9
Quote:
Originally Posted by royalblade View Post
Lol i didnt think, people like uŽd that arent just leechers would care bout it. I seriously lold my ass off when u wrote that....

Its meant for those brainless people here that love asking : Hey menz y u no gif explenetan how mek use dis oqe?
i must say, this is one of the best answers on this section in a while