Jump to content

[QUEST]Eliminar Última Piedra


Tiico™

Mensajes recomendados

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
Enlace para comentar
Compartir en otros sitios

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 :)

Enlace para comentar
Compartir en otros sitios

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
Enlace para comentar
Compartir en otros sitios

Unirse a la conversación

Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.

Guest
Responder a este tema...

×   Has pegado contenido con formato .   Eliminar formato

  Only 75 emoji are allowed.

×   Tu enlace se ha incorporado automáticamente.   Mostrar un enlace en su lugar

×   Se ha restaurado el contenido anterior. .   Borrar editor

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

  • Recientemente navegando por este tema   0 miembros

    • No hay usuarios registrados visitando esta página.
×
×
  • Crear nuevo...