Great wow :-D
Okay this is a gift from me, very simple script for creating 1 new base (rev.221+). I writed it more, more easier for Your team(to make it easier at the beginning).
At firs create a map for base (base.fomap).
At Second open "locations.cfg" and paste that on end:
[Area 801]
name = base
size = 6
map_0 = base 801
visible = 0
auto_garbage = 0
At Third open "_maps.fos" and paste that:
#define LOCATION_base (801)
At fourth open "main.fos" and find function "bool critter_use_item", on end paste before "// Take process to engine":
if (pid==PID_SHOVEL)
{
Map@ map=cr.GetMap();
uint mapPid = map.GetProtoId();
if(valid(map) && ((mapPid>=190 && mapPid<=392)))
{
Critter@[] group={cr};
GameVar @ vc_recon_cave_id = GetLocalVar(LVAR_vc_recon_cave_id, cr.Id);
Critter @ Leader = cr.GetFollowLeader();
if(!valid(Leader)) @Leader = cr;
Leader.GetFollowGroup(FIND_ONLY_PLAYERS|FIND_LIFE,group);
if (vc_recon_cave_id.GetValue()!=0)
{
DeleteLocation (vc_recon_cave_id.GetValue());
vc_recon_cave_id=0;
}
uint locId = CreateLocation(LOCATION_base, cr.WorldX, cr.WorldY, group);
if(locId==0) return false;
Location@ loc = GetLocation(locId);
vc_recon_cave_id=locId;
Leader.SetKnownLoc(true,locId);
Leader.Say(SAY_NETMSG,"Go on WM to can see your base");
//cr.DeleteItem(pid,1);
}
else
{
cr.Say(SAY_NETMSG,"This is wrong place for base");
}
}
In "main.fos" find function"void map_critter_in(Map& map, Critter& cr)" and paste inside that:
if(cr.IsPlayer())
{
Map@ map=cr.GetMap();
uint mapPid = map.GetProtoId();
if(valid(map) && ((mapPid>=801 && mapPid<=810)))
{
uint locId = map.GetLocation().Id;
cr.SetKnownLoc(true,locId);//new player can see da base :P
}
}
In "main.fos" find function" "void critter_dead(Critter& cr, Critter@ killer)"" and paste inside that:
if(cr.IsPlayer())
{
Map@ map=cr.GetMap();
uint mapPid = map.GetProtoId();
if(valid(map) && ((mapPid>=901 && mapPid<=910)))
{
uint locId = map.GetLocation().Id;
cr.UnsetKnownLoc(true,locId);
cr.Say(SAY_NETMSG,"You forget way to base");
}
}
That is all, use shovel to create base. If you bring someone into the da base then it will be seen. If you kill someone inside than not.
One player can have only one base.
Good luck in scripting, before starting server with new scripts and map use clean.bat, and delete all saves.
http://forum.newfmc.pl/index.php?board=11.0 -use google translate.
if you do not know it learn the basics of programming in C or C + +, or Python.
X-D Sorry for my not grammar english