//****************************************************************************
// SPHERE by : Menasoft ©1997-2017
// www.sphereserver.net
// All SPHERE script files and formats are copyright Menasoft & Partners.
// This file may be freely edited for personal use, but may not be distributed
// in whole or in part, in any format without express written permission from
// Menasoft & Partners.  All donations and contributions
// become the property of Menasoft & Partners.
//****************************************************************************
// FILE LAST UPDATED: Tuesday, Jun 20, 2017
//
VERSION=0.56d

[COMMENT sphere_resource]
A REGIONRESOURCE (usually named mr_something) describes how a map resource
can be harvested by using the following properties:

 AMOUNT=     The amount of resources that can be reaped.
 REAP=       The itemdef that will be reaped.
 REAPAMOUNT= The amount that can be gathered in one use of skill.
 SKILL=      The skill required to gather that resource.
 REGEN=      The time that must pass before that location can be mined again.

A REGIONTYPE (usually named r_something) is an EVENT that affects players
and/or creatures in a map region.

A map region (also known as AREADEF or ROOMDEF, and usually named a_something)
can be assigned one or more REGIONTYPEs through its EVENT= property.

In order for harvesting skills like mining, lumberjacking, and fishing to
work in a map region, the REGIONTYPE must be linked to a Terrain TYPEDEF,
and that REGIONTYPE needs one or more RESOURCE= properties linked to a map
resource.

A terrain TYPEDEF (usually named t_something) is linked to terrain through
it's TERRAIN= property.

* REGIONRESOURCE and REGIONTYPE are defined in the sphere_region.scp file.
* Terrain TYPEDEFs are defined in the sphere_terrain_types.scp file.
* Regions (AREADEF and ROOMDEF) are defined in sphere_map*.scp files.


////////////////////////////////
// The "nothing" map resource //
////////////////////////////////

[REGIONRESOURCE mr_nothing]
REAP=i_unused
REGEN=60*60*10 // Nothing can be found at this location for this many seconds.

/////////////////////////////////////
// Resources for herbivores to eat //
/////////////////////////////////////

[REGIONRESOURCE mr_grass]
AMOUNT=9,30        // This many...
REAP=i_hay_sheaf   // ...of this item...
REAPAMOUNT=1       // ...can be harvested this many at a time...
//SKILL=0.0        // ...and it takes no skill to do it.
REGEN=60*60*10

[REGIONTYPE r_default_grass t_grass]
// All grass can be eaten by default.
RESOURCES=1.0 mr_grass


/////////////////////////////////
// Resources for fishing skill //
/////////////////////////////////

[REGIONRESOURCE mr_fish1]
AMOUNT=9,30        // This many...
REAP=i_fish_big_1  // ...of this item...
REAPAMOUNT=1,3
SKILL=1.0,100.0    // ...can be harvested if the player has this much skill.
REGEN=60*60*10

[REGIONRESOURCE mr_fish2]
AMOUNT=9,30
REAP=i_fish_big_2
REAPAMOUNT=1,3
SKILL=1.0,100.0
REGEN=60*60*10

[REGIONRESOURCE mr_fish3]
AMOUNT=9,30
REAP=i_fish_big_3
REAPAMOUNT=1,3
SKILL=1.0,100.0
REGEN=60*60*10

[REGIONRESOURCE mr_fish4]
AMOUNT=9,30
REAP=i_fish_big_4
REAPAMOUNT=1,3
SKILL=1.0,100.0
REGEN=60*60*10

[REGIONTYPE r_default_water t_water]
RESOURCES=60.0 mr_nothing  // Most of the time fishing produces nothing.
RESOURCES=10.0 mr_fish1
RESOURCES=10.0 mr_fish2
RESOURCES=10.0 mr_fish3
RESOURCES=10.0 mr_fish4

[REGIONTYPE r_water t_water]
RESOURCES=60.0 mr_nothing
RESOURCES=10.0 mr_fish1
RESOURCES=10.0 mr_fish2
RESOURCES=10.0 mr_fish3
RESOURCES=10.0 mr_fish4

ON=@RegPeriodic
// Water/Ocean boat sounds
SRC.SOUND={025 1 026 1 027 1 010 1 011 1 012 1 013 1}


///////////////////////////////////////
// Resources for lumberjacking skill //
///////////////////////////////////////

[REGIONRESOURCE mr_tree]
AMOUNT=9,30
REAP=i_log
REAPAMOUNT=1,3
SKILL=1.0,80.0
REGEN=60*60*10

[REGIONTYPE r_default_tree t_tree]
// All trees produce wood by default.
RESOURCES=60.0 mr_nothing
RESOURCES=40.0 mr_tree

////////////////////////////////
// Resources for mining skill //
////////////////////////////////

[REGIONRESOURCE mr_iron]
AMOUNT=9,30
REAP=i_ore_iron
REAPAMOUNT=1,3
SKILL=1.0,30.0
REGEN=60*60*10

[REGIONRESOURCE mr_rusty]
AMOUNT=8,21
REAP=i_ore_rusty
REAPAMOUNT=1,3
SKILL=1.0,30.0
REGEN=60*60*10

[REGIONRESOURCE mr_bronze]
AMOUNT=4,12
REAP=i_ore_bronze
REAPAMOUNT=1,3
SKILL=1.0,30.0
REGEN=60*60*10

[REGIONRESOURCE mr_old_copper]
AMOUNT=7,18
REAP=i_ore_old_copper
REAPAMOUNT=1,3
SKILL=1.0,30.0
REGEN=60*60*10

[REGIONRESOURCE mr_dull_copper]
AMOUNT=5,25
REAP=i_ore_dull_copper
REAPAMOUNT=1,3
SKILL=1.0,30.0
REGEN=60*60*10

[REGIONRESOURCE mr_shadow]
AMOUNT=5,16
REAP=i_ore_shadow
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_copper]
AMOUNT=5,20
REAP=i_ore_copper
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_gold]
AMOUNT=3,10
REAP=i_ore_gold
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_rose]
AMOUNT=3,9
REAP=i_ore_rose
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_agapite]
AMOUNT=3,8
REAP=i_ore_agapite
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_bloodrock]
AMOUNT=3,6
REAP=i_ore_bloodrock
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_silver]
AMOUNT=1,2
REAP=i_ore_silver
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_verite]
AMOUNT=2,6
REAP=i_ore_verite
REAPAMOUNT=1,3
SKILL=30.0,60.0
REGEN=60*60*10

[REGIONRESOURCE mr_Valorite]
AMOUNT=2,4
REAP=i_ore_Valorite
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_mytheril]
AMOUNT=2,3
REAP=i_ore_mytheril
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_blackrock]
AMOUNT=1,3
REAP=i_ore_blackrock
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_diamond]
AMOUNT=1,4
REAP=i_gem_diamond
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_ruby]
AMOUNT=1,4
REAP=i_gem_ruby
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_citrine]
AMOUNT=1,4
REAP=i_gem_citrine
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_Emerald]
AMOUNT=1,4
REAP=i_gem_Emerald
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_Star_Sapphire]
AMOUNT=1,4
REAP=i_gem_Star_Sapphire
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_Sapphire]
AMOUNT=1,4
REAP=i_gem_Sapphire
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_Amethyst]
AMOUNT=1,4
REAP=i_gem_Amethyst
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONRESOURCE mr_Tourmaline]
AMOUNT=1,4
REAP=i_gem_Tourmaline
REAPAMOUNT=1,3
SKILL=60.0,110.0
REGEN=60*60*10

[REGIONTYPE r_default_rock t_rock]
// By default, iron is most common, sometimes nothing can be mined, but there
// is a small chance of a rare diamond.  Shadow ore is cannot be mined.
RESOURCES=50.0 mr_iron    // This large number makes this very common.
RESOURCES=10.0 mr_nothing
RESOURCES=8.0 mr_rusty
RESOURCES=6.0 mr_old_copper
RESOURCES=6.0 mr_dull_copper
RESOURCES=5.0 mr_bronze
RESOURCES=5.0 mr_copper
RESOURCES=2.0 mr_gold
RESOURCES=2.0 mr_rose
RESOURCES=2.0 mr_agapite
RESOURCES=1.0 mr_bloodrock
RESOURCES=1.0 mr_silver
RESOURCES=0.5 mr_verite
RESOURCES=0.2 mr_valorite
RESOURCES=0.1 mr_mytheril
RESOURCES=0.1 mr_blackrock
RESOURCES=0.1 mr_diamond    // The small number means this is very rare.

[REGIONTYPE r_dungeon t_rock]
// Usually Iron, but sometimes Shadow ore can be mined in dungeons.
RESOURCES=100.0 mr_nothing
RESOURCES=30.0 mr_iron
RESOURCES=5.0 mr_shadow

ON=@RegPeriodic
SRC.SOUND={021f 1 0243 1 0244 1 0245 1}

[REGIONTYPE r_spooky t_rock]
// Iron and Shadow ore are very rarely mined in a spooky region.
RESOURCES=65.0 mr_nothing  // Usually there is nothing here.
RESOURCES=30.0 mr_iron
RESOURCES=5.0 mr_shadow

[REGIONTYPE r_swamp t_rock]
// There is nothing to mine in a swamp.
RESOURCES=100.0 mr_nothing

ON=@RegPeriodic
SRC.SOUND={0e 10 0f 10 022 1 023 1 024 1 0267 1}

/////////////////////
// Generic Regions //
/////////////////////

[REGIONTYPE r_default]
ON=@Enter
IF (<SRC.ISPLAYER>) && STRCMPI("<TAG.MUSIC>","<SRC.REGION.TAG.MUSIC>")
 IF !(<isempty <TAG.MUSIC>>)
  SRC.MIDILIST=<TAG.MUSIC>
 ELSE
  SRC.MIDILIST=midi_britain1,midi_ForestA,midi_JungleA,midi_MountainA,midi_Plains,midi_Victory
 ENDIF
ENDIF

//ON=@CliPeriodic
//IF (<SRC.ISPLAYER>)
// SRC.MIDILIST=midi_britain1,midi_ForestA,midi_JungleA,midi_MountainA,midi_Plains,midi_Victory
//ENDIF

[REGIONTYPE r_graveyards]
ON=@RegPeriodic
SRC.SOUND={0a 1 0b 1}

[REGIONTYPE r_forests]
ON=@RegPeriodic
IF (<SRC.SECTOR.ISNIGHTTIME>)
 SRC.SOUND={00 2 01 2 02 2 07d 1}	//Play these sounds at night.
ELSE
 SRC.SOUND={08 10 09 10 0219 1 07d 1}	//Play these sounds during the day.
ENDIF

[REGIONTYPE r_jungle]
ON=@RegPeriodic
IF (<SRC.SECTOR.ISNIGHTTIME>)
 SRC.SOUND={0c 2 0d 2 0b3 1}
ELSE
 SRC.SOUND={03 2 04 2 05 2 0b3 1}
ENDIF

[EOF]