• 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!

Nostalrius 7.7

so see, i need that one, that no goes to ground, but stay in hand :)
i was trying to make a "new weapon" with spear look,
when i use it as "sword" its ok, but i changed to distance and i got error..

for now i think its in c++ to do it, not just in script
 
so see, i need that one, that no goes to ground, but stay in hand :)
i was trying to make a "new weapon" with spear look,
when i use it as "sword" its ok, but i changed to distance and i got error..

for now i think its in c++ to do it, not just in script

Open combat.cpp

Search for bool moveWeapon = true and change to false

1645455343787.png

Compiler and now no drop spear on the ground.
 
Last edited:
got it already, and with a point to use one weapon in other way
so all throwing are as it was - and one specyfic throwing is used that way to be not felt on the ground and to be keeped in hand
all credits to @ond - thanks again man :)
but anyway, thanks @chucky91

@ond @chucky91 @Ezzz -
maybe i just cant do it, but i got 15 players on server, exp rate set to 40x
and spawn to 1 - but spawn is god damn fast... like You kill a mob, and new one respaw almost immediately
that is in source or in config lua some more changes need to be done?
 
@ond @chucky91 @Ezzz -
maybe i just cant do it, but i got 15 players on server, exp rate set to 40x
and spawn to 1 - but spawn is god damn fast... like You kill a mob, and new one respaw almost immediately
that is in source or in config lua some more changes need to be done?
Config.lua
rateSpawn = 0 <<<<<<<<< doesn't change it. only 0 is ok, if it gets more than zero, respawn bugs.

if you want to change it, go through the world spawn xml.
 
Config.lua
rateSpawn = 0 <<<<<<<<< doesn't change it. only 0 is ok, if it gets more than zero, respawn bugs.

if you want to change it, go through the world spawn xml.
omg... im a dumbass...
totally forgot about spawntime= in XML...
all is okey now, it was XML fault... my mobs, got a spawntime="60" so.... hahahah XD

thats dosnt work...

but i found that if I put a
rateSpawn = 0 it will count from XML
but if I write like
rateSpawn = 30 it will multiplicate by 2 = 60 seconds
 
Last edited:
i try to make a better npc
to sell bps with runes, i got one, but he sells me a lot of bps.. .what i got to add to code, to buy just one bp?
for now situation is like that, he sell me a lot bps and take from me money just for one bp

Diff:
"bp uh"                 -> Price=2500,      "Do you want to buy backpack full of ultimate healing runes for %P gold?", Topic=8

Topic=8,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2869,3160,1)
Topic=8,"yes"                   -> "Sorry, you do not have enough gold."
Topic=8                         -> "Maybe you will buy it another time."
 
i try to make a better npc
to sell bps with runes, i got one, but he sells me a lot of bps.. .what i got to add to code, to buy just one bp?
for now situation is like that, he sell me a lot bps and take from me money just for one bp

Diff:
"bp uh"                 -> Price=2500,      "Do you want to buy backpack full of ultimate healing runes for %P gold?", Topic=8

Topic=8,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2869,3160,1)
Topic=8,"yes"                   -> "Sorry, you do not have enough gold."
Topic=8                         -> "Maybe you will buy it another time."
Do like this:

Diff:
"bp","uh"                         -> Type=3160, Data=1, Amount=1, Price=2500,  "Do you want to buy backpack full of ultimate healing runes for %P gold?", Topic=8
Topic=8,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2869,Type,Data)
Topic=8,"yes"                   -> "Sorry, you do not have enough gold."
Topic=8                         -> "Maybe you will buy it another time."
 
Last edited:
i try to make a better npc
to sell bps with runes, i got one, but he sells me a lot of bps.. .what i got to add to code, to buy just one bp?
for now situation is like that, he sell me a lot bps and take from me money just for one bp

Diff:
"bp uh"                 -> Price=2500,      "Do you want to buy backpack full of ultimate healing runes for %P gold?", Topic=8

Topic=8,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2869,3160,1)
Topic=8,"yes"                   -> "Sorry, you do not have enough gold."
Topic=8                         -> "Maybe you will buy it another time."

Lua:
"bp", "uh" -> Amount=1, Price=2500, "Do you want to buy backpack full of ultimate healing rune for %P gold?", Topic=50

Topic=50,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2870,3160,20)
Topic=50,"yes"                   -> "Sorry, you do not have enough gold."
Topic=50                         -> "Maybe you will buy it another time."
 
Do like this:

Diff:
"bp","uh"                         -> Type=3160, Data=1, Amount=1, Price=2500,  "Do you want to buy backpack full of ultimate healing runes for %P gold?", Topic=8
Topic=8,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2869,Type,Data)
Topic=8,"yes"                   -> "Sorry, you do not have enough gold."
Topic=8                         -> "Maybe you will buy it another time."

Lua:
"bp", "uh" -> Amount=1, Price=2500, "Do you want to buy backpack full of ultimate healing rune for %P gold?", Topic=50

Topic=50,"yes",CountMoney>=Price -> "Thank you. Here it is.", DeleteMoney, CreateContainer(2870,3160,20)
Topic=50,"yes"                   -> "Sorry, you do not have enough gold."
Topic=50                         -> "Maybe you will buy it another time."

thanks a lot :)
I will try it out :)
 
7.72 = Blank rune in hand to cast. You can change this easily though.

7.72 = Avalanche does not exist.
Where this can be chaged? 🤔
I'm looking for that to mąkę runes on bp or both, not just a hand 😉
 
Where this can be chaged? 🤔
I'm looking for that to mąkę runes on bp or both, not just a hand 😉

I think you will need to do this in sources.

Specifically, look for
C++:
bool ConjureSpell::conjureItem(Creature* creature) const

Under
C++:
bool foundReagent = false;

Remove
C++:
        Item* item = player->getInventoryItem(CONST_SLOT_LEFT);
        if (item && item->getID() == reagentId) {
            foundReagent = true;

            // left arm conjure
            int32_t index = player->getThingIndex(item);
            g_game.internalRemoveItem(item);

            Item* newItem = Item::CreateItem(conjureId, conjureCount);
            if (!newItem) {
                return false;
            }

            ReturnValue ret = g_game.internalAddItem(player, newItem, index);
            if (ret != RETURNVALUE_NOERROR) {
                delete newItem;
                return false;
            }

            g_game.startDecay(newItem);

            Spell::postCastSpell(player, conjureCost, soulCost);
        }

        item = player->getInventoryItem(CONST_SLOT_RIGHT);
        if (item && item->getID() == reagentId && player->getMana() >= conjureCost) {
            foundReagent = true;

            // right arm conjure
            int32_t index = player->getThingIndex(item);
            g_game.internalRemoveItem(item);

            Item* newItem = Item::CreateItem(conjureId, conjureCount);
            if (!newItem) {
                return false;
            }

            ReturnValue ret = g_game.internalAddItem(player, newItem, index);
            if (ret != RETURNVALUE_NOERROR) {
                delete newItem;
                return false;
            }

            g_game.startDecay(newItem);

            Spell::postCastSpell(player, conjureCost, soulCost);
        }


Replace with something like
C++:
        int32_t itemCount = player->getItemTypeCount(reagentId);
        int32_t subdata = -1;
        uint32_t conjureItem = conjureId;
        uint32_t newCount = conjureCount;
        if (itemCount && itemCount >= 1 && player->getMana() >= conjureCost) {
            foundReagent = true;

            if (player->removeItemOfType(reagentId, 1, subdata)) {              
                Item* newItem = Item::CreateItem(conjureItem, newCount);

                if (!newItem) {
                    return false;
                }
               
                ReturnValue ret = g_game.internalPlayerAddItem(player, newItem);
                if (ret != RETURNVALUE_NOERROR) {
                    delete newItem;
                    return false;
                }

                g_game.startDecay(newItem);

                Spell::postCastSpell(player, conjureCost, soulCost);
            }
        }


Probably don't need to to do the new conjure count part, this is just my code, but ive ripped out some custom changes for prem players conjuring more charges. I'm just too tired atm to clean this up any further.
 
I think you will need to do this in sources.

Specifically, look for
C++:
bool ConjureSpell::conjureItem(Creature* creature) const

Under
C++:
bool foundReagent = false;

Remove
C++:
        Item* item = player->getInventoryItem(CONST_SLOT_LEFT);
        if (item && item->getID() == reagentId) {
            foundReagent = true;

            // left arm conjure
            int32_t index = player->getThingIndex(item);
            g_game.internalRemoveItem(item);

            Item* newItem = Item::CreateItem(conjureId, conjureCount);
            if (!newItem) {
                return false;
            }

            ReturnValue ret = g_game.internalAddItem(player, newItem, index);
            if (ret != RETURNVALUE_NOERROR) {
                delete newItem;
                return false;
            }

            g_game.startDecay(newItem);

            Spell::postCastSpell(player, conjureCost, soulCost);
        }

        item = player->getInventoryItem(CONST_SLOT_RIGHT);
        if (item && item->getID() == reagentId && player->getMana() >= conjureCost) {
            foundReagent = true;

            // right arm conjure
            int32_t index = player->getThingIndex(item);
            g_game.internalRemoveItem(item);

            Item* newItem = Item::CreateItem(conjureId, conjureCount);
            if (!newItem) {
                return false;
            }

            ReturnValue ret = g_game.internalAddItem(player, newItem, index);
            if (ret != RETURNVALUE_NOERROR) {
                delete newItem;
                return false;
            }

            g_game.startDecay(newItem);

            Spell::postCastSpell(player, conjureCost, soulCost);
        }


Replace with something like
C++:
        int32_t itemCount = player->getItemTypeCount(reagentId);
        int32_t subdata = -1;
        uint32_t conjureItem = conjureId;
        uint32_t newCount = conjureCount;
        if (itemCount && itemCount >= 1 && player->getMana() >= conjureCost) {
            foundReagent = true;

            if (player->removeItemOfType(reagentId, 1, subdata)) {             
                Item* newItem = Item::CreateItem(conjureItem, newCount);

                if (!newItem) {
                    return false;
                }
              
                ReturnValue ret = g_game.internalPlayerAddItem(player, newItem);
                if (ret != RETURNVALUE_NOERROR) {
                    delete newItem;
                    return false;
                }

                g_game.startDecay(newItem);

                Spell::postCastSpell(player, conjureCost, soulCost);
            }
        }


Probably don't need to to do the new conjure count part, this is just my code, but ive ripped out some custom changes for prem players conjuring more charges. I'm just too tired atm to clean this up any further.
and again, thank You a lot :)
 
Back
Top