Jump to content

[QUEST]Eliminar Última Piedra


Tiico™

Recommended Posts

Eh aquí una quest para eliminar el ultimo socket de pidras de armaduras y armas..

 

La quest es de blackyuko, yo la traduccí y la mejore .. Espero que os sirva

quest extractor_de_piedras begin	state start begin		function getItemVnum()			return 71109 ----- Item a usar xD		end				when 9003.take begin			say_title(mob_name(npc.get_race()))			if pc.count_item(extractor_piedras.getItemVnum()) == 0 then				say("Para poder sacar la ultima piedra de tu item")				say("Deveras poseer este objeto:")				say_item_vnum(extractor_piedras.getItemVnum())				return			end			if not extractor_piedras.IsValidItem(item.get_type(), item.get_sub_type()) then				say("Esta trancicion solo funciona con armas y armaduras.")				return			end					local last_stone = {['vnum'] = nil, ['slotID'] = nil}			local i = 2			local found = false			while i >= 0 and not found do				local sckt_state = item.get_socket(i)				if extractor_piedras.IsValidSocket(sckt_state) then					last_stone.vnum = sckt_state					last_stone.slotID = i					found = true				end				i = i-1			end			if last_stone.vnum == nil then				say("No Hay Piedras para eliminarse.")				return			end			say("Si sacamos la ultima piedra")			say("la piedra sacada le quedara en su inventario")			say("no se preocupe.")			say_reward("Ultima Piedra: "..item_name(last_stone.vnum).." ")			local s = select("Continuar", "Cancelar")			if s == 2 then				return			end			pc.remove_item(extractor_piedras.getItemVnum(), 1)			pc.give_item2(last_stone.vnum, 1)			item.set_socket(last_stone.slotID, 28960)			say_title(mob_name(npc.get_race()))			say("Operacion completada.")			end				function IsValidItem(it_type, it_subtype)			return ((it_type == 1 and it_subtype < 6) or (it_type == 2 and it_subtype == 0))		end				function IsValidSocket(sckt_value)			return (sckt_value != 0 and sckt_value != 1 and sckt_value != 28960)		end	endend
Link to comment
Share on other sites

Por joder un poco como hacen todos :P

quest extractor_de_piedras begin	state start begin		function getItemVnum()			return 71109 ----- Item a usar xD		end				when 9003.take begin			say_title(mob_name(npc.get_race()))			if pc.count_item(extractor_piedras.getItemVnum()) == 0 then				say("Para poder extraer la ultima piedra de tu artículo,")				say("deberás poseer este objeto:")				say_item_vnum(extractor_piedras.getItemVnum())				return			end			if not extractor_piedras.IsValidItem(item.get_type(), item.get_sub_type()) then				say("Esta extracción solo funciona con Armas y Armaduras.")				return			end					local last_stone = {['vnum'] = nil, ['slotID'] = nil}			local i = 2			local found = false			while i >= 0 and not found do				local sckt_state = item.get_socket(i)				if extractor_piedras.IsValidSocket(sckt_state) then					last_stone.vnum = sckt_state					last_stone.slotID = i					found = true				end				i = i-1			end			if last_stone.vnum == nil then				say("No hay piedras para extraer.")				return			end			say("Si extraes la ultima piedra,")			say("la que fue extraída se quedará")			say("en tu inventario, así que no te preocupes.")			say_reward("Ultima piedra: "..item_name(last_stone.vnum).." ")			local s = select("Continuar", "Cancelar")			if s == 2 then				return			end			pc.remove_item(extractor_piedras.getItemVnum(), 1)			pc.give_item2(last_stone.vnum, 1)			item.set_socket(last_stone.slotID, 28960)			say_title(mob_name(npc.get_race()))			say("Operacion completada.")			end				function IsValidItem(it_type, it_subtype)			return ((it_type == 1 and it_subtype < 6) or (it_type == 2 and it_subtype == 0))		end				function IsValidSocket(sckt_value)			return (sckt_value != 0 and sckt_value != 1 and sckt_value != 28960)		end	endend 

Nha solamente corregí los errores de texto de Tiico, ya que sus frases no estaban bien escritas y ahora lo están. También fue escrito a la forma que te lo haría Metin2 Oficial.

 

Igualmente buen aporte feo +1 :)

Link to comment
Share on other sites

quest piedra begin	state start begin		when 20006.take begin 			say_title(mob_name(20006))			say()			if not ((item.get_type() == 1 and item.get_sub_type() < 6) or (item.get_type() == 2 and item.get_sub_type() == 0)) then				say('Esta trancicion solo funciona con armas y armaduras.')				return			end			local data,x = {{},{}},1			for i = 0,2 do				local c = item.get_socket(i)				if c > 2 and c ~= 28960 then					data[1][x],data[2][x]= i,item_name(c)					x = x + 1				end			end			if data[1][1]==nil then say('no ai piedras') return end			table.insert(data[2],'cerrar')			say('cual pierdra qieres eliminar?')			local s=select_table(data[2])			if s==table.getn(data[2]) then return end			say(data[2][s]..' eliminar?')			if select('Si','No')==2 then return end			say(data[2][s]..' eliminado')			pc.give_item2(item.get_socket(data[1][s]),1)			item.set_socket(data[1][s],28960)		end	endend
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...