April 18, 2024, 08:43:54 pm
Username:

Password:

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Engardo

Pages: [1]
1
The Workshop / Fonline Severmodification for 2nd Session.
« on: December 15, 2018, 07:31:41 pm »
This modification is an adaptation of 2nd Session for LAN-Party, single player or servers that are rarely online. Only a few new content will be added.
In short, the grinding and the repetition timer are reduced.
All script changes have been marked with @Engardo so you can quickly make adjustments.

Reloaded 2nd Session Source: https://forum.fonline-reloaded.net/index.php?topic=9569.0
Servermod: https://workupload.com/file/N94kGPSq
Unpack ServerMod into the server folder and overwrite the files. The scripts will be compiled automatically at server start.

Changelog v0.2

Bugfix
 - Improved uint overflow protection.

Enconomy+Leveling
 - Mrs. Stapleton[Hub] now sells Hintbook between level 2 and 500 via SAY command. [5exp = 1$] If you don't have enough money, she'll tell you how much you need.

Changelog v0.1

Crafting
 - Frag Mine can now be crafted. [8xAdvanced Gunpowder, 1xParts of a detonator, 1xMetal Parts, Professions->Demolition Expert:2]
 - Motion Sensor can now be crafted. [5xElectronic Parts, 2xHigh Quality Alloys, 1xExtended Capacitor Battery]
 - Combat Armor Mark II can now be crafted. [5xHigh Quality Alloys, 1xMetal Parts, 1xFibers, 3xHigh Quality Fibers, Professions->Armorer:2]
 - Combat Helmet Mark II  can now be crafted. [2xHigh Quality Alloys, 1xMetal Parts, 1xHigh Quality Fibers, Professions->Armorer:2]
 - 10mm AP recipe changed. [1xMetal Parts, 3xAdvanced Gunpowder]


Hinkley
 - Super stimpak start quantity increased from 3 to 15.


Special Encounter
 - Encounter rate increased. (1'000%) //The remaining conditions remain the same. Still rare ;)


Caravan
 - Level requirement removed. //You can start Caravan directly after creating a character.
 - Caps reward increased. (500%) //Could be a serious source of income.


Reroll
 - You don't need caps anymore ~deleteself is always a reroll now. //You still have to be in a tent/base where you have access with a character to loot the stuff.
 - You get all your implants and skill books back.


Economy
 - Merchant refresh their inventory every 12-15 minutes.
 - Merchant Caps refresh restriction increased from 5'000$ to 1'000'000$.
 - Jules[New Reno] now sells Empty Hypo(10$) and Empty Jet Canister (20$) via Say command.
 - Joey[Den] now sells Jet,Buffout,Psycho(750$) and Super Stimpak(375$) via Say command.
 - McGrew[Redding] now sells Parts of a detonator(2500$) via Say command.
 - Dr. Fung[San Francisco] now sells Implants. //Was not available in the released 2nd source yet.


Quest
 - Mutie Quest -> Removed T4 exploit and cooldown time reduced from 6h to 1min.
 - Poo shovel  -> Now you get 125 exp up to level 9 afterwards 0.
 - Box lift    -> Reward increased from 250$ to 3000$.


Magic Locker
 - Respawn time increased from 10-30min to 2-3min //Life's too short.


City Locker
 - Spawn additional High Quality Fibers in the same frequency as Parts of a detonator.


Next update comes in january.
Have fun.

2
The Workshop / Snippet to get implants back while reroll
« on: May 21, 2018, 07:05:38 pm »
implement in main.fos

Code: [Select]
if(_CritCountItem(cr, PID_BOTTLE_CAPS)>=10000 && cr.Stat[ST_LEVEL]>1)
{
Map@ map = cr.GetMap();
Item@ hintbook = map.AddItem(cr.HexX, cr.HexY, PID_BOOK_OF_ACHIEVEMENT, 1);

hintbook.Val0 = cr.Stat[ST_LEVEL]-1;
hintbook.Val2 = cr.Stat[ST_LEVEL];

//Script expanded to get implants back while reroll @Engardo_SE_003

//SPECIAL
if(cr.Param[PE_IMP_STRENGTH] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_STRENGTH, 1);
}
if(cr.Param[PE_IMP_PERCEPTION] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_PERCEPTION, 1);
}
if(cr.Param[PE_IMP_ENDURANCE] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_ENDURANCE, 1);
}
if(cr.Param[PE_IMP_CHARISMA] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_CHARISMA, 1);
}
if(cr.Param[PE_IMP_INTELLIGENCE] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_INTELLIGENCE, 1);
}
if(cr.Param[PE_IMP_AGILITY] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_AGILITY, 1);
}
if(cr.Param[PE_IMP_LUCK] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_LUCK, 1);
}
//DERMAL
if(cr.Param[PE_DERMAL_IMPACT] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_DERMAL, 1);
}
if(cr.Param[PE_DERMAL_IMPACT_ENH] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_DERMAL, 1);
}
//PHOENIX
if(cr.Param[PE_PHOENIX_IMPLANTS] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_PHOENIX, 1);
}
if(cr.Param[PE_PHOENIX_IMPLANTS_ENH] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_PHOENIX, 1);
}
//NEMEAN
if(cr.Param[PE_NEMEAN_ARMOR] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_NEMEAN, cr.Param[PE_NEMEAN_ARMOR]);
}

}

Edit: Version 2 has been extended with Skillbook recover. Tested and executable.

Code: [Select]
if(_CritCountItem(cr, PID_BOTTLE_CAPS)>=10000 && cr.Stat[ST_LEVEL]>1)
{
Map@ map = cr.GetMap();
Item@ hintbook = map.AddItem(cr.HexX, cr.HexY, PID_BOOK_OF_ACHIEVEMENT, 1);

hintbook.Val0 = cr.Stat[ST_LEVEL]-1;
hintbook.Val2 = cr.Stat[ST_LEVEL];

//Script expanded to get implants back while reroll @Engardo_SE_003

//SPECIAL
if(cr.Param[PE_IMP_STRENGTH] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_STRENGTH, 1);
}
if(cr.Param[PE_IMP_PERCEPTION] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_PERCEPTION, 1);
}
if(cr.Param[PE_IMP_ENDURANCE] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_ENDURANCE, 1);
}
if(cr.Param[PE_IMP_CHARISMA] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_CHARISMA, 1);
}
if(cr.Param[PE_IMP_INTELLIGENCE] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_INTELLIGENCE, 1);
}
if(cr.Param[PE_IMP_AGILITY] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_AGILITY, 1);
}
if(cr.Param[PE_IMP_LUCK] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_LUCK, 1);
}
//DERMAL
if(cr.Param[PE_DERMAL_IMPACT] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_DERMAL, 1);
}
if(cr.Param[PE_DERMAL_IMPACT_ENH] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_DERMAL, 1);
}
//PHOENIX
if(cr.Param[PE_PHOENIX_IMPLANTS] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_PHOENIX, 1);
}
if(cr.Param[PE_PHOENIX_IMPLANTS_ENH] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_PHOENIX, 1);
}
//NEMEAN
if(cr.Param[PE_NEMEAN_ARMOR] > 0)
{
map.AddItem(cr.HexX, cr.HexY, PID_IMPLANT_NEMEAN, cr.Param[PE_NEMEAN_ARMOR]);
}

//Script expanded to get skillbooks back while reroll @Engardo_SE_003_1
//Note for Test-Client : Values ​​are set to zero after restoring a deleted client, unlike implants because it is not stored in Server/save/clients/*.client.

if(GetLocalVar(LVAR_Book_Science, cr.Id).GetValue() > 0 )
{
map.AddItem(cr.HexX, cr.HexY, PID_BIG_BOOK_OF_SCIENCE, GetLocalVar(LVAR_Book_Science, cr.Id).GetValue());
}
if(GetLocalVar(LVAR_Book_Repair, cr.Id).GetValue() > 0 )
{
map.AddItem(cr.HexX, cr.HexY, PID_DEANS_ELECTRONICS, GetLocalVar(LVAR_Book_Repair, cr.Id).GetValue());
}
if(GetLocalVar(LVAR_Book_Outdoorsman, cr.Id).GetValue() > 0 )
{
map.AddItem(cr.HexX, cr.HexY, PID_SCOUT_HANDBOOK, GetLocalVar(LVAR_Book_Outdoorsman, cr.Id).GetValue());
}
if(GetLocalVar(LVAR_Book_Barter, cr.Id).GetValue() > 0 )
{
map.AddItem(cr.HexX, cr.HexY, PID_BARTER_BOOK, GetLocalVar(LVAR_Book_Barter, cr.Id).GetValue());
}
if(GetLocalVar(LVAR_Book_FirstAid, cr.Id).GetValue() > 0 )
{
map.AddItem(cr.HexX, cr.HexY, PID_FIRST_AID_BOOK, GetLocalVar(LVAR_Book_FirstAid, cr.Id).GetValue());
}
if(GetLocalVar(LVAR_Book_SmallGuns, cr.Id).GetValue() > 0 )
{
map.AddItem(cr.HexX, cr.HexY, PID_GUNS_AND_BULLETS, GetLocalVar(LVAR_Book_SmallGuns, cr.Id).GetValue());
}
}

Edit: Version 3 Code length reduced and simplified to add new objects
Code: [Select]
if(_CritCountItem(cr, PID_BOTTLE_CAPS)>=10000 && cr.Stat[ST_LEVEL]>1)
{
Map@ map = cr.GetMap();
Item@ hintbook = map.AddItem(cr.HexX, cr.HexY, PID_BOOK_OF_ACHIEVEMENT, 1);

hintbook.Val0 = cr.Stat[ST_LEVEL]-1;
hintbook.Val2 = cr.Stat[ST_LEVEL];

//Script expanded to get implants back while reroll @Engardo_SE_003

array<int> implantParam = {PE_IMP_STRENGTH,PE_IMP_PERCEPTION,PE_IMP_ENDURANCE,PE_IMP_CHARISMA,PE_IMP_INTELLIGENCE,PE_IMP_AGILITY,PE_IMP_LUCK,PE_DERMAL_IMPACT,PE_DERMAL_IMPACT_ENH,PE_PHOENIX_IMPLANTS,PE_PHOENIX_IMPLANTS_ENH,PE_NEMEAN_ARMOR};
array<int> implantPID ={PID_IMPLANT_STRENGTH,PID_IMPLANT_PERCEPTION,PID_IMPLANT_ENDURANCE,PID_IMPLANT_CHARISMA,PID_IMPLANT_INTELLIGENCE,PID_IMPLANT_AGILITY,PID_IMPLANT_LUCK,PID_IMPLANT_DERMAL,PID_IMPLANT_DERMAL,PID_IMPLANT_PHOENIX,PID_IMPLANT_PHOENIX,PID_IMPLANT_NEMEAN};
for(uint i=0;i<implantParam.length();i++)
{
if(cr.Param[implantParam[i]] > 0)
{
map.AddItem(cr.HexX, cr.HexY, implantPID[i], cr.Param[implantParam[i]]);
}
}

//Script expanded to get skillbooks back while reroll @Engardo_SE_003_1

array<int> bookread = {GetLocalVar(LVAR_Book_Science, cr.Id).GetValue(),GetLocalVar(LVAR_Book_Repair, cr.Id).GetValue(),GetLocalVar(LVAR_Book_FirstAid, cr.Id).GetValue(),GetLocalVar(LVAR_Book_Outdoorsman, cr.Id).GetValue(),GetLocalVar(LVAR_Book_Barter, cr.Id).GetValue(),GetLocalVar(LVAR_Book_SmallGuns, cr.Id).GetValue()};
array<int> bookPID= {PID_BIG_BOOK_OF_SCIENCE,PID_DEANS_ELECTRONICS,PID_FIRST_AID_BOOK,PID_SCOUT_HANDBOOK,PID_BARTER_BOOK,PID_GUNS_AND_BULLETS};
for(uint i=0;i<bookread.length();i++)
{
if(bookread[i] > 0)
{
map.AddItem(cr.HexX, cr.HexY, bookPID[i], bookread[i]);
}
}

}

Pages: [1]