Miguelito Publicado 27 de Agosto del 2014 Reportar Compartir Publicado 27 de Agosto del 2014 Hola buenas, espero no molestarlos pero andube traduciendo esta quest y al parecer hice algo mal porque me sale un error al querer cargarla Error: QUEST: --[[ Aukciós Ház Quest Készítette: xxxHUN™ 2014.07.22.]]quest aukcios_haz begin state start begin function ItemAukcioraAdas(name, vnum, count, stones, bonuses, price, licitmin) local query = "INSERT INTO player.aukcios_haz (owner, bidder, price, licitmin, vnum, count, st1, st2, st3, bt1, bv1, bt2, bv2, bt3, bv3, bt4, bv4, bt5, bv5, bt6, bv6, bt7, bv7) VALUES ('".. name .."', 'No offer', ".. price ..", ".. licitmin ..", ".. vnum ..", ".. count .."" for i = 1, 3 do query = query ..", ".. stones[i] end for j = 1, 7 do query = query ..", ".. bonuses[j][1] ..", ".. bonuses[j][2] end query = query ..");" mysql_query(query) end function ItemListAukcio(name, n) local item_list if n == 0 then item_list = mysql_query("SELECT * FROM player.aukcios_haz WHERE owner <> '".. name .."';") elseif n == 1 then item_list = mysql_query("SELECT * FROM player.aukcios_haz WHERE owner = '".. name .."';") elseif n == 2 then item_list = mysql_query("SELECT * FROM player.aukcios_haz_item_reward WHERE owner = '".. name .."';") elseif n == 3 then item_list = mysql_query("SELECT * FROM player.aukcios_haz_money_reward WHERE owner = '".. name .."';") end if table.getn(item_list) == 0 and n == 0 then item_list = "La casa de subastas está vacía." elseif table.getn(item_list) == 0 and n == 1 then item_list = "No tienes artículos en la casa de subastas." elseif table.getn(item_list) == 0 and n == 2 then item_list = "No tienes artículos recibidos." elseif table.getn(item_list) == 0 and n == 3 then item_list = "No tienes dinero recibido." end return item_list end function AukcioMenuGeneralas(item_list, n) local name = {} local id = {} for i = 1, table.getn(item_list) do if n == 0 then table.insert(name, item_name(item_list[i][6]).." ") table.insert(id, item_list[i][1]) elseif n == 1 then table.insert(name, item_name(item_list[i][3]).." ") table.insert(id, item_list[i][1]) elseif n == 2 then table.insert(name, item_list[i][3].." Yang") table.insert(id, item_list[i][1]) end end return name, id end function ItemNezegetes(id, item_list) local item_data = {} for i = 1, table.getn(item_list) do if item_list[i][1] == id then item_data = item_list[i] break end end return item_data end function ItemBonusList(item_data) local bonus_list = { [0] = "No Bonus ", [1] = "Max HP ", [2] = "Max SP ", [3] = "VIT ", [4] = "INT ", [5] = "STR ", [6] = "DEX ", [7] = "Velocidad de Ataque ", [8] = "Velocidad de movimiento ", [9] = "velocidad de Hechizo ", [10] = "Reg. HP", [11] = "Reg. SP", [12] = "Probabilidad para veneno ", [13] = "Probabilidad para apagón ", [14] = "Probabilidad para retardo ", [15] = "Probable crítico ", [16] = "Oportunidad para la penetración ", [17] = "Fuerza contra medio-humanos ", [18] = "Fuerza contra los animales ", [19] = "Fuerza contra orcos ", [20] = "Fuerza contra esotericos ", [21] = "Fuerza contra muertos vivientes ", [22] = "Fuerza contra demonios ", [23] = "Recuperación de HP ", [24] = "Recuperación de SP ", [25] = "Probabilidad de robar HP ", [26] = "Esély, hogy az MP-t találatnál megtartsd ", [27] = "Probabilidad para bloquear ataques cuerpo a cuerpo ", [28] = "Probabilidad para evitar las flechas ", [29] = "Defensa Espada ", [30] = "Defensa 2 Manos ", [31] = "Defensa Daga ", [32] = "Defensa Campana ", [33] = "Defensa Fan ", [34] = "Arrow resist. ", [35] = "Resistencia al fuego ", [36] = "Resistencia a la luz ", [37] = "Resistencia Magia ", [38] = "Resistencia al Viento ", [39] = "La oportunidad de reflectar ataque cuerpo a cuerpo ", [40] = "Probabildiad de Reflectar ", [41] = "Resistencia a Veneno ", [42] = "Esély MP visszaállítására ", [43] = "Probabilidad de EXP ", [44] = "Probabilidad de Yang ", [45] = "Probabilidad de Objeto ", [46] = "Ital hatásnövekedés ", [47] = "Esély TP visszaállítására ", [48] = "Inmune contra apagón ", [49] = "Inmune contra retardo ", [50] = "Inmune contra la caída ", [51] = "Habilidad ", [52] = "Media ", [53] = "valor de Ataque ", [54] = "Defensa ", [55] = "Valor Ataque Magico ", [56] = "Defensa Magica ", [57] = "57 ", [58] = "resistencia máxima ", [59] = "Fuerza contra guerrero ", [60] = "Fuerza contra ninja ", [61] = "Fuerza contra sura ", [62] = "Fuerza contra chaman ", [63] = "Fuerza contra Mounstruo ", [64] = "valor de Ataque ", [65] = "Defensa ", [66] = "Probabilidad de EXP ", [67] = "Probabilidad de Yang ", [68] = "Probabilidad de Objeto ", [69] = "69 ", [70] = "70 ", [71] = "Daños Habilidad ", [72] = "Daños de Media ", [73] = "Resistencia Habilidad ", [74] = "Resistencia Media ", [75] = "75 ", [76] = "76 ", [77] = "77 ", [78] = "Probabilidad de defensa contra G ", [79] = "Probabilidad de defensa contra N ", [80] = "Probabilidad de defensa contra S ", [81] = "Probabilidad de defensa contra CH " } local x = 1 for i = 11, table.getn(item_data) -1, 2 do say(x ..". Bonus: ".. item_data[i + 1] .." ".. bonus_list[tonumber(item_data[i])]) x = x + 1 end end function ItemStoneList(item_data) for i = 8, 10 do local stone = "No tiene piedras" local id = tonumber(item_data[i]) if id >= 28000 and id < 29000 then stone = item_name(id) end say(i - 7 ..". Piedra Espiritu: ".. stone) end end function ItemVasarlas(item_data, name, gold) gold = tonumber(gold) if gold < tonumber(item_data[4]) then say_reward("No tienes suficiente dinero.") return end pc.change_gold(-tonumber(item_data[4])) mysql_query("DELETE FROM player.aukcios_haz WHERE id = ".. item_data[1] ..";") local query = "INSERT INTO player.aukcios_haz_item_reward (owner, vnum, count, st1, st2, st3, bt1, bv1, bt2, bv2, bt3, bv3, bt4, bv4, bt5, bv5, bt6, bv6, bt7, bv7) VALUES ('".. name .."', ".. item_data[6] ..", ".. item_data[7] .."" for i = 8, 10 do query = query ..", ".. item_data[i] end for j = 11, table.getn(item_data) - 1, 2 do query = query ..", ".. item_data[j] ..", ".. item_data[j + 1] end query = query ..");" mysql_query(query) mysql_query("INSERT INTO player.aukcios_haz_money_reward (owner, amount, cause) VALUES ('".. item_data[2] .."', ".. item_data[4] ..", 'Sold item.');") if item_data[3] ~= "Ninguna oferta" then mysql_query("INSERT INTO player.aukcios_haz_money_reward (owner, amount, cause) VALUES ('".. item_data[3] .."', ".. item_data[5] ..", 'Lost bid.');") end say_reward("El ".. item_name(item_data[6]) .." se ha trasladado a sus elementos recibidos.") end function ItemLicitalas(item_data, name, offer, gold) gold = tonumber(gold) offer = tonumber(offer) if offer == nil then say_reward("Usted no puede hacer ofertas como ésta.") return end offer = math.floor(offer) if offer > gold then say_reward("No tienes ese dinero.") return end if offer <= tonumber(item_data[5]) then say_reward("Usted tiene que oferta más grande que el límite mínimo.") return end if offer > 1999999999 then say_reward("No se puede hacer una gran oferta de este tipo.") return end if offer >= tonumber(item_data[4]) then aukcios_haz.ItemVasarlas(item_data, name, gold) return end pc.change_gold(-offer) if item_data[3] ~= "Ninguna oferta" then mysql_query("INSERT INTO player.aukcios_haz_money_reward (owner, amount, cause) VALUES ('".. item_data[3] .."', ".. item_data[5] ..", 'Lost bid.');") end mysql_query("UPDATE player.aukcios_haz SET bidder = '".. name .."', licitmin = ".. offer .." WHERE id = ".. item_data[1] ..";") say_reward("Usted ha hecho una oferta exitosa para ".. item_name(tonumber(item_data[6])) ..".") end function LicitLezaras(item_data) if item_data[3] ~= "Ninguna oferta" then mysql_query("DELETE FROM player.aukcios_haz WHERE id = ".. item_data[1] ..";") local query = "INSERT INTO player.aukcios_haz_item_reward (owner, vnum, count, st1, st2, st3, bt1, bv1, bt2, bv2, bt3, bv3, bt4, bv4, bt5, bv5, bt6, bv6, bt7, bv7) VALUES ('".. item_data[3] .."', ".. item_data[6] ..", ".. item_data[7] .."" for i = 8, 10 do query = query ..", ".. item_data[i] end for j = 11, table.getn(item_data) - 1, 2 do query = query ..", ".. item_data[j] ..", ".. item_data[j + 1] end query = query ..");" mysql_query(query) mysql_query("INSERT INTO player.aukcios_haz_money_reward (owner, amount, cause) VALUES ('".. item_data[2] .."', ".. item_data[5] ..", 'Sold item.');") say_reward("Usted vendió la ".. item_name(tonumber(item_data[6])) ..", ".. item_data[5] .." Yang ha sido transferido a tu dinero recibido.") else aukcios_haz.ItemVisszavesz(item_data) end end function ItemVisszavesz(item_data) if item_data[3] ~= "Ninguna oferta" then mysql_query("INSERT INTO player.aukcios_haz_money_reward (owner, amount, cause) VALUES ('".. item_data[3] .."', ".. item_data[5] ..", 'Owner took back the item.');") end mysql_query("DELETE FROM player.aukcios_haz WHERE id = ".. item_data[1] ..";") local query = "INSERT INTO player.aukcios_haz_item_reward (owner, vnum, count, st1, st2, st3, bt1, bv1, bt2, bv2, bt3, bv3, bt4, bv4, bt5, bv5, bt6, bv6, bt7, bv7) VALUES ('".. item_data[2] .."', ".. item_data[6] ..", ".. item_data[7] .."" for i = 8, 10 do query = query ..", ".. item_data[i] end for j = 11, table.getn(item_data) - 1, 2 do query = query ..", ".. item_data[j] ..", ".. item_data[j + 1] end query = query ..");" mysql_query(query) say_reward("El ".. item_name(tonumber(item_data[6])) .." se ha trasladado a sus elementos recibidos.") end function ItemLeltarba(item_data) if not pc.enough_inventory(item_data[3]) then say_reward("No tienes suficiente espacio en tu inventario.") return end mysql_query("DELETE FROM player.aukcios_haz_item_reward WHERE id = ".. item_data[1] ..";") pc.give_item2_select(item_data[3], item_data[4]) for i = 5, 7 do item.set_socket(i - 5, item_data[i]) end local x = 0 for j = 8, table.getn(item_data) - 1, 2 do item2.set_attr(x, item_data[j], item_data[j + 1]) x = x + 1 end say_reward("El ".. item_name(tonumber(item_data[3])) .." ha sido trasladado a su inventario.") end function YangLeltarba(item_data, gold) if gold + item_data[3] > 1999999999 then say_reward("No se puede tomar una gran cantidad de dinero.") return end pc.change_gold(item_data[3]) mysql_query("DELETE FROM player.aukcios_haz_money_reward WHERE id = ".. item_data[1] ..";") say_reward(item_data[3] .." Yang ha sido transferido a su inventario.") end when 20091.take begin local iv = item.get_vnum() local ic = item.get_count() say_title("Casa de subastas") say("Si usted realmente desea vender este artículo, ") say("usted tiene que fijar un precio por ello, y ") say("otro para el comienzo de la lícita. ") say("") say("Así que, ¿quieres vender este artículo?") local elad = select ("Si", "No") if elad == 2 then return end local stones = {} local bonuses = {} for i = 0, 6 do local t, v = item2.get_attr(i) table.insert(bonuses, {t, v}) if i < 3 then table.insert(stones, item.get_socket(i)) end end say_title("Casa de subastas") say("Price: ") local price = tonumber(input()) say_title("Casa de subastas") say("Precio mínimo: ") local licitmin = tonumber(input()) if type(price) ~= "number" or type(licitmin) ~= "number" then say_reward("Los precios deben ser números!") return else price = math.floor(price) licitmin = math.floor(licitmin) end if price < 1 or price > 1999999999 or licitmin < 1 or licitmin > 1999999999 then say_reward("Los precios deben estar entre 1 y 1.999.999.999 Yang.") return end if price <= licitmin then say_reward("El precio debe ser más grande que el límite mínimo.") return end item.remove() say_title("Casa de subastas") say("El ".. item_name(iv) .." será colocado en la casa de subastas.") say("Precio: ".. price .." Yang.") say("Precio Minimo : ".. licitmin .." Yang.") wait() aukcios_haz.ItemAukcioraAdas(pc.get_name(), iv, ic, stones, bonuses, price, licitmin) say_title("Casa de subastas") say("The ".. item_name(iv) .." has been placed in the Auction House.") end when 20091.chat."Casa de subastas" begin say_title("Casa de subastas") local lehetosegek = select ("Los elementos de la casa de subastas", "Mis artículos en la casa de subastas", "Elementos recibidos", "El dinero recibido", "Salir") if lehetosegek == 5 then return elseif lehetosegek == 1 then local item_list = aukcios_haz.ItemListAukcio(pc.get_name(), 0) if type(item_list) == "string" then say_reward(item_list) return end local menu_name, menu_id = aukcios_haz.AukcioMenuGeneralas(item_list, 0) while true do local menu = select3(menu_name) local item_data = aukcios_haz.ItemNezegetes(menu_id[menu], item_list) say_title(item_name(item_data[6]) .."t".. item_data[7] .."db") say("Propietario: ".. item_data[2]) say_item_vnum(item_data[6]) aukcios_haz.ItemBonusList(item_data) wait() say_title(item_name(item_data[6]) .."t".. item_data[7] .."db") say("Propietario: ".. item_data[2]) aukcios_haz.ItemStoneList(item_data) say("Precio: ".. item_data[4] .." Yang.") say("Precio Minimo: ".. item_data[5] .." Yang.") say("Mayor oferta por: ".. item_data[3] ..".") say("") say("Qué es lo que quieres hacer?") local choice = select ("Lo compro", "Hago una oferta", "Atras", "Salir") if choice == 4 then return elseif choice == 1 then aukcios_haz.ItemVasarlas(item_data, pc.get_name(), pc.get_gold()) return elseif choice == 2 then say_title(item_name(item_data[6]) .."t".. item_data[7] .."db") say("Precio: ".. item_data[4] .." Yang.") say("Precio Minimo: ".. item_data[5] .." Yang.") say("") say("Su oferta: ") local offer = input() aukcios_haz.ItemLicitalas(item_data, pc.get_name(), offer, pc.get_gold()) return end end elseif lehetosegek == 2 then local item_list = aukcios_haz.ItemListAukcio(pc.get_name(), 1) if type(item_list) == "string" then say_reward(item_list) return end local menu_name, menu_id = aukcios_haz.AukcioMenuGeneralas(item_list, 0) while true do local menu = select3(menu_name) local item_data = aukcios_haz.ItemNezegetes(menu_id[menu], item_list) say_title(item_name(item_data[6]) .."t".. item_data[7] .."db") say_item_vnum(item_data[6]) say("Precio: ".. item_data[4] .." Yang.") say("Precio minimo: ".. item_data[5] .." Yang.") say("Mayor oferta por: ".. item_data[3] ..".") say("") say("Qué es lo que quieres hacer?") local choice = select ("Cierro la oferta", "Me retracto", "Atras", "Salir") if choice == 4 then return elseif choice == 1 then aukcios_haz.LicitLezaras(item_data) return elseif choice == 2 then aukcios_haz.ItemVisszavesz(item_data) return end end elseif lehetosegek == 3 then local item_list = aukcios_haz.ItemListAukcio(pc.get_name(), 2) if type(item_list) == "string" then say_reward(item_list) return end local menu_name, menu_id = aukcios_haz.AukcioMenuGeneralas(item_list, 1) while true do local menu = select3(menu_name) local item_data = aukcios_haz.ItemNezegetes(menu_id[menu], item_list) say_title(item_name(item_data[3]) .."t".. item_data[4] .."db") say_item_vnum(item_data[3]) say("") say("¿Quiere mover este elemento a su inventario?") local choice = select ("Por supuesto", "Atras", "Salir") if choice == 3 then return elseif choice == 1 then aukcios_haz.ItemLeltarba(item_data) return end end elseif lehetosegek == 4 then local item_list = aukcios_haz.ItemListAukcio(pc.get_name(), 3) if type(item_list) == "string" then say_reward(item_list) return end local menu_name, menu_id = aukcios_haz.AukcioMenuGeneralas(item_list, 2) while true do local menu = select3(menu_name) local item_data = aukcios_haz.ItemNezegetes(menu_id[menu], item_list) say_title(item_data[3] .." Yang") say("Causa de la recepción de este dinero: ") say(item_data[4] .." ") say("") say("¿Lo quiere transferir a su inventario?") local choice = select ("Por supuesto", "Atras", "Salir") if choice == 3 then return elseif choice == 1 then aukcios_haz.YangLeltarba(item_data, pc.get_gold()) return end end end end endend Gracias de Antemano y espero no molestar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Miguelito Publicado 27 de Agosto del 2014 Author Reportar Compartir Publicado 27 de Agosto del 2014 (editado) te falta añadir esas 3 funciones a tu quest_fuctions. item2_get item2_get y select3 ? PD: Gracias Solucionado <3 Editado 27 de Agosto del 2014 por Frontier Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Miguelito Publicado 27 de Agosto del 2014 Author Reportar Compartir Publicado 27 de Agosto del 2014 Gracias! Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Miguelito Publicado 27 de Agosto del 2014 Author Reportar Compartir Publicado 27 de Agosto del 2014 Gracias! Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
PromeTheuS Publicado 27 de Agosto del 2014 Reportar Compartir Publicado 27 de Agosto del 2014 Gracias! De que trata esta quest? Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
PromeTheuS Publicado 27 de Agosto del 2014 Reportar Compartir Publicado 27 de Agosto del 2014 Gracias! Sorry se duplico,. sorry!! Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Miguelito Publicado 27 de Agosto del 2014 Author Reportar Compartir Publicado 27 de Agosto del 2014 Se trataba del sistema de Subastas pero tiene un error en la quest que no tiene la funcion para que siga a la segunda fase he intentamos con un amigo hacerlo pero no pudimos xd Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Miguelito Publicado 27 de Agosto del 2014 Author Reportar Compartir Publicado 27 de Agosto del 2014 Se trataba del sistema de Subastas pero tiene un error en la quest que no tiene la funcion para que siga a la segunda fase he intentamos con un amigo hacerlo pero no pudimos xd Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Mensajes recomendados