FOnline Development > Questions and Answers
Special Encounter
(1/1)
KingR:
Hi everyone!
In worldmap.fos there is a formula which I use to manage special encounters.
_CheckSpecialEncounter(LOCATION_SecretBunker, (zone.Terrain == TERRAIN_Desert && (uint(GetLvar(leader, LVAR_q_secret_vault)) <= ELAPSED_TIME) && (Random(1, 18000) == 1 && leader.Stat[ST_LEVEL] > Random(0, 23))), SetLvar(leader, LVAR_q_secret_vault, ELAPSED_TIME + REAL_HOUR(8)));
I wan't to make a special encouter unique, I imagine it is related to this formula and/or a variable, but i don't find the solution.
If I change this part of the formula: ELAPSED_TIME + REAL_HOUR(8))); I wouldn't have any results, because it looks like this part manages the time before the test ....
The solution would be a variable?
Thanks for your help guys!
KingR:
ps : When I mean make it unique is that the special encounter would only happen once per player
kompreSor:
just make var which wont end with timer
--- Code: ---_CheckSpecialEncounter(LOCATION_SecretBunker, (zone.Terrain == TERRAIN_Desert && (uint(GetLvar(leader, LVAR_my_unique_encounter_var)) == 0) && (Random(1, 18000) == 1 && leader.Stat[ST_LEVEL] > Random(0, 23))), SetLvar(leader, LVAR_my_unique_encounter_var, 1));
--- End code ---
KingR:
Thank you so much about the tip Kompressor! I will try it!
Navigation
[0] Message Index
Go to full version