-->

Tutorial membuat RF Private Server (Part 11)

RF Online: Item Upgrading :
Structure
Code:
[Filemask = "ItemUpgrade.dat", tableview = 1]
/ / / Author structures EnRiver
/ / / Hyde with the disassembly of the structure can be found at EmuDev.ru
struct ItemUpgradeFile
{
u32 nBlocks;
u32 nColumns;
u32 nSize;
child ItemUpgradeBlock [count = nBlocks];
}
struct ItemUpgradeBlock [preload = 1]
{
u32 nCount;
cstr [len = 1964] ItemCode;
cstr [len = 1964] ItemName;
u32 [tag = "number of T1-5 Stone"] DWORD;
float [tag = "Increase chance to sharpen"] DWORD;
u32 [tag = "Torso"] DWORD;
u32 [tag = "Legs"] DWORD;
u32 [tag = "Hands"] DWORD;
u32 [tag = "Feet"] DWORD;
u32 [tag = "head"] DWORD;
u32 [tag = "Shield"] DWORD;
u32 [tag = "BB Guns"] DWORD;
u32 [tag = "Weapons DB"] DWORD;
u32 [tag = "Unknown", hidden = 1] DWORD;
u32 [tag = "Antigrav"] DWORD;
u32 [tag = "Number portioning precipitations"] DWORD;
u32 [tag = "type of the value effect"] DWORD;
float [tag = "The effect of sharpening +1"] DWORD;
float [tag = "The effect of sharpening +2"] DWORD;
float [tag = "The effect of sharpening +3"] DWORD;
float [tag = "The effect of sharpening +4"] DWORD;
float [tag = "The effect of sharpening +5"] DWORD;
float [tag = "The effect of sharpening +6"] DWORD;
float [tag = "The effect of sharpening +7"] DWORD;
}
Room T1-5 stone - Talika - 0. A modification of the stones a little differently:
Chance to sharpen - Grab your calculator and think
Basic chances sharpening
Code:
100% = 10000
/ / / Successful Sharpening
White {1000, 750, 500, 250, 100, 50, 0},
Mounting {1000, 750, 500, 250, 100, 50, 0},
Violet {1000, 750, 500, 250, 100, 50, 0},
Sprint {1000, 750, 500, 250, 100, 50, 0},
Blue Relic {328, 246, 164, 82, 49, 16, 0};
Antigrav {640, 480, 320, 160, 96, 32, 0};
Blue Relic {512, 384, 256, 128, 77, 26, 0};
Green Relic {410, 307, 205, 102, 61, 20, 0};
Leon {800, 600, 400, 200, 120, 40, 0},
PvP weapons {262, 197, 131, 66, 39, 13, 0}
/ / / Object Destroyed
White {0, 0, 0, 0, 1600, 3200, 6400}
Mounting {0, 0, 1200, 1600, 3000, 6800}
Violet {0, 0, 0, 1000, 2250, 3500, 5750}
Strint {0, 750, 1125, 1500, 2375, 3250, 4625}
Blue Relic {2400, 3940, 6170, 6790, 7470, 8220, 9040}
Antigrav {7000, 7700, 8470, 9320, 10000, 10000, 10000}
Blue Relic {4900, 6160, 7620, 8390, 9220, 10000, 10000}
Green Relic {3420, 4930, 6860, 7550, 8300, 9130, 10000}
Leon {10000, 10000, 10000, 10000, 10000, 10000, 10000}
PvP weapons {1680, 3150, 5560, 6110, 6720, 7400, 8140}
/ / / Talika Destroyed
White {0, 0, 0, 0, 2000, 4000, 8000}
Mounting {0, 0, 2400, 3200, 6000, 8800, 9500}
Violet {0, 0, 0, 2000, 4500, 7000, 9500}
Strint {0, 3000, 4500, 6000, 9500, 9500, 9500}
Blue Relic {0, 7300, 9500, 9500, 9500, 9500, 9500}
Antigrav {0, 4300, 6400, 8600, 9500, 9500, 9500}
Blue Relic {0, 5100, 7600, 9500, 9500, 9500, 9500}
Green Relic {0, 6100, 9100, 9500, 9500, 9500, 9500}
Leon {0, 3600, 5400, 7200, 9500, 9500, 9500}
PvP weapons {0, 8700, 9500, 9500, 9500, 9500, 9500}
We need a "successful sharpening. Take for example Strint weapons and the chance to sharpen +5 (100).
1). Multiply the base chance for the amount of stones or 0.125 instead of the chance of stone if the stone is missing. (In this case multiplied by the amount of stones T2). (Drop a stone r2 = 0.5, 4 Stones = 2) (If no stone is 0.125 * 4 = 0.5)
100 * 2 = 200
2). Multiply the resulting number by 100 and divide by 4.
200 * 100 / 4 = 5000
3). Multiply by the ratio of 30 to the level of the subject. Take for example the level in 1945:
30/45 = 0.666667 (30/30 = 1 30/60 = 0.5 is the chance to hone the subject at level 30 in 2 times more than the 60 th.).
5000 * 0.666667 = 3333
All, the chance to sharpen 5 45 strinta with stones r2 = 33.33%.
If the value of our (3333) more random 4-digit number, the successful sharpening if less, then calculate the chance of gathering taliks and the burning of weapons under the table a chance.
With this easy. The number of tables at once compared with a 4 digit random number.
First, check for the destruction of the subject. If the subject is survived by gathering taliks.
0 in the table means the chance that the subject never sharpen stones.
any chances that after calculating the 4 values exceed the number will be 100% sharpening.
0 in the table of combustion or gathering means that portioning precipitations never fly down and things will never burn out (safe sharpening) 10000 mean one hundred things burn or portioning precipitations fly off with a 100% chance. (As Leon)
If a thing is whole and portioning precipitations are not flocking, then you just burn the stones and talik a thing does not hurt.
* - Multiplication
/ - Division
Torso, legs, hands, feet, head, Shield, Weapon BB Guns DB, Antigrav - Number of possible modifications:
0 - can not be modified.
1 - can be modified by +1.
7 - can be modified on 7 and so on
Type Values Effect - Everything is simple, 1 is the effect of a percentage, 2 this effect in simple terms.
The effect of sharpening +1-7 - I think that's obvious. The effect of sharpening from +1 to +7 for talik.
Hyde on the effects of grinding on the client (Item.edf) - Not yet written.
100% simulator sharpening RFO. From a closed posted.
Designed by me, based on the code server 2.2.3
Code:
/ / RFOUpgradeGen.cpp: Defines the entry point for the console application.
/ / By TriRozhka
# Include "stdafx.h"
# Include "iostream"
# Include "conio.h"
# Include "time.h"
using namespace std;
void main ()
{
setlocale (LC_ALL, ".1251");
int nStartValue = time (NULL);
srand (nStartValue);
int WeapType = 15;
int WeapLvl = 100;
int WeapUpgLv = 7;
int JewelType [3];
int a;
float fRate = 0.0f;
int Num = 0;
int Chanse [10], [7] =
{
{1000, 750, 500, 250, 100, 50, 0},
{1000, 750, 500, 250, 100, 50, 0},
{1000, 750, 500, 250, 100, 50, 0},
{1000, 750, 500, 250, 100, 50, 0},
{328, 246, 164, 82, 49, 16, 0};
{640, 480, 320, 160, 96, 32, 0};
{512, 384, 256, 128, 77, 26, 0};
{410, 307, 205, 102, 61, 20, 0};
{800, 600, 400, 200, 120, 40, 0},
{262, 197, 131, 66, 39, 13, 0}
};
float JewelValue [6] [2] = {{0, 0.125}, {1, 0.25}, {2, 0.5}, {3, 1}, {4, 1.5}, {5, 2}};
std:: cout <<"Enter the number of repetitions of operations with the same parameters from 1 to 100 \ n";
while (Num> 100 | | Num <1 br="br"> {
std:: cin>> Num;
}
std:: cout <<"Specify the type of weapon or armor according to the list: \ n 0: White \ n 1: Mounting \ n 2: Violet \ n 3: Strint \ n 4: Blue relic \ n 5: Antigrav \ n 6: Blue relic \ n 7: Green relic \ n 8: Leon \ n 9: PVP weapons \ n ";
while (WeapType> 9)
{
std:: cin>> WeapType;
}
std:: cout <<"Set the level of weapons or armor from 1 to 65 \ n";
while (WeapLvl <1 weaplvl="weaplvl"> 65)
{
std:: cin>> WeapLvl;
}
std:: cout <<"Enter the number of installed talik from 0 to 6 \ n";
while (WeapUpgLv> 6)
{
std:: cin>> WeapUpgLv;
}
for (int i = 1; i <5 br="br" i="i"> {
int JewelKind = 6;
while (JewelKind> 5)
{
a = i - 1;
std:: cout <<"Sample type" < std:: cin>> JewelKind;
}
fRate + = JewelValue [JewelKind] [1];
}
int count = 0;
while (count! = Num)
{
int dwR1 =:: rand ();
int dwRand = (dwR1 <<16 br="br" rand="rand"> int TotalRate = (Chanse [WeapType] [WeapUpgLv] * fRate * 3000) / (4 * WeapLvl);
if (TotalRate <= dwRand% 100000)
{
int Miss [10], [7] =
{
{0, 0, 0, 0, 1600, 3200, 6400}
{0, 0, 1200, 1600, 3000, 6800}
{0, 0, 0, 1000, 2250, 3500, 5750}
{0, 750, 1125, 1500, 2375, 3250, 4625}
{2400, 3940, 6170, 6790, 7470, 8220, 9040}
{7000, 7700, 8470, 9320, 10000, 10000, 10000}
{4900, 6160, 7620, 8390, 9220, 10000, 10000}
{3420, 4930, 6860, 7550, 8300, 9130, 10000}
{10000, 10000, 10000, 10000, 10000, 10000, 10000}
{1680, 3150, 5560, 6110, 6720, 7400, 8140}
};
int Lost [10], [7] =
{
{0, 0, 0, 0, 2000, 4000, 8000}
{0, 0, 2400, 3200, 6000, 8800, 9500}
{0, 0, 0, 2000, 4500, 7000, 9500}
{0, 3000, 4500, 6000, 9500, 9500, 9500}
{0, 7300, 9500, 9500, 9500, 9500, 9500}
{0, 4300, 6400, 8600, 9500, 9500, 9500}
{0, 5100, 7600, 9500, 9500, 9500, 9500}
{0, 6100, 9100, 9500, 9500, 9500, 9500}
{0, 3600, 5400, 7200, 9500, 9500, 9500}
{0, 8700, 9500, 9500, 9500, 9500, 9500}
};
if (Miss [WeapType] [WeapUpgLv]>:: rand ()% 10000)
{
std:: cout <<"Object destroyed \ n";
count + = 1;
}
else if (Lost [WeapType] [WeapUpgLv]>:: rand ()% 10000)
{
std:: cout <<"Taliko destroyed \ n";
count + = 1;
}
else
{
std:: cout <<"Modification unsuccessful \ n";
count + = 1;
}
}
else
{
std:: cout <<"The modification is successful \ n";
count + = 1;
}
}
std:: cout <<"\ n The calculation is completed. \ n To exit, press any key";
_getch ();
}
Briefly explain:
% Fractional part, after dividing by the number of
< rand - pseudo-random number.
Formula To those who does not understand:
There is a table of odds for each Gereida things from 0 to 11 grade is a type of white INTV violet type C relic .... Playing only 10 types as 11 in game is not used.
that here for each grade registered a chance to insert each portioning precipitations from 1 to 7
7 As you noticed everywhere 0 such as server sharpening his hands off.
further calculation of chance:
base chance of the type of arms and inserted portioning precipitations, multiplied by the amount of chances stones or 0.125 if no stone is multiplied by 100 and divided by 4
then it's multiplied by a ratio of 30 to the level of weapons that is 30 / 30 = 1 and 30 / 60 = 0.5, there is a chance vtochit weapons lvl 30 2 times larger than 60
And all this is compared with a 5-digit number randomly.
If the value of our more successful then grind if you are counting less chance of gathering taliks and the burning of weapons under the table Miss chance to burn and Lost in the rally if taliks betwixt and then you just burn the stones and talik a thing does not hurt.

Nico Kambing
Nothing to display

Related Posts

Post a Comment

Subscribe Our Newsletter