66 lines
1.1 KiB
Lua
66 lines
1.1 KiB
Lua
function player_use_eb ( eb_id )
|
|
|
|
player_time = tonumber(get_flag("dc_eb")) or 0
|
|
|
|
if isindunjon() == true then
|
|
|
|
if player_time < 10 then
|
|
set_flag("dc_eb" , player_time + 1 )
|
|
private_notice("Rez " .. get_flag("dc_eb") .. "/10")
|
|
return "true"
|
|
else
|
|
private_notice("Return town for reset Rez counter")
|
|
return "false"
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- LAMIA Challenge
|
|
if math.floor( get_value("x") / 16128) == 0 and math.floor( get_value("y") / 16128) == 21 then
|
|
|
|
if player_time < 5 then
|
|
set_flag("dc_eb" , player_time + 1 )
|
|
private_notice("Rez " .. get_flag("dc_eb") .. "/5")
|
|
return "true"
|
|
else
|
|
private_notice("Return town for reset Rez counter")
|
|
return "false"
|
|
end
|
|
|
|
end
|
|
|
|
return "true"
|
|
|
|
end
|
|
|
|
function player_use_eb_init()
|
|
set_flag("dc_eb" , 0 )
|
|
end
|
|
|
|
|
|
function isindunjon()
|
|
|
|
if 1 == 1 then
|
|
return false
|
|
end
|
|
|
|
x = get_value("x")
|
|
y = get_value("y")
|
|
|
|
x_id = math.floor(x / 16128)
|
|
y_id = math.floor(y / 16128)
|
|
|
|
|
|
--donjon
|
|
if x_id == 11 and y_id == 0 then return true end --parra
|
|
if x_id == 10 and y_id == 0 then return true end --Vera
|
|
if x_id == 12 and y_id == 11 then return true end --ruine
|
|
|
|
|
|
|
|
end
|
|
|
|
|