Jump to content

Dimmi

Inactive Member
  • Posts

    93
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by Dimmi

  1. Hi guys,

    I need some help, I tried to develop a new quest and I got a problem: I can't save in a global flag (game.set_event_flag) a variable (string).

    I tried:

    game.set_event_flag("spiderowner", pc.get_name()) 

    and didn't work, in global flag it saves "0".

    So, I tried:

    d.setf("spiderowner", pc.get_name())

    and same thing.

     

    I can save in those flags only integer variables...

    How can I save a string variable?

     

    Thanks!

     

  2.  

    Are you sure?

     

    Yep, I'm pretty sure about this. Ymir servers are very good secured, but when they affiliated the metin2sg, they didn't secure it aswell, so, an ex-developer there, which was fired stole the source and posted it on internet for revenge.

     

    The story is:

    First time, the big "Rain" who released the "InstantServer" was an hacker at some kind of organisation from china who stoled the game file from metin2.

    About 2089M, I don't know how it was released on internet, but I'm pretty sure this was hacked, too.

    When Ymir released 34k, they affiliated metin2sg, and ofc, that was an easy hint for hackers, so, that's why we got 34k gamefile.

    And, finally, was that developer which could stole the source from metin2sg.

     

    That's the story about I've read some time ago.

  3. Hi buddies,

    I've this quest, but when I compile files are not created in /object/. This is the quest:

    quest spider_cave_boss begin
    	state start begin
    		function ready_for_cave() begin
    			if pc.count_item(80041) > 0 then
    				local spider = {
    					["spiderworking"]	= game.get_event_flag("spiderworking"),
    					["spiderpassword"]	= game.get_event_flag("spiderpassword"),
    					["spiderowner"]		= game.get_event_flag("spiderowner"),
    					["spiderboss"]		= pc.getqf("spiderboss")
    				}
    				if spider["spiderworking"] == 0 and spider["spiderpassword"] == 0 and spider["spiderowner"] == 0 then
    					if spider["spiderboss"] == 0 then
    						return true
    					else
    						return "Incerci deja sa invingi regele."
    					end
    				else
    					return "Cineva viteaz deja incearca sa invinga regele."
    				end
    			else
    				return "Ai nevoie de "..item_name(80041).." pentru a intra."
    			end
    		end
    
    		when 20371.chat."Temnita Paianjenilor 3" with pc.getqf("spiderboss") == 0 and game.get_event_flag("spiderworking") == 0 begin
    			say_title(mob_name(20371))
    			say("")
    			say("Salut, am auzit ca doresti sa intri in ")
    			say("a treia temnita a paianjenilor impreuna cu un grup, ")
    			say("pentru a omori Regina Paianjen... ")
    			say(" ")
    			say("E adevarat? ")
    			say(" ")
    			if select (locale.yes, locale.no) == 2 then
    				return
    			else
    				say_title(mob_name(20371))
    				say(" ")
    				say("Atunci trebuie sa stiti ca aveti nevoie, ")
    				say("Trecerea Imparatului pentru ati da voie sa intri acolo. ")
    				say("Daca nu ai acea trecere nu te voi lasa sa intri... ")
    				say(" ")
    				wait()
    				say_title(mob_name(20371))
    				say(" ")
    				say("Fii atent razboinicule, ")
    				say("Regina Paianjen este foarte puternica si, ")
    				say("nu a mai luat o masa de secole... ")
    				say(" ")
    				wait()
    				say_title(mob_name(20371))
    				say(" ")
    				say("Doriti sa intrati in Camera Regelui? ")
    				say(" ")
    				if select (locale.yes, locale.no) then
    					return
    				else
    					local ready = spider_cave_boss.ready_for_cave()
    					if ready == 1 then
    						say_title(mob_name(20371))
    						say(" ")
    						say("Oo.. ai un bilet! ")
    						say(" ")
    						say("Esti sigur ca doresti sa intri acolo? ")
    						if select (locale.yes, locale.no) == 1 then
    							say_title(mob_name(20371))
    							say(" ")
    							say("Am nevoie de o parola cu ajutorul careia ")
    							say("sa-i tin la deparare pe intrusi! ")
    							local password = tonumber(input(""))
    							game.set_event_flag("spiderpassword", password)
    							game.set_event_flag("spiderworking", 1)
    							game.set_event_flag("spiderowner", pc.get_name())
    							pc.setqf ("spiderboss", 1)
    							pc.removeitem (80041)
    							say_title(mob_name(20371))
    							say(" ")
    							say("Dupa ce ai intrat nu mai pot sa te readuc pana nu omori regina. ")
    							say("Succes! ")
    							wait()
    							pc.warp(88000, 614500)
    						else
    							say_title(mob_name(20371))
    							say(" ")
    							say("Eu nu ma opun, ")
    							say("dar ai nevoie de curaj pentru ai face fata regelui.. ")
    							say(" ")
    							say("Intoarcete inapoi cand, ")
    							say("vei avea curaj sa infrunti regina! ")
    							say(" ")
    						end
    					else
    						say_title(mob_name(20371))
    						say(" ")
    						say("Nu puteti intra! ")
    						say(ready)
    						say(" ")
    					end
    				end
    			end
    		end
    
    		when 20371.chat."Ii sunt prieten cavalerului" with pc.getqf("spiderboss") == 0 and game.get_event_flag("spiderworking") == 1 begin
    			say_title(mob_name(20371))
    			say(" ")
    			local name = game.get_event_flag("spiderowner")
    			say("Deci esti unul dintre prietenii lui "..name.."? ")
    			say("Haha! Am nevoie de dovezi ca sa te cred! ")
    			say("Mi-a lasat o parola inainte sa-l trimit acolo! ")
    			say("Daca chiar ii esti prieten, spune-mi parola! ")
    			local password = tonumber(input(""))
    			if password == game.get_event_flag("spiderpassword") then
    				say_title(mob_name(20371))
    				say(" ")
    				say("Oh! Chiar ii esti prieten! ")
    				say("Sa vedem daca esti apt pentru a intra in temnita! ")
    				local ready = spider_cave_boss.ready_for_cave()
    				if ready == 1 then
    					pc.setqf ("spiderboss", 1)
    					pc.removeitem (80041)
    					say_reward ("Foarte bine! Sa mergem! ")
    					wait()
    					pc.warp(88000, 614500)
    				else
    					say_reward(ready)
    					return
    				end
    			end
    		end
    
    		when login with pc.in_dungeon() begin
    			if d.getf("spiderboss ") == 1 then
    				notice_in_map("Temnita Paianjenilor 3: ")
    				notice_in_map("Aveti 20 de minute la dispozitie ")
    				notice_in_map("pentru a omora Metinele Paianjen! ")
    				timer("time_spiderboss", 1200)
    
    				local metinspiderboss = number(1, 5)
    				local pos = {
    					[1] = {367, 587},
    					[2] = {356, 575},
    					[3] = {383, 576},
    					[4] = {378, 598},
    					[5] = {358, 596}
    				}
    				local metingood = 8072
    				local metinbad = 8071
    
    				d.spawn_mob(metingood, pos[6-metinspiderboss][1], pos[6-metinspiderboss][2])
    				for i = 1, 5 do
    					if i ~= 6 - metinspiderboss then
    						d.spawn_mob(metinbad, pos[i][1], pos[i][2])
    					end
    				end
    			end
    		end
    
    		when 8071.kill with pc.in_dungeon() begin
    			notice_in_map("Ati distrus metin-ul gresit.. ")
    		end
    
    		when 8072.kill with pc.in_dungeon() begin
    			notice_in_map("Ati distrus metin-ul corect! ")
    			d.kill_all()
    			notice_in_map("Regina paianjen vine cu trupele sale dupa tine.. ")
    			d.spawn_mob(2092, 367, 587)
    		end
    
    		when time_spiderboss0.timer begin
    			notice_in_map("Ai la dispozitie 20 de minute pentru a omori Regina Paianjen! ")
    			timer("time_spiderboss0", 1200)
    		end
    
    		when time_spiderboss5.timer begin
    			notice_in_map("Au mai ramas 15 minute! ")
    			timer("time_spiderboss5", 1200)
    		end
    
    		when time_spiderboss10.timer begin
    			notice_in_map("Au mai ramas 10 minute! ")
    			timer("time_spiderboss10", 1200)
    		end
    
    		when time_spiderboss15.timer begin
    			notice_in_map("Au mai ramas 5 minute! ")
    			timer("time_spiderboss15", 1200)
    		end
    
    		when time_spiderboss20.timer begin
    			notice_in_map("Timpul a expirat, vei fi teleportat inapoi in oras. ")
    			timer("time_spiderboss20", 1200)
    			d.jump_all(178, 464)
    		end
    
    		when 2092.kill with pc.in_dungeon() begin
    			notice_in_map("Spiritul raului te vrea plecat de aici. ")
    			notice_in_map("Vei fi teleportat in aproximativ un minut! ")
    			notice_in_map("Omoara mai repede, pana nu va fi prea tarziu. ")
    			d.kill_all()
    			nation = { "Shinsoo" , "Chunjo" , "Jinno" }
    			notice_all("Echipa lui "..game.get_event_flag("spiderowner").." din regatul " .. nation [ pc.getempire() ] .. " au omorat Regina Paianjen! ")
    			timer("spiderboss_time_out", 60)
    		end
    
    		when spiderboss_time_out.timer with pc.get_map_index() == 191 begin
    			pc.setqf("spiderboss", 0)
    			game.set_event_flag("spiderworking", 0)
    			game.set_event_flag("spiderpassword", 0)
    			game.set_event_flag("spiderowner", 0)
    			d.jump_all(178, 464)
    		end
    
    		when 20371.chat."Misterul Temnitei" with pc.getqf("spiderboss ") == 1 begin
    			say_title(mob_name(20371))
    			say(" ")
    			say("Aceasta temnita cu mult timp in urma, ")
    			say("era un parc de distractie pentru copii, ")
    			say("dar intr-o zi un razboinic a omorat un paianjen si, ")
    			say("blestemul a coborat asupra lui si intregii temnite.. ")
    			say("De atunci nimeni nu a mai avut curajul sa intre acolo! ")
    			say(" ")
    		end
    	end
    end
    end
    
    

    And this is shown in putty:

    QUEST : spider_cave_boss
    STATE : start
    FUNCTION ready_for_cave()
    

    Any ideas?

    Thanks a lot!

  4. "The simplest explanation is probably the right explanation."

    - Occam's razor

     

    You can just use a source-based solution. If you run into that error, you can reset the players coordinates or something. That should do the trick without the need to flush caches etc...  ;)

     

    That's what I try to know.. Witch trick I've to use? And can make that trick to be automatically when that player reset his coordinates?

  5. You don't understand me. That script will work when your server wrong coordonates (if that happens, it's logic that player will be kicked out), and that script just reset his coordonates. After this, how much time will be forced to stay logged off? I mean, where I can see that flush time? I just wanna know, after that flush cache, will that query be saved? I'm sorry if you didn't understand... I really don't know how to explain...

  6. I don't need to make changes to player so easy. I just want to make a script, off-server (in site) to debug your character. This will set your coords and map_index to your map1 (red/blue/yellow)... It's simple.

     

    For example this query for setting you to map1 blue:

    UPDATE player.player 
    SET `x` = '959746', `y` = '271055', `map_index` = '41', `exit_x` = '959746', `exit_y` = '271055', `exit_map_index` = '41' 
    WHERE `name` = 'Example';
    

    So, if I will do that, and I will execute query, in ~7 mins server will save that changes?

     

    That's what I have in conf.txt

    DB_SLEEP_MSEC           = 10
    CLIENT_HEART_FPS        = 10
    HASH_PLAYER_LIFE_SEC    = 600
    BACKUP_LIMIT_SEC        = 3600
    PLAYER_ID_START = 100
    PLAYER_DELETE_LEVEL_LIMIT = 95
    PLAYER_DELETE_CHECK_SIMPLE = 1
    
  7. Hi guys,

    I just found a problem. When I modify something in player table, changes aren't saved in-game, even I use /reload p. And if I reboot the server, the changes come back how it was when I disconnected from the server. I mean, I can modify in player (and save that changes) only if server is closed.

     

    Can somebody give me the fix? I need real update because I'm working at maps and my character bug easiest, and I need to redefine his map_index and coords.

     

    Thank you very much!

  8. Hello guys,

    I made this simple quest:

     

    quest check_trans_ticket begin
    	state start begin
    		when 20088.chat." Înspre Caverna II " begin
    			say_title(mob_name(20088))
    			say("[ENTER]Oh, vãd foarte rar oameni care îndrãznesc sã[ENTER]exploreze aceste peºteri. Eu sunt protectorul[ENTER]sigiliului magic, aºa cã, creaturi rele[ENTER]nu poate trece sã ne ameninþe. ")
    			say("[ENTER]În primul rând, lasã-mã sã vãd calificarea ta.[ENTER] ")
    			wait()
    			if pc.count_item(71095) > 0 then
    				say_title(mob_name(20088))
    				say("[ENTER]Deci, poþi trece. Bun! ")
    				pc.remove_item(71095)
    			else
    				say_title(mob_name(20088))
    				say("Ai nevoie de un bilet de trecere.[ENTER]Nu te pot lãsa în cazul în care nu ai[ENTER]permisul de trecere.[ENTER] ")
    				say_item("Permis", 71095, "")
    				return
    			end
    			say_title(mob_name(20088))
    			say("[ENTER]..urmeazã-mã! ")
    			wait()
    			pc.warp(704100, 464100)
    		end
    		
    		when 20093.chat." Intrã in Grotã " begin
    			if pc.get_level() < 75 then
    				say_title(mob_name(20093)) 
    				say (string.format("Salut! Sunt %s din Ordinul Dragonului.[ENTER]Poti trece numai dacã ai atins nivelul 75! ", mob_name(20093)))
    				return
    			end
    			say_title(mob_name(20093)) 
    			say (string.format("Salut! Sunt %s din Ordinul Dragonului.[ENTER]Poti trece numai dacã ai la tine o Piatrã Însângeratã! ", mob_name(20093)))
    			wait()			
    			if pc.count_item(30190) + pc.count_item(30191) == 0 then 
    				local get_bloodstone = select ("De unde pot obtine o astfel de piatrã? " , "Pleacã sau esti un om mort! ") 
    				if get_bloodstone == 1 then 
    					say_title (mob_name(20093)) 
    					say("Numai cei care fac parte din Ordinul Dragonului si au[ENTER]în posesia lor o Piatrã Însângeratã pot trece.[ENTER]Acestia însã...sunt foarte putini.") 
    					say("Spune în tara ta cã te-ai întâlnit cu un preot sacru. ")
    					say("") 
    					say_reward ( "Dacã esti dispus sã îti sacrifici toatã viata sã[ENTER]slujesti Ordinul Dragonului, atunci probabil[ENTER]vei putea intra în Ordin. " ) 
    				else 
    					say_title (mob_name(20093)) 
    					say("Gândeste-te, poti sã te opui ordinului?[ENTER]Poate esti capabil sã mã învingi pe mine dar nu vei[ENTER]scãpa de furia Zeilor! ") 
    					say("Spune în tara ta cã te-ai întâlnit cu un preot sacru. ") 
    					say_reward ("Vei gãsi în curând calea cea dreaptã.[ENTER]Cu bine prietene! ") 
    				end 
    			elseif pc.count_item(30190) + pc.count_item(30191) > 0 then 
    				local get_bloodstone = select ("Doresc sã vãd Piatra Însângeratã " , "Am înteles ") 
    				if if get_bloodstone == 2 then
    					say_title ("Piatra Insangeratã[ENTER][ENTER] ")
    					say_item("Piatra Insangeratã",30190, 30191, "")
    					return 
    				else
    					say_pc_name ( ) 
    					say (string.format("Numele meu este %s si am venit la cererea Ordinului Dragonului! Ca dovadã îti voi arãta aceastã Piatrã Însângeratã.[ENTER]ªi acum lasã-mã sã intru! ", pc.get_name())) 
    					if pc.count_item(30190) >= 1 then 
    						pc.remove_item( 30190, 1) 
    					elseif pc.count_item (30191) >= 1 then 
    						pc.remove_item(30191, 1) 
    					else 
    						return 
    					end 
    					wait ( ) 		
    					say_title (mob_name(20093)) 
    					say ("Zeii te-au ales pe tine. Fie ca zeii sã te vegheze mereu! ") 
    					wait () 
    					pc.warp (10000, 1.2132e+06) 
    				end 
    			else 
    				return
    			end 
    		end
    	end
    end
     

     

    for teleporting in caves.

    When I compile it, I got no errors, but files aren't created in object. Why?

     

    Kind regards.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.