I uploaded Binary and Source for you. Here it is: http://rapidshare.com/files/217242212/Binary_Source.rar
Printable View
I uploaded Binary and Source for you. Here it is: http://rapidshare.com/files/217242212/Binary_Source.rar
I did use TortoiseSVN but still i get these errors :x
Code:Linking...
FlyFFServer.obj : error LNK2019: unresolved external symbol "public: __thiscall Selector::~Selector(void)" (??1Selector@@QAE@XZ) referenced in function _main
FlyFFServer.obj : error LNK2019: unresolved external symbol "public: __thiscall Acceptor::Acceptor(char *,int,class Selector *,class AbstractPlayerFactory *)" (??0Acceptor@@QAE@PADHPAVSelector@@PAVAbstractPlayerFactory@@@Z) referenced in function _main
FlyFFServer.obj : error LNK2019: unresolved external symbol "public: __thiscall Selector::Selector(void)" (??0Selector@@QAE@XZ) referenced in function _main
PacketCreator.obj : error LNK2019: unresolved external symbol "public: void __thiscall PacketHandler::sendPacket(unsigned char *,int)" (?sendPacket@PacketHandler@@QAEXPAEH@Z) referenced in function "public: void __thiscall Player::sendPacket(unsigned char *,int)" (?sendPacket@Player@@QAEXPAEH@Z)
..\..\Binary\\LoginServer.exe : fatal error LNK1120: 4 unresolved externals
Donwload the source and binary files. Leines upload to rapidshare
I got the penya rate working from the config file, -feels proud- Here's how I did it:
Open up GameServer/drops.cpp, find;
Change it to:Code:int numb = (int)rand_gen.rand(maxPenya - minPenya) + minPenya;
if (numb > 0)
{
I do not know if this is efficent, but it works :3Code:int numb = (int)rand_gen.rand(maxPenya - minPenya) + minPenya;
if (numb > 0)
numb = numb * Server::getGlobalPenyaMultiplier();
{
I'm working on to make the mobs drop more than 1 item now.
The drop rate does affect the %chance of getting the item right?
Ex. If you got 1x drop, the item got 10% of being dropped. With 2x drop = 20%?
Hope I helpt someone, cheers :>
But the drops are bugged..
- If drops are decided to be spawned, it spawns a penya bag and the item. (Normal right?)
- But sometimes the monster doesn't drop anything.. (penya bag should ALWAYS spawn!)
- And if you put more items in the drop file, it will only drop the first one (as in not taking all items into array properly)
Thats one thing every private server lacks, if you arent above .. 15 levels or 20 level above the monster, then the monster must always drop penyabag, and an item if the chance is high enough for that..
I would love to help you guys with this, but I'm adding the attack skills to osaFlyFF...
~ Nicco
The drops are not bugged for me :o It's just that the position of the dead monster aint always correct. I'm working on the drops, currently my mobs drop more than 1 item. But need to fix some bugs :>
I'll share this when/if I fix it unless the team already fixed it before me ^^
Btw, what's new in revision 18?
I think I got a fix for the drops now :>
Penya/Drop rate works now.(I hope :o)
Mobs drop more than 1 item, and the max items dropped should work.
Change in drop.cpp:
To:Code:int numb = (int)rand_gen.rand(maxPenya - minPenya) + minPenya;
if (numb > 0)
{
For the drops, change:Code:int penyaRate = Server::getGlobalPenyaMultiplier();
int numb = (int)rand_gen.rand(maxPenya - minPenya) + minPenya;
if (numb > 0)
numb = numb * penyaRate;
{
To:Code:double chance = 0;
int dropped = 0;
for (size_t i = 0; i < items.size(); i++)
{
chance = rand_gen.rand(100);
if(chance <= items.at(i)->chance)
{
dropped++;
ItemSpawned *Item2Spawn = new ItemSpawned(items.at(1)->item, player->getId(), true);
// remove used old slot and add it in the unused slot
Item2Spawn->getItem()->setAmount(1);
Item2Spawn->setPos(mob->getPos(false),false);
Item2Spawn->setWorld(mob->getWorld());
}
if(dropped > maxItems)
break;
}
I hope it did it the right way, and it will help in the development :>Code:double chance = 0;
int dropRate = Server::getGlobalDropsMultiplier();
int dropped = 0;
for (size_t i = 0; i < items.size(); i++)
{
chance = rand_gen.rand(100);
items.at(i)->chance = items.at(i)->chance * dropRate;
if(chance <= items.at(i)->chance)
{
ItemSpawned *Item2Spawn = new ItemSpawned(items.at(i)->item, player->getId(), true);
// remove used old slot and add it in the unused slot
Item2Spawn->getItem()->setAmount(1);
Item2Spawn->setPos(mob->getPos(false),false);
Item2Spawn->setWorld(mob->getWorld());
dropped++;
}
if(dropped+1 > maxItems)
break;
}
@Dumle
Nice to see people working on it and sharing the source :P
I was so happy that the drop code worked that I forgot to think of somethings :P
The drop rate(penya and items), from what I notice receives a penalty according to level difference, that why a level 60 will hardly drop even penya from an aibatt.
Oh, your code is nice but it would be better to multiple at start up, so it wont make the calculation everytime.
this prodject looks quite intresting hmmmm
hey is it me or the gameserver keep crashing barely 5 minutes after running?
[Edit]
Okay, I wasn't really doing anything much... just let it run and before even 5 minutes, crashed! Tried alot of times and same result...
Client used is fame. Poor compilation?
{Edit]
Problems resolved. Thanks.
well what are doing when it crashes?
you must be more descriptive when you post something like that.
EDIT:
BBim something else came to mind about the drops. when there are multiple drops I notice it drops in a circle around where the mob was. so you would need to create a radius algorithm storing all those coordinated in about 10.00 radius. then you can assign them to the coordinates so it looks better and not like a stack of items.
ok so i got game server login server to work but i dled the official release and then the binary and both of there char server wont work ._. there are no errors besides this one.
This Apllication has failed to start the apllication configuration is incorrect. reinstalling the application may fix the problem.
ok so i compiled it on my laptop andit runs on there so i tried it here and it doesn't run on here either.
Laptop = Vista 32bit
Desktop = Xp 32bit
any hints?
(P.S Rhisis forums don't wanna load for me atm so ya ._. il repost this on there when i does)
thought so. any hints on why mine would fail at number 5 of the express edition ? but my vista one works >.>.
I didnt get what you mean, but it should be compiled at VC++ 2008(9 if im not wrong).
http://www.microsoft.com/express/vc/
Visual C++ 2008 Express
You don't need to add anything to this, install and compile, if it doesn't work with linking or anything, its your windows, NOT the project!
Make sure you have .NET and SERVICE PACK!
As far as I've tried with C++, it depends Extremly on wether you have .NET & Service Pack, and it also depends on what version.
I don't recommend trying to make it compile if you have a cracked windows, because sometimes you need the latest service pack and some windows doesn't allow you to just install an exe, has to go trough the windows update.
I have failed to compile C++ projects around a million times, but the only real Fix is to reinstall windows, to one that you can update windows and have everything updated. Then and only then it will compile without any modifications!
~ Nicco