where can i find zulie fix?

Results 1 to 15 of 15
  1. #1
    Enthusiast mechel is offline
    MemberRank
    Nov 2006 Join Date
    38Posts

    where can i find zulie fix?

    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


  2. #2
    Last of the OsRose Devs Purpleyouko is offline
    MemberRank
    Oct 2006 Join Date
    Missouri USALocation
    2,161Posts

    Re: where can i find zulie fix?

    It would help to know what server you are using.

  3. #3
    Enthusiast mechel is offline
    MemberRank
    Nov 2006 Join Date
    38Posts

    Re: where can i find zulie fix?

    i'm using EVo client BTW

  4. #4
    Last of the OsRose Devs Purpleyouko is offline
    MemberRank
    Oct 2006 Join Date
    Missouri USALocation
    2,161Posts

    Re: where can i find zulie fix?

    does that mean osrose rev 80?

    Like i said, without knowing the server we can't tell you what to fix.

  5. #5
    -sama SeraphiPod is offline
    MemberRank
    May 2008 Join Date
    PhilippinesLocation
    1,880Posts

    Re: where can i find zulie fix?

    Get some sources on the Sources Section!
    Read More to Know about this Forum-.-'

  6. #6

    Re: where can i find zulie fix?

    i've this problem, too.
    i had downloaded the last server files (osrose Rev80) + all compiling server files.
    But it doesnt work -.-

  7. #7
    Last of the OsRose Devs Purpleyouko is offline
    MemberRank
    Oct 2006 Join Date
    Missouri USALocation
    2,161Posts

    Re: where can i find zulie fix?

    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)

  8. #8

    Re: where can i find zulie fix?

    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;
    }
    ah. rev81 will released?

  9. #9
    Last of the OsRose Devs Purpleyouko is offline
    MemberRank
    Oct 2006 Join Date
    Missouri USALocation
    2,161Posts

    Re: where can i find zulie fix?

    See this line of code?
    Code:
    if(thismon->MonsterDrop->mapdrop->level_max<thismon->MonsterDrop->firstlevel) randv = 100;
    Delete it (or comment it out if you are worried about being so drastic)
    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
    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 lovely bit of code converts NULL drops into zuly as well.
    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.

  10. #10
    Apprentice brokenshadows is offline
    MemberRank
    Nov 2006 Join Date
    6Posts

    Re: where can i find zulie fix?

    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...

  11. #11
    Last of the OsRose Devs Purpleyouko is offline
    MemberRank
    Oct 2006 Join Date
    Missouri USALocation
    2,161Posts

    Re: where can i find zulie fix?

    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.

  12. #12
    Apprentice brokenshadows is offline
    MemberRank
    Nov 2006 Join Date
    6Posts

    Re: where can i find zulie fix?

    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...

  13. #13
    Apprentice brokenshadows is offline
    MemberRank
    Nov 2006 Join Date
    6Posts

    Re: where can i find zulie fix?

    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*

  14. #14
    Last of the OsRose Devs Purpleyouko is offline
    MemberRank
    Oct 2006 Join Date
    Missouri USALocation
    2,161Posts

    Re: where can i find zulie fix?

    Quote Originally Posted by brokenshadows View Post
    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...
    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
    Code:
                    newdrop->type = 1; //Drop Zuly
                    newdrop->amount = thismon->thisnpc->level*5*Config.ZULY_RATE - RandNumber( 1, 20 );
                    return  newdrop;
    Currently though it does this even after the decision has already been made to drop zuly
    Code:
            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;
    Basically what this is doing is testing if thismon->MonsterDrop->mapdrop->level_max is greater than or equal to thismon->MonsterDrop->firstlevel
    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
    Code:
        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;
        }
    should be re-written as this
    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;
        }
    just comment out the useless stuff for now. Makes it really easy to roll it back if you aren't happy with the outcome.

  15. #15
    Apprentice brokenshadows is offline
    MemberRank
    Nov 2006 Join Date
    6Posts

    Re: where can i find zulie fix?

    Thank you very much for both the code and the explanation...it works now and I understand a little more :D



Advertisement