hello, i want to know where i can download the zulie fix...cuz...mobs in my server don't drop any zulie.. i want to know how to fix that!
thankzz
hello, i want to know where i can download the zulie fix...cuz...mobs in my server don't drop any zulie.. i want to know how to fix that!
thankzz
It would help to know what server you are using.
i'm using EVo client BTW
does that mean osrose rev 80?
Like i said, without knowing the server we can't tell you what to fix.
Get some sources on the Sources Section!
Read More to Know about this Forum-.-'
i've this problem, too.
i had downloaded the last server files (osrose Rev80) + all compiling server files.
But it doesnt work -.-
post the following function and let me have a look at it.
Serverfunctions.cpp/ GetDrop()
Just paste the whole thing into a code box here in the forums.
I guarantee that is where your problem is.
I scrapped this entire function in my evo server well over a year ago and replaced it with a custom drops system which is now used in osirose, osprose and has already been included in the long awaited osrose rev 81.
I have a step by step instruction set posted somewhere for switching it over. I can either dig out a link to it or show you how to fix your existing code. It is rather complex though, not really for beginners (don't know if you are one or not)
ah. rev81 will released?Code:CDrop* CWorldServer::GetDrop( CMonster* thismon ) { CDrop* newdrop = new (nothrow) CDrop; if(newdrop==NULL) { Log(MSG_WARNING, "Error allocing memory [getdrop]" ); return NULL; } newdrop->clientid = GetNewClientID( ); newdrop->posMap = thismon->Position->Map; newdrop->pos = RandInCircle( thismon->Position->current, 3 ); newdrop->droptime = time(NULL); newdrop->owner = thismon->MonsterDrop->firsthit; newdrop->thisparty = thismon->thisparty; ClearItem(newdrop->item); int randv = RandNumber( 1, 100); if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel) randv = 100; if(randv<=30)//30% zuly [zulies will count as mapdrop] { if(thismon->MonsterDrop->mapdrop->level_max>=thismon->MonsterDrop->firstlevel) { newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE + RandNumber( 1, 10 ); return newdrop; } delete newdrop; return NULL; } CMDrops* thisdrops; newdrop->type = 2; //drop item drop switch( Config.DROP_TYPE ) { case 0://only map thisdrops = thismon->MonsterDrop->mobdrop; if(thisdrops->level_max<thismon->MonsterDrop->firstlevel) { delete newdrop; return NULL; } break; case 1://mob only thisdrops = thismon->MonsterDrop->mapdrop; if(thismon->thisnpc->level-thismon->MonsterDrop->firstlevel<-14) { delete newdrop; return NULL; } break; default://both randv = RandNumber(1,100); if(thismon->MonsterDrop->mapdrop!=NULL) if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel) randv = 100; if(randv>60)//select wich drop will use (map or mob) //40 - 60% { thisdrops = thismon->MonsterDrop->mobdrop; if((int)(thismon->thisnpc->level-thismon->MonsterDrop->firstlevel) < -14) { delete newdrop; return NULL; } } else { thisdrops = thismon->MonsterDrop->mapdrop; if(thisdrops->level_max<thismon->MonsterDrop->firstlevel) { delete newdrop; return NULL; } } break; } if(thisdrops==NULL) { thisdrops = thismon->MonsterDrop->mobdrop; if(thisdrops==NULL) { thisdrops = thismon->MonsterDrop->mapdrop; if(thisdrops==NULL) { newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE - RandNumber( 1, 20 ); return newdrop; } } } randv = 0; randv = RandNumber( 1, thisdrops->probmax ); DWORD prob = 1; for(UINT i=0;i<thisdrops->Drops.size();i++) { CDropInfo* dropinfo = thisdrops->Drops.at( i ); prob += dropinfo->prob; if(randv<=prob) { newdrop->item.itemtype = dropinfo->type; newdrop->item.itemnum = dropinfo->item; break; } } if(newdrop->item.itemtype==0) { Log(MSG_WARNING, "Drop Probability Highter: %i", randv ); delete newdrop; return NULL; } if(newdrop->item.itemtype>1 && newdrop->item.itemtype<10 && newdrop->item.itemtype!=JEWEL) { // Refine randv = RandNumber( 1, 100 ); if( randv < 10 ) //10% newdrop->item.refine = 48; else if( randv < 25 ) //15% newdrop->item.refine = 32; else if( randv < 50 ) // 25% newdrop->item.refine = 16; else //50% newdrop->item.refine = 0; newdrop->item.lifespan = RandNumber( 30, 100 ); newdrop->item.durability = RandNumber( 35, 70 ); if( newdrop->item.itemtype==WEAPON || newdrop->item.itemtype==SUBWEAPON ) { //socketed randv = RandNumber( 1, 100 ); if( randv < 30 ) newdrop->item.socketed = true; // 30% else newdrop->item.socketed = false; // 70% } else { newdrop->item.socketed = false; } randv = RandNumber( 1, 100 ); if( randv < 30 ) // 30% newdrop->item.stats = rand()%300; newdrop->item.appraised = newdrop->item.stats==0?true:false; } else { newdrop->item.lifespan = 100; newdrop->item.durability = 40; newdrop->item.socketed = false; newdrop->item.stats = 0; } newdrop->item.count = 1; if( newdrop->item.itemtype == 10 || newdrop->item.itemtype == 12 ) { newdrop->item.count = RandNumber( 1, 3 ); } newdrop->item.gem = 0; return newdrop; }
See this line of code?
Delete it (or comment it out if you are worried about being so drastic)Code:if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel) randv = 100;
This code sets randv to 100.... every single time.
The condition is NEVER false which means that randv can NEVER be less than 30, which it needs to be in order to get a zuly drop.
Dump this un-necessary line and your zuly will once again drop 30% of the time.
I have no idea who originally coded this but my guess is that they were high on something.
further down the function you will also see this
This lovely bit of code converts NULL drops into zuly as well.Code:if(thisdrops==NULL) { thisdrops = thismon->MonsterDrop->mobdrop; if(thisdrops==NULL) { thisdrops = thismon->MonsterDrop->mapdrop; if(thisdrops==NULL) { newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE - RandNumber( 1, 20 ); return newdrop; } } }
This is why you will sometimes see people posting their drops CSV as a zuly drop fix.
It is a completely bogus fix though.
All they are doing is deliberately introducing bad item ids into the drops table so as to force NULL drops to be returned.
Stupid idea IMO. The problem should just be fixed, not patched up like this.:bad:
Another reason that I scrapped the entire function.
here's hoping this doesn't sound like a stupid question...
do I comment out the whole line, or just the "randv=100"?
I commented out the whole line, rebuilt the executable, and the server runs fine but still does not drop zuly boxes...
Comment out the entire line.
If you just comment out "randv=100; then the next line of code will become the one that is only enacted if the condition is true.
Since the next line of code is another conditional, The entire drops loop will become conditional to the line
if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel)
and as such it will never run.
What you really need to do is get rid of any reference to thismon->MonsterDrop->firstlevel.
It always screws stuff up and is completely unnecessary.
after commenting out the whole line the mobs still only drop gear...I hadn't noticed before, but after decimating several hundred mobs, just to be sure I wasn't being impatient, I noticed that not only are they not dropping zuly boxes...but they aren't dropping etc.'s either...
maybe commenting out that line worked like it was supposed to but I'm not seeing the zuly boxes because something else is borking up my drops somewhere else...
I'll have to see if 'search' still hates me and try to find additional information in the forums...
I'm a little leary about removing all references to "thismon->MonsterDrop->firstlevel" as I'm not sure what exactly it does and what to do if I break it even further (aside from restoring the file from an incremental backup)... would I just be removing it from any line it's in (leaving the rest of the line intact), or would I be commenting out the whole line that I find it in...just this file, or any file I find it in...etc etc etc
I'm using this whole project as a learning experience as I'm fairly new to programming in general (which I'm sure is painfuly obvious) but work has been driving me nuts the past couple of weeks and I haven't had a chance to sit down and read through some of the code to figure out what does what...![]()
thanks for your help so far purple...I keep forgetting to say that :P
sorry...double posted by accident
Last edited by brokenshadows; 05-12-08 at 03:12 PM. Reason: *sigh*
It only comes up twice in the whole server as close as I can remember, and they are both in this very function.
Do a search in your server to find all instances of 'firstlevel'
I'm betting you don't find many.
Probably 2 in function getdrop() and maybe one somewhere in Startup.cpp where the drops are being loaded.
What you are seeing with your drops not including mats (etcs) is completely down to what is in your drops list since there is no code that differentiates between the mats and gear. If you can get one then you can get the other.
The way your code should be laid out is for randv to generate a number between 0 and 100 then if that number is less than 30 (30%) it should go immediately into the zuly drop code
Currently though it does this even after the decision has already been made to drop zulyCode:newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE - RandNumber( 1, 20 ); return newdrop;
Basically what this is doing is testing if thismon->MonsterDrop->mapdrop->level_max is greater than or equal to thismon->MonsterDrop->firstlevelCode:if(thismon->MonsterDrop->mapdrop->level_max>=thismon->MonsterDrop->firstlevel) { newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE + RandNumber( 1, 10 ); return newdrop; } delete newdrop; return NULL;
I have still never figured out why this is even here. It serves absolutely no purpose and throughout extensive testing, the conditional ALWAYS returns false so the zuly never gets dropped.
Instead, it moves straight on to the code after the conditional code.
delete newdrop
return NULL
this whole section
should be re-written as thisCode:int randv = RandNumber( 1, 100); if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel) randv = 100; if(randv<=30)//30% zuly [zulies will count as mapdrop] { if(thismon->MonsterDrop->mapdrop->level_max>=thismon->MonsterDrop->firstlevel) { newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE + RandNumber( 1, 10 ); return newdrop; } delete newdrop; return NULL; }
just comment out the useless stuff for now. Makes it really easy to roll it back if you aren't happy with the outcome.Code:int randv = RandNumber( 1, 100); //if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel) randv = 100; if(randv<=30)//30% zuly drop and NO they WON'T be counted as a map drop { //if(thismon->MonsterDrop->mapdrop->level_max>=thismon->MonsterDrop->firstlevel) //{ newdrop->type = 1; //Drop Zuly newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE + RandNumber( 1, 10 ); return newdrop; //} //delete newdrop; //return NULL; }
Thank you very much for both the code and the explanation...it works now and I understand a little more :D