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

C++ [Nostalrius 7.7] Spears - keep in hand

PuszekLDZ

https://tibia74.eu
Premium User
Joined
Jan 2, 2020
Messages
329
Solutions
1
Reaction score
85
Location
Lodz
hello !

anyone know nostalrius codes?

i wanted to do infinite spear, to act like a normal weapon, not breakable or throwing out of hand

nostalrius is a 7.7 version, then spears was falling to the ground..
but i want them to act like after 8.0,
so i can attack monster and I dont have to pickup spears from the ground

maybe some one have that part of code or maybe some lua script?

P.S. - nom nostalrius dont have a weapon folder to do
XML:
action="removecount" or action="move" etc...
im not a programmer, but i think its hard coded
 
Solution
you could do something hackish and just check the id of spear
C++:
if (moveWeapon && weapon->getID() != 2389) {
    g_game.internalMoveItem(weapon->getParent(), destTile, INDEX_WHEREEVER, weapon, 1, nullptr, FLAG_NOLIMIT);
}

Then of course you need to set moveWeapon back to true at the beginning of that function
in combat try change
C++:
bool moveWeapon = true;
to false and see what pops
thanks @ond - isnt that to use with all of that type weapons? like throwingstars, etc?
i was thinking, it is possible to use only for one specified maybe XD
like i got a new item with id XXXX and that one should be not moved from hand
and other spears and throwing weapon should

btw, thans for answer:
1. its working
2. for time, that i noticed when You last login on otland and answer me specially :p
 
Last edited:
you could do something hackish and just check the id of spear
C++:
if (moveWeapon && weapon->getID() != 2389) {
    g_game.internalMoveItem(weapon->getParent(), destTile, INDEX_WHEREEVER, weapon, 1, nullptr, FLAG_NOLIMIT);
}

Then of course you need to set moveWeapon back to true at the beginning of that function
 
Solution
you could do something hackish and just check the id of spear
C++:
if (moveWeapon && weapon->getID() != 2389) {
    g_game.internalMoveItem(weapon->getParent(), destTile, INDEX_WHEREEVER, weapon, 1, nullptr, FLAG_NOLIMIT);
}

Then of course you need to set moveWeapon back to true at the beginning of that function
@ond wtf man?
i was looking for solution about 3 days...
now it works like a charm...

ok, how i can repay You? and if it possible to marry You?
 
Back
Top