Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 11:21

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



FLYFF V21 how awake works?

Discussion on FLYFF V21 how awake works? within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2018
Posts: 15
Received Thanks: 2
FLYFF V21 how awake works?

Hey,

I dont get it how this code works.

i want to change it to


My aim is:
- only positives awakes
-all awakes should get the same chance.

But after changing the code, I only get +1 awakes.
jarovart is offline  
Old 01/19/2025, 17:59   #2
 
M¿dScientist's Avatar
 
elite*gold: 0
Join Date: May 2020
Posts: 24
Received Thanks: 18
Quote:
Originally Posted by jarovart View Post
Hey,

I dont get it how this code works.
But after changing the code, I only get +1 awakes.
Code:
	const DWORD dwRandomProb = ::xRandom( MAX_RANDOMOPTION_PROB );

	short shPrevAdjValue = 0;
	for( ADJProbVec::const_iterator pos = vecAdjProb.begin(); pos != vecAdjProb.end(); ++pos )
	{
		if( dwRandomProb < pos->dwProb )
		{
			shAdjValue = bDecreaseAdjValue == true ? shPrevAdjValue : pos->shAdjValue;
		}

		if( shAdjValue != 0 )
		{
			break;
		}

		shPrevAdjValue = pos->shAdjValue;
	}
Code:
const DWORD		MAX_RANDOMOPTION_PROB		= 1000000000;
Maybe don't make the chances the same as MAX_RANDOMOPTION_PROB, and you'll pass the first iteration of the loop.
M¿dScientist is offline  
Thanks
1 User
Old 01/20/2025, 10:21   #3
 
netHoxInc's Avatar
 
elite*gold: 117
Join Date: Jan 2008
Posts: 790
Received Thanks: 992
Quote:
Originally Posted by jarovart View Post
Hey,

I dont get it how this code works.

i want to change it to


My aim is:
- only positives awakes
-all awakes should get the same chance.

But after changing the code, I only get +1 awakes.

the last 3 params in

SetAdjValueProb( 28, 1000000000 , 1000000000 , 1000000000 )

should vary. Look at the examples beforehand, just offset them a little, in EQUAL distances, and you reach an EQUAL chance for each row to appear.

It appears that the actual 'chance' is the difference between each steps.

You only get the +1 awake as all have the effective same numbers, so the code will simply output the first you have listed, if you put the +28 STR on top of your listing it would be always +28, but as said, make equal steps for an equal chance.

Disclaimer: I have never worked with this code ever before, this is from pure visual code understanding and i might be wrong, but im confident im not.


Example:

SetAdjValueProb( 22, 80000000 , 83330000 , 86660000 )
SetAdjValueProb( 25, 90000000 , 93330000 , 96660000 )
SetAdjValueProb( 28, 100000000 , 103330000 , 106660000 )
netHoxInc is offline  
Reply

Tags
flyff v21 awake


Similar Threads Similar Threads
Please Help - How to add awake system like this /awake , /awa or /awakening!
04/30/2017 - Flyff Private Server - 8 Replies
How to add awake system like this /awake , /awa or /awakening!
[Selling] Awake Service / Awake weapons
11/20/2015 - Flyff Trading - 2 Replies
deleted



All times are GMT +1. The time now is 11:23.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.