PHP Code:
quest refine_items begin
state start begin
when 20095.take begin
local out = mysql_query("SELECT * FROM player.refine_proto WHERE id = (SELECT refine_set FROM player.item_proto WHERE vnum = "..item.get_vnum()..");", "root", "daroo123")
if type(out) ~= "table" then return end
out.cost[1] = out.cost[1]*100 --Faktor zur erhöhung des Preises
say_title("Verbesserungen")
if out.vnum0[1] ~= 0 then
say_item(item_name(out.vnum0[1]), out.vnum0[1], out.count0[1].."x")
end
if out.vnum1[1] ~= 0 then
say_item(item_name(out.vnum1[1]), out.vnum1[1], out.count1[1].."x")
end
if out.vnum2[1] ~= 0 then
say_item(item_name(out.vnum2[1]), out.vnum2[1], out.count2[1].."x")
end
say("Verbesserungskosten: "..out.cost[1].." Yang")
say("")
if select("Ok", "Abbruch") == 2 then return end
if pc.get_gold() < out.cost[1] then
syschat("Nicht genügend Yang für eine Verbesserung.")
return
elseif pc.count_item(out.vnum0[1]) < out.count0[1] or pc.count_item(out.vnum1[1]) < out.count1[1] or pc.count_item(out.vnum2[1]) < out.count2[1] then
syschat("Du hast nicht das richtige Material, um das herzustellen.")
return
end
if out.vnum0[1] ~= 0 then
pc.remove_item(out.vnum0[1], out.count0[1])
end
if out.vnum1[1] ~= 0 then
pc.remove_item(out.vnum1[1], out.count1[1])
end
if out.vnum2[1] ~= 0 then
pc.remove_item(out.vnum2[1], out.count2[1])
end
pc.change_gold(-out.cost[1])
item.over9refine()
say_title("Verbesserung")
say("Die Gegenstandsverbesserung war erfolgreich.")
end
end
end
wo kann ich hier einstellen wie oft die das Verbessern dürfen ?! ich find das nicht -.-