[Release] SQL Scripts

Life

Well-Known Member
Joined
Nov 13, 2008
Messages
1,367
Reaction score
509
Като за начало, отворете Start > Programs > Microsoft Sql Server > Enterprise Manager.
Двоен клик върху Microsoft SQL Servers, после върху SQL Server Group, Local (Windows nt), избирате Management, десен клик върху SQL Server Agent и избирате Start(винаги като пускате SQL сървъра,пускайте и SQL Server Agent-a).
След това давате на Jobs, десен клик и New job, нагласяте Owner да е sa, давате на Steps, New... Step Name: в зависимост от типа скрипт - Auto reset,stats fx,etc, Database: MuOnline, a в полето command копирате и пействате някой от долните скриптове(по избор).
Давате Parse, OK, Apply, OK, Schedules > New schedule > Name: по избор Recurring > Change,избирате Occurs: Daily, Daily frequensy - Occurs every 1 minute(s), start date - избирате вчеращният ден, давате 2 пъти ОK, Apply, OK и готово,сега ще ви напиша някой скриптове! :)

Автоматични ресети
MuWeb 0.3
UPDATE Character
SET cLevel= 1 , Experience = 0 , Reset = (Reset + 1)
WHERE cLevel>349

MuWeb 0.4
UPDATE Character
SET cLevel= 1 , Experience = 0 , Resets = (Resets + 1)
WHERE cLevel>349

Автоматично поправяне на ...
Auto Zen Fix
UPDATE Character
SET Money = 2000000000
WHERE Money < 1 OR Money > 2000000

Auto Stats Fix
UPDATE Character
SET Strength = 32767
WHERE Strength < 0 OR Strength > 32767

UPDATE Character
SET Dexterity = 32767
WHERE Dexterity < 0 OR Dexterity > 32767

UPDATE Character
SET Vitality = 32767
WHERE Vitality < 0 OR Vitality > 32767

UPDATE Character
SET Energy = 32767
WHERE Energy < 0 OR Energy > 32767

Auto Pk Clear
UPDATE Character
SET PkLevel = 0 , PkTime = 0 , PkCount = 0
Where PkLevel > 2

Auto Class Upgrade
UPDATE Character
SET Class = 17
WHERE Class = 16

UPDATE Character
SET Class = 1
WHERE Class = 0

UPDATE Character
SET Class = 33
WHERE Class = 32




Успех :)
 
Last edited:
ето от мен за оправяне на гс на 99b+

Step 1 Quarety
Code:
CREATE proc MyGSFun_SetExtChrData
@AccountID varchar(10),
@Name varchar(10),
@FQBZ int,
@FQCount int,
@FQName varchar(10),
@Lores int,
@RTN varchar(100) OUTPUT
as
set nocount on
declare @ec int
set @ec=0
begin tran
if EXISTS (select name from extchrdata where accountid=@accountid and name=@name) begin
update extchrdata set FQName=@FQName,FQBZ=@FQBZ,FQCount=@FQCount,Lores=@lores
where accountid=@accountid and name=@name
set @ec = @ec | @@error
end else begin
insert into extchrdata (AccountID,Name,FQBZ,FQCount,FQName,Lores)
values (@AccountID,@Name,@FQBZ,@FQCount,@FQName,0)
set @ec = @ec | @@error
end
if @ec = 0 begin
commit tran
set @RTN='OK'
end else begin
rollback tran
set @RTN='Update ExtChrData Error !'
end
set nocount off
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

Step2 Quarity
Code:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MyGSFun_SetExtChrData1]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[MyGSFun_SetExtChrData1]
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO






create            proc MyGSFun_SetExtChrData1
@AccountID varchar(10),
@Name varchar(10),
@FQBZ int,
@FQCount int,
@FQName varchar(10),
@Lores int
as
set nocount on
declare @ec int
	,@ll int
	,@jf int
	,@jfbl int
	,@RTN varchar(100)
set @jfbl=2		--设置积分兑换比例 1/X
set @ec=0
begin tran
select @ll=LastLores from extchrdata where accountid=@accountid and name=@name
--转换为积分
if @ll is null
	set @jf=cast(@Lores/@jfbl as int)
else
	set @jf=cast((@Lores-@ll)/@jfbl as int)
update ExtIdData set HaveCents=HaveCents+@jf where AccountID=@AccountID
--set @ec = @ec | @@error	--不管积分更新是否成功都应更新角色数据
if @ll is not null begin
	update extchrdata set FQName=@FQName,FQBZ=@FQBZ,FQCount=@FQCount
		,Lores=@lores,LastLores=LastLores+@jf*@jfbl
		 where accountid=@accountid and name=@name
	set @ec = @ec | @@error
end else begin
	insert into extchrdata (AccountID,Name,FQBZ,FQCount,FQName,Lores,LastLores)
		values (@AccountID,@Name,@FQBZ,@FQCount,@FQName,@Lores,@jf*@jfbl)
	set @ec = @ec | @@error
end
if @ec = 0 begin
	commit tran
	set @RTN='OK'
end else begin
	rollback tran
	set @RTN='Update ExtChrData Error !'
end

select @RTN RTN

set nocount off






GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
 
diablo21 какво точно оправя този скрипт за 99б
 
Ми това мисля , че е за ГС само с MyGSFun.dll .
П.п Добра тема !
 
Това за оправяне на точките сигурни ли сте че работи (think) ?
 
Ето няколко и от мене ;)
---
Guild Score BUG -
---
UPDATE Guild
SET G_Score=('0')
WHERE G_Score<-1

---
Give Credits For Game Play Time
---
UPDATE MEMB_CREDITS
SET Credits = Credits + 50
FROM MEMB_CREDITS JOIN MEMB_STAT ON MEMB_CREDITS.memb___id = MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE OnlineHours = 1 And ConnectStat = 1


---
DELETE ALL RESETS
---
UPDATE Character
SET Resets=('0')
WHERE Resets>0


---
DELETE ALL INVENTORIES
---
UPDATE Character
SET Inventory=('')

---
DELETE ALL WAREHOUSES
---
UPDATE warehouse
SET Items=('')

---
DELETE One Character INVENTORY
---
UPDATE Character
SET Inventory=('')
WHERE Name='Omaru'

---
DELETE One WAREHOUSE
---
UPDATE warehouse
SET Items=('')
WHERE AccountID='Omaru'

---
UNBAN ALL Players
---
UPDATE Character
SET CtlCode=('0')
WHERE CtlCode=('1')


---
AUTO RESTART
---
UPDATE Character
SET cLevel=('1') , experience=('0')
WHERE cLevel>349
 
Да работят всички кодове освен тия дето са за му уеб 0.3 и 0.4 не мисля че някои ги изпозлва :D :p
 
мм браво ,дайте още някакви за по голямо разнобразие :-d :p
 
Копирано от anhi.hit.bg !!! Да го беше преписал поне вместо направо CTRL+C И CTRL+V ;)
 
Че е копирано е копирано а ти що мислиш че тои го е писал ???
 
нз какво сложно има да направиш тези подобни прости неща ? трябва да си имаш 1-2% представа за бази данни sql и прочие за да направиш подобна "сложна" операция...
 
How to fix Guide Score Bug:

Sql Quarety
Database: Muonline

Code:
UPDATE Guild
SET G_Score=('0')
WHERE G_Score<-1

рескате си сървъра и сте готови.
ето още няколко :

----------------------
Negative Money Fix :

UPDATE Character
SET Money='2000000000'
WHERE Money<-1

--------------------------------

Personal ID Code Check "Disabling" :

UPDATE MEMB_INFO
SET sno__numb=('')
WHERE sno__numb>1

-----------------------------

Starting Money (You starting money by changing ('10000000') to some other value.) :

UPDATE Character
SET Money=('10000000')
WHERE Money<1

-------------------------------

Auto Clear PK


UPDATE Character
SET PkLevel = ('0'), PkTime = ('0'), PkCount = ('0')
Where PkLevel>2

--------------------------------------

Thise script will automaticaly teleports users from "The Place Of Excile" To Lorencia, bar !

UPDATE Character
SET MapNumber=('0'), MapPosX=('125'), MapPosY=('125')
WHERE MapNumber=('5')


-------------------------------------


Thise delete all there resets (DONT USE IT LIKE JO.

UPDATE Character
SET Resets=('0')
WHERE Resets>0

----------------------

Thise one will clear all the vaults.

UPDATE warehouse
SET Items=('')

----------------------

Thise one for deleting all the items from inventories.

UPDATE Character
SET Inventory=('')

----------------------

Thise one will unban all the players.

UPDATE Character
SET CtlCode=('0')
WHERE CtlCode=('1')

-----------------------

Thise one will delete all GMs.

UPDATE Character
SET CtlCode=('0')
WHERE CtlCode=('8')

------------------------

Thise one will delete all the level up points.

UPDATE Character
SET LevelUpPoints=('0')
WHERE LevelUpPoints>0

------------------------
 
Копирано от anhi.hit.bg !!! Да го беше преписал поне вместо направо ctrl+c И ctrl+v ;)
Абе,вас кфо ви боли х*я че е копирано,нали го ползвате ?!Като ти пречи че е копирано не го използвай и тфа е!
 
How to fix Guide Score Bug:

Sql Quarety
Database: Muonline

Code:
UPDATE Guild
SET G_Score=('0')
WHERE G_Score<-1

рескате си сървъра и сте готови.
ето още няколко :

----------------------
Negative Money Fix :

UPDATE Character
SET Money='2000000000'
WHERE Money<-1

--------------------------------

Personal ID Code Check "Disabling" :

UPDATE MEMB_INFO
SET sno__numb=('')
WHERE sno__numb>1

-----------------------------

Starting Money (You starting money by changing ('10000000') to some other value.) :

UPDATE Character
SET Money=('10000000')
WHERE Money<1

-------------------------------

Auto Clear PK


UPDATE Character
SET PkLevel = ('0'), PkTime = ('0'), PkCount = ('0')
Where PkLevel>2

--------------------------------------

Thise script will automaticaly teleports users from "The Place Of Excile" To Lorencia, bar !

UPDATE Character
SET MapNumber=('0'), MapPosX=('125'), MapPosY=('125')
WHERE MapNumber=('5')


-------------------------------------


Thise delete all there resets (DONT USE IT LIKE JO.

UPDATE Character
SET Resets=('0')
WHERE Resets>0

----------------------

Thise one will clear all the vaults.

UPDATE warehouse
SET Items=('')

----------------------

Thise one for deleting all the items from inventories.

UPDATE Character
SET Inventory=('')

----------------------

Thise one will unban all the players.

UPDATE Character
SET CtlCode=('0')
WHERE CtlCode=('1')

-----------------------

Thise one will delete all GMs.

UPDATE Character
SET CtlCode=('0')
WHERE CtlCode=('8')

------------------------

Thise one will delete all the level up points.

UPDATE Character
SET LevelUpPoints=('0')
WHERE LevelUpPoints>0

------------------------

Копирано от форум на които няма да спомена името,защо бе момчета не напишете 1 -2 прости неща и не ги дадете вместо да копирате ?(doh)
 
good day! how about if the character already have max 32767 in all attributes, and he still doing resets, how to prevent the max stat character from getting extra points after resets? thanks :)