• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

New Jewels for 1.03k Main (1.03.11)

Skilled Illusionist
Joined
Aug 5, 2008
Messages
377
Reaction score
33
Just as an observation, you can use the setdescription function on weapons/armor as well,
it will display the text below the defense.
So it's kind of cool considering there is no itemtooltip on this version.

Now op said you can add a new var like Fn3Var3 and stack it on the asm to add another line of text,
but I'm a total noob on asm, could someone tell me how to add the new var to the asm code?

Edit: Nevermind, it was easy xD
 
Last edited:
Newbie Spellweaver
Joined
Jun 6, 2016
Messages
33
Reaction score
4
parts are present such a fragment of the code
Code:
...
TargetItem->m_NewOption = GetRandomExcOption(btMaxExcOptions, FALSE, &btOptions);
...

Could you share the body of this function

Code:
 [B]GetRandomExcOption[/B](btMaxExcOptions, FALSE, &btOptions);
thanks in advance/

My Sevrer IGC.MuServerSuite_SXII
 
Newbie Spellweaver
Joined
Jun 6, 2016
Messages
33
Reaction score
4
In general, who is interested, I completed like this:
Code:
BYTE CustomJewel::GetRandomExcOption()
{
    srand(time(NULL));
    int nOption = 0;
    nOption = rand() % 7 + 1;
    BYTE byRes[7] = { 0,1,2,4,8,16,32 };


    if (nOption <= 0) {
        nOption = 1;
    }
    else if (nOption > 7) {

        nOption = 7;
    }


    return byRes[nOption];
}
//call
...
if (bIsFull) {

            lpObj->pInventory[TargetPos].m_NewOption = 0x3F;
            MsgOutput(lpObj->m_Index, "Use Jewel of Kondar successful. All excellent options are added!");
}else {

            lpObj->pInventory[TargetPos].m_NewOption = GetRandomExcOption();
            MsgOutput(lpObj->m_Index, "Use Jewel of Exelent successful. One option has been successfully added!");
}
...
If there is a more original decision I will be glad to make! Thanks to the author of the main topic for the work done
 
Back
Top