AutoReset Script[SQL] + Full Details
This Guide will show you how to make an AutoReset Script using SQL Server Agent.
Let's Start! Go And Create a new Job:
1)Start>All Programmes>Microsoft SQL Server>Enterprise Manager.
2)Then Find "Management" Double Click There.
3)And then double click to SQL Server Agent.
4)Then Right Click on "Jobs" and select "New Job...".
5)Name It "AutoReset" , Category: [Uncategorized (Local)] and Owner "sa" and Description: "AutoResetSciprt".
6)Then Click in "Steps" and press "New..." ,Then put as Step Name: "AutoReset" and Type: "Transact-SQL Script (TSQL) and Database: "MuOnline".
7)Then as Command you have to put the Codes given below.
8)After that you have inserted the Code press "Apply" and "Ok".
9)Then go to Schedules and Click "New Schedule..." ,as name put "AutoReset" and press "Change" then change it to occurs: "Daily" every "1 Day(s)",
10)And then select "Occurs every" and change "1 Hour(s) to 1 Minute(s)" 11)Then click on "Start Date" and select the Day Before the one that is there.For example if it 12/02/2006 you selest 11/02/2006.
12)And final leave the "No End Date" and Click "Ok" 2 times and then "Apply" and "Ok" again.And you are DONE!
*Do this for both 4 Codes that are given below*
Notes:
AutoReset Lvl=350
Additional Points(Per Reset)=350
Reset Cost=50Millions (Each Reset)
Reset Limit=50Resets
Stats=Goes Back To Normal
Character:AutoWarp to Lorencia/Noria
Character MagicSpellList=Will Be Cleared
Character Inventory=Will Be Cleared
+Additional Pk Clear (Each Character)
WARNING!>AutoReset Will Be Correct With Column Name= 'Reset' In 'Character' Table With Default Value= '0'
1)DarkWizard/SoulMaster Code:
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 350 * (Reset + 1), Money = Money - (50000000), Strength = 18, Dexterity = 18, Vitality = 15, Energy = 30, Inventory = NULL, MagicList = NULL, MapNumber = 0, MapPosX = 130, MapPosY = 130, PkTime = 0, PkCount = 0, PkLevel = 0, Reset = Reset + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE ((class = 0) OR (class = 1)) AND (clevel >= 350) AND (Money >= (50000000)) AND (ConnectStat = 0) AND (Reset < 50);
2)DarkKnight/BladeKnight Code:
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 350 * (Reset + 1), Money = Money - (50000000), Strength = 28, Dexterity = 20, Vitality = 25, Energy = 10, Inventory = NULL, MagicList = NULL, MapNumber = 0, MapPosX = 130, MapPosY = 130, PkTime = 0, PkCount = 0, PkLevel = 0, Reset = Reset + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE ((class = 16) OR (class = 17)) AND (clevel >= 350) AND (Money >= (50000000)) AND (ConnectStat = 0) AND (Reset < 50);
3)Elf/MuseElf Code:
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 350 * (Reset + 1), Money = Money - (50000000), Strength = 22, Dexterity = 25, Vitality = 20, Energy = 15, Inventory = NULL, MagicList = NULL, MapNumber = 0, MapPosX = 130, MapPosY = 130, PkTime = 0, PkCount = 0, PkLevel = 0, Reset = Reset + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE ((class = 32) OR (class = 33)) AND (clevel >= 350) AND (Money >= (50000000)) AND (ConnectStat = 0) AND (Reset < 50);
4)MG Code:
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 350 * (Reset + 1), Money = Money - (50000000), Strength = 26, Dexterity = 26, Vitality = 26, Energy = 26, Inventory = NULL, MagicList = NULL, MapNumber = 0, MapPosX = 130, MapPosY = 130, PkTime = 0, PkCount = 0, PkLevel = 0, Reset = Reset + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE (class = 48) AND (clevel >= 350) AND (Money >= (50000000)) AND (ConnectStat = 0) AND (Reset < 50);
DarkLord (99+ Versions)
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 350 * (Reset + 1), Money = Money - (50000000), Strength = 26, Dexterity = 26, Vitality = 26, Energy = 26, Inventory = NULL, MagicList = NULL, MapNumber = 0, MapPosX = 130, MapPosY = 130, PkTime = 0, PkCount = 0, PkLevel = 0, Reset = Reset + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE (class = 64) AND (clevel >= 350) AND (Money >= (50000000)) AND (ConnectStat = 0) AND (Reset < 50);
Any Questions/Problems you may have please feel free to ask me. :laugh:
This Guide Is Made By Me.
(C) Credits LifeStealer
Little offtopic regarding NULL SQL values
Zagzagel:
You can add a new step (prior to the Autoreset itself) in the Autoreset Job in order to convert NULL values to zeroes. This is the TSQL:
Code:
UPDATE Character
SET Reset=(0)
WHERE Reset IS NULL
(Remember to point it to the MuOnline database)
---- Story of my post, A.K.A. the non-important part that doesn't need to be read ----
I needed something like this:
Code:
UPDATE Character
SET CtlCode=(0)
WHERE CtlCode IS NULL
in my autoreset scripts in order to work properly.
When a column value is 'NULL', it seems to be excluded from >, <, <> and = operator conditions. For example, in my AutoReset:
Code:
UPDATE Character
SET clevel=('1'), Experience=('0'), Money=Money-('50000000'), MapNumber=('0'), MapPosX=('125'), MapPosY=('123'), PkLevel=('0'), Resets=Resets+('1')
FROM Character JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE CtlCode <> ('8') and clevel>('369') and Money>('50000000') AND (ConnectStat = 0);
note that my CtlCode condition is NOT EQUAL to 8, so it should exclude all GMs from reset. Well, it happened that when CtlCode was NULL, that char was also excluded from reset, so there had to be a way to 'Kill the NULLs'.
Through this simple step (the first TSQL CODE), you can convert your NULLs to any value. Just check where to seek them. Enjoy!
AutoReset (level 350-380) Script [SQL]
AutoReset (level 350-380) Script [SQL]
added reset level limit from LifeStealer guide: http://forum.ragezone.com/guides/gui...ls-137262.html
This Guide will show you how to make an AutoReset Script using SQL Server Agent.
Let's Start! Go And Create a new Job:
1)Start>All Programmes>Microsoft SQL Server>Enterprise Manager.
2)Then Find "Management" Double Click There.
3)And then double click to SQL Server Agent.
4)Then Right Click on "Jobs" and select "New Job...".
5)Name It "AutoReset" , Category: [Uncategorized (Local)] and Owner "sa" and Description: "AutoResetSciprt".
6)Then Click in "Steps" and press "New..." ,Then put as Step Name: "AutoReset" and Type: "Transact-SQL Script (TSQL) and Database: "MuOnline".
7)Then as Command you have to put the Codes given below.
8)After that you have inserted the Code press "Apply" and "Ok".
9)Then go to Schedules and Click "New Schedule..." ,as name put "AutoReset" and press "Change" then change it to occurs: "Daily" every "1 Day(s)",
10)And then select "Occurs every" and change "1 Hour(s) to 1 Minute(s)" 11)Then click on "Start Date" and select the Day Before the one that is there.For example if it 12/02/2006 you selest 11/02/2006.
12)And final leave the "No End Date" and Click "Ok" 2 times and then "Apply" and "Ok" again.And you are DONE!
Notes:
AutoReset Lvl=350 to 380 (level 381 to 400 AutoReset is disabled, intended for maxed stats Characters)
Additional Points(Per Reset)= 2094 (=6 points x 349 levels for DK,BK,DW,SM,ELF,ME), 2443 (=7 points x 349 levels for MG,DL)
Reset Cost=100Millions (Each Reset)
Reset Limit=100Resets
Stats=Goes Back To Normal
Character=AutoWarp to Lorencia/Noria
Character MagicSpellList=Stays (no need to buy scrolls again)
Character Inventory=Items Stays (no need to remove items on your inventory)
Additional Pk Clear (Each Character) is removed (Pk reset manually on the web)
Class 16 is Dark Kight
Class 17 is Blade Knight
Class 0 is Dark Wizard
Class 1 is Soul Master
Class 32 is Elf
Class 33 is Muse Elf
Class 48 is Magic Gladiator
Class 64 is Dark Lord
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 2094 * (Resets + 1), Strength = 18, Dexterity = 18, Vitality = 15, Energy = 30, Money = Money - (100000000), MapNumber = 0, MapPosX = 130, MapPosY = 130, Resets = Resets + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id COLLATE Chinese_PRC_CI_AS
WHERE ((class = 0) OR (class = 1)) AND (clevel >= 350) AND (clevel <= 380) AND (Money >= (100000000)) AND (ConnectStat = 0) AND (Resets < 100);
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 2094 * (Resets + 1), Strength = 28, Dexterity = 20, Vitality = 25, Energy = 10, Money = Money - (100000000), MapNumber = 0, MapPosX = 130, MapPosY = 130, Resets = Resets + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Chinese_PRC_CI_AS
WHERE ((class = 16) OR (class = 17)) AND (clevel >= 350) AND (clevel <= 380) AND (Money >= (100000000)) AND (ConnectStat = 0) AND (Resets < 100);
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 2094 * (Resets + 1), Strength = 22, Dexterity = 25, Vitality = 20, Energy = 15, Money = Money - (100000000), MapNumber = 0, MapPosX = 130, MapPosY = 130, Resets = Resets + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Chinese_PRC_CI_AS
WHERE ((class = 32) OR (class = 33)) AND (clevel >= 350) AND (clevel <= 380) AND (Money >= (100000000)) AND (ConnectStat = 0) AND (Resets < 100);
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 2443 * (Resets + 1), Strength = 26, Dexterity = 26, Vitality = 26, Energy = 26, Money = Money - (100000000), MapNumber = 0, MapPosX = 130, MapPosY = 130, Resets = Resets + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Chinese_PRC_CI_AS
WHERE (class = 48) AND (clevel >= 350) AND (clevel <= 380) AND (Money >= (100000000)) AND (ConnectStat = 0) AND (Resets < 100);
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 2443 * (Resets + 1), Strength = 26, Dexterity = 26, Vitality = 26, Energy = 26, Leadership = 26, Money = Money - (100000000), MapNumber = 0, MapPosX = 130, MapPosY = 130, Resets = Resets + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID = MEMB_STAT.memb___id
COLLATE Chinese_PRC_CI_AS
WHERE (class = 64) AND (clevel >= 350) AND (clevel <= 380) AND (Money >= (100000000)) AND (ConnectStat = 0) AND (Resets < 100);
Re: [Guide] AutoReset Script[SQL] + Full Details
Re: [Guide] AutoReset Script[SQL] + Full Details
Re: [Guide] AutoReset Script[SQL] + Full Details
Re: [Guide] AutoReset Script[SQL] + Full Details
Re: [Guide] AutoReset Script[SQL] + Full Details
Help me create script who need cleare all inventory - then reset
Code:
UPDATE Character
SET clevel = 1, Experience = 0, LevelUpPoint = 350 * (Reset + 1), Money = Money - (50000000), Inventory = NULL, MagicList = NULL, MapNumber = 0, MapPosX = 130, MapPosY = 130, PkTime = 0, PkCount = 0, PkLevel = 0, Reset = Reset + 1
FROM Character JOIN MEMB_STAT ON Character.AccountID=MEMB_STAT.memb___id
COLLATE Latin1_general_CI_AI
WHERE ((class = 0) OR (class = 1)) AND (clevel >= 350) AND (Money >= (50000000)) AND (ConnectStat = 0) AND (Inventory = NULL);
where is error?
Re: [Guide] AutoReset Script[SQL] + Full Details
Can someone create script where stat stays ??? Because all people in my mu don't like when they do reset and stats erasing
Re: [Guide] AutoReset Script[SQL] + Full Details
guys, i have a question about this
ConnectStat = 0
this means that the user will be resetted when he's not online, right
my question is if it is possible that the character will be resetted whether he is online or not by removing this ConnectStat = 0
so that the last part of the script will be
WHERE ((class = 0) OR (class = 1)) AND (clevel >= 350) AND (Money >= (50000000)) AND (Inventory = NULL)
is this possible?
Re: [Guide] AutoReset Script[SQL] + Full Details
dude I have problem with ODBC...
gives mi this error:
'Character' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Reset', table 'MuOnline.dbo.Tmp_Character'; column does not allow nulls. INSERT fails.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
PLSS help...
Re: [Guide] AutoReset Script[SQL] + Full Details
Quote:
Originally Posted by
jduval
guys, i have a question about this
ConnectStat = 0
this means that the user will be resetted when he's not online, right
my question is if it is possible that the character will be resetted whether he is online or not by removing this ConnectStat = 0
so that the last part of the script will be
WHERE ((class = 0) OR (class = 1)) AND (clevel >= 350) AND (Money >= (50000000)) AND (Inventory = NULL)
is this possible?
Impossible.
Re: [Guide] AutoReset Script[SQL] + Full Details
Re: [Guide] AutoReset Script[SQL] + Full Details
Hmm, can someone please give me script for this one -> After reset stats goes back normal, 300 points 1st reset, 600 2nd and so on, Reset cost 200kk. ThanQ ;)
Edit: 1st res - 350 lvl, 2nd - 352, 3rd - 353, 4th - 354 and so on :P
Re: [Guide] AutoReset Script[SQL] + Full Details
SET clevel = 1, and SET clevel=('1'), are the same ??
Re: [Guide] AutoReset Script[SQL] + Full Details
How make auto reset script for 5DB? Me_Muonline And Muonline... Now I Have Memb_Info Bug :(
Re: [Guide] AutoReset Script[SQL] + Full Details
Do you have AutoReset script for S3 ???
Re: [Guide] AutoReset Script[SQL] + Full Details
can someon give me a cript for reset like:
reset points for bk 450
for mg 600
for elf 580
for sm 520
im version 97d+99i
PLS HELP :grr:
Re: [Guide] AutoReset Script[SQL] + Full Details
As if I want to reset it for each request 50kk the first and second 50kk + 20kk additional
Re: AutoReset Script[SQL] + Full Details
Quote:
Originally Posted by
lhootak
dude I have problem with ODBC...
gives mi this error:
'Character' table
- Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into column 'Reset', table 'MuOnline.dbo.Tmp_Character'; column does not allow nulls. INSERT fails.
[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.
PLSS help...
use query analiser
example:
ALTER TABLE [Character] ADD [granawww] [smallint] DEFAULT(0) NOT NULL;
Re: AutoReset Script[SQL] + Full Details
I need auto reset code for season6.
AutoReset Lvl=400
Reset Cost=10millions*resets. (example 10m*1, 10*2, 10*3 etc.)
Reset Limit=50Resets
Stats=Goes Back To Normal
CharacterutoWarp to Lorencia/Noria
Character MagicSpellList=will not be cleared
Character Inventory=will not be cleared
+Additional Pk Clear (Each Chaacter)
Additional Points(Per Reset)
dk,bk,bm= 500 point
rage fighter,first master = 600