If you like it, thank it
Features:
-Gm's can set the succes rate
-You can set the amount ore needed to get 1 stone for each oretype
-Included 7 ores [ , , , , , ,
Things that can be better:
-you can add more ores
Installation:
Copy and paste the quest in a text editor.
Save it as: alchemist.quest
upload it into your serverfiles
add the quest into hongkong.list
run sh make.sh
execute /reload q in game
NPC used:
- 20060
Quest file:
PHP Code:
quest alchemist begin
state start begin
when 20060.chat."Set succesrate" with pc.is_gm() begin
local succesRate = game.get_event_flag("refineSuccesRate")
say("The current succesrate is: "..succesRate.."%.")
local succesRateNew = input()
game.set_event_flag("refineSuccesRate", succesRateNew)
end
when 20060.chat."Information" begin
local succesRate = game.get_event_flag("refineSuccesRate")
say("Here you can refine ore into stones.")
say("You need 200 ores to get one stone.")
say("")
say("The current succesrate is: "..succesRate.."%.")
end
when 20060.chat."Refine amber" with pc.count_item(50602)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50622)
pc.remove_item(50602,200)
say("Refining was a succes!")
else
pc.remove_item(50602,200)
say("Refining failed!")
end
end
when 20060.chat."Refine agete" with pc.count_item(50608)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50628)
pc.remove_item(50608,200)
say("Refining was a succes!")
else
pc.remove_item(50608,200)
say("Refining failed!")
end
end
when 20060.chat."Refine pearl" with pc.count_item(50609)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50629)
pc.remove_item(50609,200)
say("Refining was a succes!")
else
pc.remove_item(50609,200)
say("Refining failed!")
end
end
when 20060.chat."Refine white gold" with pc.count_item(50610)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50630)
pc.remove_item(50610,200)
say("Refining was a succes!")
else
pc.remove_item(50610,200)
say("Refining failed!")
end
end
when 20060.chat."Refine crystal" with pc.count_item(50611)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50631)
pc.remove_item(50611,200)
say("Refining was a succes!")
else
pc.remove_item(50611,200)
say("Refining failed!")
end
end
when 20060.chat."Refine amethyst" with pc.count_item(50612)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50632)
pc.remove_item(50612,200)
say("Refining was a succes!")
else
pc.remove_item(50612,200)
say("Refining failed!")
end
end
when 20060.chat."Refine heaven's tear" with pc.count_item(50613)>= 200 begin
local succesRate = game.get_event_flag("refineSuccesRate")
local random = math.random(1,100)
if random <= succesRate then
pc.give_item2(50633)
pc.remove_item(50613,200)
say("Refining was a succes!")
else
pc.remove_item(50613,200)
say("Refining failed!")
end
end
end
end