• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Conjure Runes

marcos16

Falkhonn
Joined
May 4, 2012
Messages
224
Reaction score
1
Hello guys from OTLand
I want my server not to check the amount of blank rune in the count. Ex: have more than 1 blank rune and manage to cast the rune ...
Should I change this line?
Code:
if(item->isStackable() && item->getItemCount() != 1)

Thanks in advance.

--Edit--
Use tfs 0.4 rev 3777
 
Last edited:
that line is checking if the item is stackable and if the count is not equal to 1
if both, the statement will pass
so if you want it to not check for blank rune remove the item->getcount
 
Would be like this?
Code:
if(item->isStackable ()
Code:
if(item->isStackable()) {
edit: actually i think you just remove the whole if statement if you dont want to check the amount
this would be checking stackable for no reason lol
 
Code:
if(item->isStackable()) {
edit: actually i think you just remove the whole if statement if you dont want to check the amount
this would be checking stackable for no reason lol

Now it is not working even with just 1 blank rune ...
I want you to run with 1 or more blank runes in a single Slot ...
Ex:
Conjure this way too
blank_rune.jpg

And not just like this:
blank.jpg


I use tfs 0.4 3777
 
Now it is not working even with just 1 blank rune ...
I want you to run with 1 or more blank runes in a single Slot ...
Ex:
Conjure this way too
blank_rune.jpg

And not just like this:
blank.jpg


I use tfs 0.4 3777
show the full code cause i dont have any clue what you're wanting to edit
 
show the full code cause i dont have any clue what you're wanting to edit

I want the identical conjuration system from rev 3884. I added the runar code in the backpack, however it is checking 1 blank only, already in rev 3884 it conjures up any amount of blank rune ... I have no idea what code this does Function so I asked if it was that line that I modified ...
 
then post the full rune code as i said
Code:
ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId, uint32_t conjureCount,
    bool transform/* = false*/, uint32_t reagentId/* = 0*/, slots_t slot/* = SLOT_WHEREVER*/, bool test/* = false*/)
{
    if(!transform)
    {
        Item* newItem = Item::CreateItem(conjureId, conjureCount);
        if(!newItem)
            return RET_NOTPOSSIBLE;

        ReturnValue ret = g_game.internalPlayerAddItem(player, player, newItem, true);
        if(ret != RET_NOERROR)
            delete newItem;

        return ret;
    }

    if(!reagentId)
        return RET_NOTPOSSIBLE;

    Item* item = player->getInventoryItem(slot);
    if(item && item->getID() == reagentId)
    {

        if(item->isStackable() && item->getItemCount() != 1)
            return RET_YOUNEEDTOSPLITYOURSPEARS;
       
        if(test)
            return RET_NOERROR;

        Item* newItem = g_game.transformItem(item, conjureId, conjureCount);
        if(!newItem)
            return RET_NOTPOSSIBLE;

        g_game.startDecay(newItem);
        return RET_NOERROR;
    }

    return RET_YOUNEEDAMAGICITEMTOCASTSPELL;
}
 
try this
Code:
ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId, uint32_t conjureCount,
    bool transform/* = false*/, uint32_t reagentId/* = 0*/, slots_t slot/* = SLOT_WHEREVER*/, bool test/* = false*/)
{
    if(!transform)
    {
        Item* newItem = Item::CreateItem(conjureId, conjureCount);
        if(!newItem)
            return RET_NOTPOSSIBLE;

        ReturnValue ret = g_game.internalPlayerAddItem(player, player, newItem, true);
        if(ret != RET_NOERROR)
            delete newItem;

        return ret;
    }

    if(!reagentId)
        return RET_NOTPOSSIBLE;

    Item* item = player->getInventoryItem(slot);
    if(item && item->getID() == reagentId)
    {
        if(test)
            return RET_NOERROR;

        Item* newItem = g_game.transformItem(item, conjureId, item->getItemCount());
        if(!newItem)
            return RET_NOTPOSSIBLE;

        g_game.startDecay(newItem);
        return RET_NOERROR;
    }

    return RET_YOUNEEDAMAGICITEMTOCASTSPELL;
}
 
try this
Code:
ReturnValue ConjureSpell::internalConjureItem(Player* player, uint32_t conjureId, uint32_t conjureCount,
    bool transform/* = false*/, uint32_t reagentId/* = 0*/, slots_t slot/* = SLOT_WHEREVER*/, bool test/* = false*/)
{
    if(!transform)
    {
        Item* newItem = Item::CreateItem(conjureId, conjureCount);
        if(!newItem)
            return RET_NOTPOSSIBLE;

        ReturnValue ret = g_game.internalPlayerAddItem(player, player, newItem, true);
        if(ret != RET_NOERROR)
            delete newItem;

        return ret;
    }

    if(!reagentId)
        return RET_NOTPOSSIBLE;

    Item* item = player->getInventoryItem(slot);
    if(item && item->getID() == reagentId)
    {
        if(test)
            return RET_NOERROR;

        Item* newItem = g_game.transformItem(item, conjureId, item->getItemCount());
        if(!newItem)
            return RET_NOTPOSSIBLE;

        g_game.startDecay(newItem);
        return RET_NOERROR;
    }

    return RET_YOUNEEDAMAGICITEMTOCASTSPELL;
}
If you cast a charge of 100 blank rune you will turn the 100 into x rune, and you are removing the mana from it as you were casting only 1 blak.
 
Up

I'll simplify with image
You are conjuring just like this: [Only with blank rune]
img2.jpg

\/
After using adori gran mort:
img1.jpg


I want you to be able to: [Any amount of blank rune]
img3.jpg

\/
After using 2x adori gran mort:
1x
img1.jpg
2x
img4.jpg


And so on
 
Back
Top Bottom