Register for your free account! | Forgot your password?

You last visited: Today at 08:28

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

Advertisement



Reset level y mysql

Discussion on Reset level y mysql within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2010
Posts: 17
Received Thanks: 10
Reset level y mysql

Well guys, here I bring a small mission to reset the pj level, it is very easy to set up
*
First we need to get this game diff, the diff is this posted on inforge BlackYuko this set_level function activate ()

Code:
 This difference file is created by Dif Reverse v1.0
 
 
game2089m
00156013: F9 D7
00156030: E8 90
00156031: 57 90
00156032: F0 90
00156033: EA 90
00156034: FF 90
00156079: 8D 89
0015607A: 04 44
0015607B: 40 24
0015607C: C1 04
0015607D: E0 C7
0015607E: 02 04
0015607F: 8B 24
00156080: 8C 01
00156081: 05 00
00156082: 7C 00
00156083: FF 00
00156084: FF A1
00156085: FF 40
00156086: 8B 63
00156087: 54 47
00156088: 05 08
00156089: 80 89
0015608A: 6B 44
0015608B: DA 24
0015608C: 64 08
0015608D: 6B E8
0015608E: F1 DE
0015608F: 64 7C
00156090: C7 17
00156091: 44 00
00156092: 24 89
00156093: 08 44
00156094: 0F 24
00156095: 4A 04
00156096: 34 89
00156097: 08 3C
00156098: C7 24
00156099: 44 E8
0015609A: 24 D2
0015609B: 04 BC
0015609C: 01 ED
0015609D: 00 FF
0015609E: 00 89
0015609F: 00 3C
001560A0: 89 24
001560A1: 5C E8
001560A2: 24 6A
001560A3: 10 EC
001560A4: 89 F0
001560A5: 74 FF
001560A6: 24 EB
001560A7: 0C 46
001560F8: 01 00
00312E0C: 74 73
00312E0E: 6C 74
00312E0F: 65 5F
00312E10: 70 6C
00312E11: 6F 65
00312E12: 72 76
00312E13: 74 00
Then in the file from our server quest_functions add set_level function

Code:
--**
--** Funsion reset level 
--** www.nt2mysterio.com
--** 

quest reseteo begin
	state start begin
		when 9003.chat."Reset Level" with pc.level >= 140 begin
			local ret = 3										-- Aca configuran la cantidad de reset
			local actuales = pc.getqf("reset")
			if pc.get_level() < 140 then
				say_title(""..mob_name(9003).."") 
				say("Detente! No Has alcansado el level") 
				say("necesario para realizar tu reset.") 
				say("Ademas tienes que traerme:") 
				say("") 
				say_reward("Debes ser almenos lv 140 y portar") 
				say_item("Perla Sangre",27994,"") 
				return
			elseif pc.count_item(27994) < 2 then 
				say("")
				say_title(""..mob_name(9003).."") 
				say("No traes los items necesarios") 
				say("recurda que yo tambien tengo que comer.")
				say("") 
				say_reward("Debes ser almenos lv 140 y portar") 
				say_item("Perla Sangre",27994,"") 
				return
			elseif pc.getqf("reset") >= ret then
				say_title(""..mob_name(9003).."") 
				say("Ya has alcanzado el numero maximo") 
				say("de reset para tu personaje.") 
				say("") 
				return
			elseif pc.get_level() >= 140 then
				say_title(""..mob_name(9003).."") 
				say("Oh! Ya estas grandesito, veo que") 
				say("quieres realizar tu reset.") 
				say("") 
				say("¿Estas seguro de querer hacerlo?") 
				local r = select("Si", "No")
				if r == 1 then
				pc.set_lev(1)
				pc.remove_item(27994,2)
				pc.setqf("reset", pc.getqf("reset") +1)
				local mt2 = pc.get_name(kill)
				local b5 = mysql_query("UPDATE player.player SET prestige = prestige + 1 WHERE name='"..mt2.."'")		-- Cuenta en la Tabla player agregando el campo prestige
				notice_all(""..pc.get_name().." ha ascendido de prestigio")
					if pc.getqf("reset") == 1 then							-- Reset 1
					affect.add_collect(apply.MAX_HP, 5000, 60*60*24*365)
					elseif pc.getqf("reset") == 2 then							-- Reset 2
					affect.add_collect(apply.ATTBONUS_HUMAN, 50, 60*60*24*365)
					elseif pc.getqf("reset") == 3 then							-- Reset 3
					affect.add_collect(apply.ATTBONUS_WARRIOR, 50, 60*60*24*365)
					affect.add_collect(apply.ATTBONUS_ASSASSIN, 50, 60*60*24*365)
					affect.add_collect(apply.ATTBONUS_SURA, 50, 60*60*24*365)
					affect.add_collect(apply.ATTBONUS_SHAMAN, 50, 60*60*24*365)
					end
				end
			end
		end
	end
end
Also have to add to the table player prestige field
ahynoa is offline  
Thanks
1 User
Old 07/12/2013, 02:08   #2
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,897
Received Thanks: 3,336
Hmm it´s easier if you write an simple lib for it ( about 20 lines then you have an pc.set_level() function in quest :O)
Without replacing an existing function :O
xCPx is offline  
Thanks
2 Users
Old 07/12/2013, 05:37   #3
 
deluks1980's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 23
Received Thanks: 11
Quote:
Originally Posted by xCPx View Post
Hmm it´s easier if you write an simple lib for it ( about 20 lines then you have an pc.set_level() function in quest :O)
Without replacing an existing function :O
Hahaha.... it's not possible, you can use a query to set player level but its not practical and has no sense at all..
deluks1980 is offline  
Old 07/12/2013, 12:10   #4

 
elite*gold: 0
Join Date: Jan 2013
Posts: 348
Received Thanks: 353
Quote:
Originally Posted by deluks1980 View Post
Hahaha.... it's not possible, you can use a query to set player level but its not practical and has no sense at all..
sure it's possible O.o
TheMarv :< is offline  
Old 07/12/2013, 15:31   #5
 
elite*gold: 0
Join Date: Jan 2009
Posts: 96
Received Thanks: 42
Xcpx can you post your questlib whit this function or diff for new r34 game?
born2rule is offline  
Old 07/12/2013, 20:48   #6
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,897
Received Thanks: 3,336
Quote:
Originally Posted by born2rule View Post
Xcpx can you post your questlib whit this function or diff for new r34 game?
it´s not a questlib, it is an .so library for game file
xCPx is offline  
Thanks
1 User
Old 07/13/2013, 02:03   #7
 
elite*gold: 0
Join Date: Jul 2013
Posts: 32
Received Thanks: 44
Mh eigentlich nicht schlecht... Würde ich aber nicht per game machen... Du ersetzt irgendwelche funktionen mit dem zeug... Und wieso nicht einfach per lua lösen... Ist doch viel sicherer (auch wenn es wenig umständlicher ist )

MfG
OldTime2 is offline  
Old 07/13/2013, 10:42   #8

 
kovuus's Avatar
 
elite*gold: 0
Join Date: Apr 2013
Posts: 6,303
Received Thanks: 1,584
It exist an lib for your game with the same functions.
kovuus is offline  
Reply


Similar Threads Similar Threads
Level reset ??
04/12/2012 - S4 League - 6 Replies
Hallo kann mir vielleicht einer von euch sagen ob es einen lvl reset hack gibt ^^. Danke für hilfe
MW2 Prestige/Level reset
02/27/2012 - Call of Duty - 2 Replies
#closerequest hat sich erledigt hab was gefunden
CoD BO...Level/Prestige Reset o_O`?
03/14/2011 - Call of Duty - 12 Replies
hey Leute, Ich bin grade riesens wütend über Black Ops.. Ich wollte nämlich gerade so mein 13Prestige machen(war lvl 48)..und ja halt ganz normal.. Aufeinmal kommt da,was ja häufiger ist, "Server verbindung unterbrochen"..So ich gedacht, ok warteste kurz und gehst wieder rein..Was war`?...Alles weg!... Ich bin nun Lvl 12 mit Prestige 0 und ich habe keine Ahnung wieso zur Info:
[Question] level of the pet, reset the orb and clovers
10/16/2010 - EO PServer Hosting - 3 Replies
I am wanting to create some new iten I saw on some server out there: Reducer level: Example: using the item your pet can reduce the level of 255 to level 70. Reset Orb: Using the item the player clears the orb it.
30 days suspension + EXP/Level & GP Reset
08/23/2009 - Grand Chase Philippines - 49 Replies
30 days suspension + EXP/Level & GP Reset. yan po penalty ko... nahuli ako ni GM... ANU PO YAN BALIK LEVEL ZERO LAHAT ng characters Ko?



All times are GMT +2. The time now is 08:28.


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.